a73x

793707c9

docs: the bar's digit is position, not the session name

a73x   2026-08-25 19:33

Commit message
docs: the bar's digit is position, not the session name

README.md
Old New
@@ -72,7 +72,7 @@ The focused tile has the terminal, and only the prefix is held back:
72 | `Ctrl-\` `-` | split below: new session in a pane below | 72 | `Ctrl-\` `-` | split below: new session in a pane below |
73 | `Ctrl-\` `f` | fullscreen the focused pane (toggle) | 73 | `Ctrl-\` `f` | fullscreen the focused pane (toggle) |
74 | `Ctrl-\` `r` | resize mode: `h`/`l` shrink/grow the focus's width, `k`/`j` its height, one cell per press; Esc leaves silently, any other key leaves and types | 74 | `Ctrl-\` `r` | resize mode: `h`/`l` shrink/grow the focus's width, `k`/`j` its height, one cell per press; Esc leaves silently, any other key leaves and types |
75 | `Ctrl-\` `1`-`9` | focus tile N | 75 | `Ctrl-\` `1`-`9` | focus tile N — the digit on that tile's label bar |
76 | `Ctrl-\` `x` | forget the focused tile (off the wall file; the session keeps running) | 76 | `Ctrl-\` `x` | forget the focused tile (off the wall file; the session keeps running) |
77 | `Ctrl-\` `:` | add a tile by spelling: type `HOST#SESSION`, `quic://HOST#SESSION` or `--sock PATH#SESSION`, Enter adds it beside the focus (creating the session if needed) and records it; Esc or Ctrl-C cancels. The line editor takes printable ASCII only, so a path or hostname with any other byte in it goes in the wall file or on argv instead | 77 | `Ctrl-\` `:` | add a tile by spelling: type `HOST#SESSION`, `quic://HOST#SESSION` or `--sock PATH#SESSION`, Enter adds it beside the focus (creating the session if needed) and records it; Esc or Ctrl-C cancels. The line editor takes printable ASCII only, so a path or hostname with any other byte in it goes in the wall file or on argv instead |
78 | `Shift+PageUp` / `Shift+PageDown` | scrollback, a screen at a time (any other key returns to live) | 78 | `Shift+PageUp` / `Shift+PageDown` | scrollback, a screen at a time (any other key returns to live) |
@@ -346,11 +346,20 @@ below, `Ctrl-\` `f` fullscreen, `Ctrl-\` `r` resize mode, `Ctrl-\` `x`
346 forgets the focused tile, `Ctrl-\` `d` leaves. Any other command key after 346 forgets the focused tile, `Ctrl-\` `d` leaves. Any other command key after
347 the prefix is swallowed along with it, as in a plain client. 347 the prefix is swallowed along with it, as in a plain client.
348 348
349 The focused tile's label bar carries a `>` marker. Focus is client-local: 349 Every tile's label bar opens with its chord digit, and the focused tile's
350 moving it sends nothing on the wire, so `Ctrl-\` `n` and `Ctrl-\` `h` move 350 carries a `>` beside it — `1> ` has the focus, `2 ` does not. The digit is
351 between sessions instantly — no reconnect, no snapshot, no flash. Every 351 the order the tiles joined the wall — which is what `Ctrl-\` `1`-`9` indexes
352 tile keeps replicating at its own rect whether you are looking at it or 352 — not their left-to-right position and not the session name. A pane splits
353 not, so nothing reflows when focus moves away. 353 beside the focus while its digit is appended, so on a wall you have split or
354 restored the digits need not run in screen order. Each stays with its tile
355 for the whole run: forgetting one leaves a hole in the numbering rather than
356 renumbering its neighbours. Past 9 the bar still prints the number, though
357 no chord reaches it.
358
359 Focus is client-local: moving it sends nothing on the wire, so `Ctrl-\` `n`
360 and `Ctrl-\` `h` move between sessions instantly — no reconnect, no
361 snapshot, no flash. Every tile keeps replicating at its own rect whether
362 you are looking at it or not, so nothing reflows when focus moves away.
354 363
355 Typed input at the focused tile is predicted locally, and the wheel and the 364 Typed input at the focused tile is predicted locally, and the wheel and the
356 mouse work exactly as they do in a plain client, because a focused tile *is* 365 mouse work exactly as they do in a plain client, because a focused tile *is*
docs/decisions.md
Old New
@@ -6755,3 +6755,43 @@ by the startup tile loop — deciding whether `sendAttach` puts the tile's rect
6755 there is unaffected either way: it joins, and its rect arrives in the attach 6755 there is unaffected either way: it joins, and its rect arrives in the attach
6756 instead of in the resize doorbell one frame later. Nothing about a cross-version 6756 instead of in the resize doorbell one frame later. Nothing about a cross-version
6757 attach changes: an old daemon reads the same size claim. 6757 attach changes: an old daemon reads the same size claim.
6758
6759 ## 2026-08-25 — the bar shows the chord digit
6760
6761 `Ctrl-\ 1`-`9` has always focused tile N by POSITION: the handler indexes
6762 `tiles[n - 1]` and checks `present[n - 1]`. The label bar, meanwhile, named the
6763 SESSION — `--sock /run/user/1000/muxd.sock#2`. Two series, and nothing on screen
6764 said which was which. They line up only on a wall nobody has edited: forget a
6765 tile with `Ctrl-\ x`, or attach sessions out of numeric order, and the tile
6766 labelled `#2` is no longer the one `Ctrl-\ 2` reaches. The user counted stripes
6767 to type a chord.
6768
6769 Ruled: the bar opens with the tile's chord digit, `"{d}> "` when focused and
6770 `"{d} "` when not. The digit is `idx + 1` — the tile's slot in `tiles[]`, which
6771 is the order the tiles joined the wall, not the session's name and not where the
6772 tile sits on screen. `birthTile` appends at `live.*` while placing the new leaf
6773 beside the FOCUS, and hydration remaps saved leaves onto wall indices, so a wall
6774 that has been split or restored can read `1 4 2 3` left to right. That is the
6775 right trade: the digit must follow the chord, because that is what the chord
6776 indexes, and the multipane chunk-2 ruling already fixed `Ctrl-\ 1`-`9` as
6777 "focus N in the current layout". Naming the session on the bar and indexing the
6778 slot with the chord is the divergence, not the cure.
6779
6780 The digit is stable for a tile's whole life because `forgetTile` never compacts:
6781 it clears `present[sel]` and sets `gone`, leaving a hole. Pumps hold pointers
6782 into the tile array, so compaction was never on the table — which is what makes
6783 the digit safe to print. A forgotten tile's number vanishes with its bar and its
6784 neighbours keep theirs.
6785
6786 Tiles 10 to `max_tiles` (32) print their number too, two digits wide, though no
6787 chord reaches past 9. The number still answers "which chord reaches me" — with
6788 "none, this far out" — and the chord's reach is the chord's limit rather than
6789 the bar's; suppressing it would leave a bar saying nothing about its tile in
6790 order to protect a fact about the keyboard.
6791
6792 Cost is one column per bar. `labelText` already sizes the label cut by
6793 `marker.len`, so the digit is subtracted from the label and from nothing else —
6794 the state word still survives truncation at every width, which is the property
6795 that test pins. On a bar too narrow for `marker + " [state]"` the status is what
6796 the final `text[0..cols]` cut loses, exactly as before the digit; a two-digit
6797 tile reaches that width one column sooner.