Skip to content
C.W.K.
Stream
Lesson 04 of 05 · published

Arrangements Are Declarations

~11 min · arrangement, declaration, restore, recently-closed, recipe

Level 0Spark
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete

A Layout You Can Say Out Loud

An arrangement, in Smolder's mouth, is a saved declaration: hosts, commands, directories, splits. JSON you could read. Not a screenshot. Not a tmux session name on a host you hope is still up. Restore of an arrangement re-runs the recipe. It rematerializes, the way Track 2 already taught for a single pane after reboot. It does not revive PIDs. It does not OCR last Tuesday's pixels. If you cannot say the arrangement as a list of recipes, you do not have an arrangement. You have a picture of one.

That JSON is a family object. A sibling that wants four seats in one tab can hand over an arrangement-shaped request instead of four synthetic keyboards. Waygate can ask for a folder in a new split by naming a leaf, not by hoping a multiplexer parses a path. The door track will type that client. This lesson owns the payload: a tree of declarations, not a blob of cells.

Recently Closed Are Declarations Too

Close ended the jobs. What it kept, bounded, was a reopen declaration. Recently closed is not a freezer of live processes. Reopen starts fresh processes with the saved layout. If recently closed secretly kept PIDs around, close was detach, and the menu lied. If recently closed stored a screenshot, reopen would be a wallpaper. The same recipe shape covers "the arrangement I saved on purpose" and "the tab I closed twenty minutes ago." One kind of object. Two entry points.

The bound still matters. A recently-closed list that never forgets is how close starts feeling like hide. A saved arrangement is deliberate and named. A recently-closed item is a short memory. Mixing those lifetimes — treating every close as a permanent named layout — is how the arrangement menu becomes a junk drawer, and junk drawers do not get restored with trust.

Fresh Processes, Honest Chrome

When an arrangement rematerializes, the chrome should say so. New processes, old recipe. Allowlisted foreground programs may come back as themselves; everything else waits in the declared shell. That is Track 2's restore, applied to a tree instead of a leaf. A four-pane Anvil tab restored after a Close is four new seats, not four resurrected conversations. Quit with preservation is detach: the live jobs stay. Arrangement restore is a recipe. If you needed the conversations, detach, do not Close, and do not treat an arrangement as a time machine.

This is also why arrangements are not a substitute for detach. Detach keeps live jobs. Arrangements keep recipes. A morning layout you want every day is an arrangement. A compiler you want to keep while you walk to lunch is a detach. Using the wrong leftover is how people lose work and blame restore.

An arrangement is a recipe for a tree. Recently closed items are recipes too. Reopen starts fresh processes. Live jobs are not cargo that survives a close, and a screenshot is not a layout you can say out loud.

Code

An arrangement as a tree of recipes, never of PIDs·json
{
  "kind": "arrangement",
  "name": "morning-seats",
  "tabs": [
    {
      "title": "work",
      "tree": {
        "split": "vertical",
        "ratio": 0.5,
        "left": {
          "host": "local",
          "directory": "~/Projects/example",
          "command": "zsh"
        },
        "right": {
          "host": "local",
          "directory": "~/Projects/example",
          "command": "zsh",
          "foreground": { "program": "vim", "restart": "allowlisted" }
        }
      }
    }
  ]
}

# recently-closed item = same shape, unnamed, bounded by count (20)
# reopen => launch recipes, never reattach vanished PIDs
# detach => not this object; live jobs stay live

External links

Exercise

Write a three-leaf arrangement for a morning you actually have (editor, shell, a third job). Mark each leaf's command as declared-shell or allowlisted-foreground. Then write one sentence that must appear in the UI when this arrangement reopens after a reboot, so nobody thinks the old PIDs returned. Finally, say whether yesterday's closed tab belongs in this named arrangement or in recently-closed, and why.
Hint
If the third job is make, it is not allowlisted. If yesterday's tab is in the named file, you have turned close into save, and the junk drawer has already started.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.