docs(tiles): moving tiles, by the header and by Ctrl+Shift+Arrows

The wiki's Tile Grid page gets a "Moving tiles" section and the move
chords in its keys table (with what they leave to a text field and
take from a terminal editor inside a tile); Keyboard Shortcuts lists
the chords and the header drag. The spec records moving as an owner
request in its as-built list, with the reasoning behind the default
keys. The invariants and CLAUDE.md say every move goes through
_reorderTiles (no remount, reconnect or reload; only a tile whose cell
size changed fits) and that the header drag carries its own type and
is not draggedTabId.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-08 00:13:32 +02:00
parent 20c2561a45
commit adeb22d7b2
5 changed files with 43 additions and 5 deletions
+18
View File
@@ -67,6 +67,24 @@ or settled a question the spec left open. The invariants as built are in
"Parking the main terminal" below says; the server's filter gates only terminal
batches, so lifecycle and hook events are unaffected, and leaving the grid
re-subscribes the shown session.
- **Tiles move** (owner request: "give me the option to move the tiles around"; not a
numbered decision). A tile's header, its free area (not the buttons, not the rename input),
drags it: onto another tile the two trade places, onto an empty slot it moves there (the
last cell: empty slots are always last, so the tiles after it close up). It is a native drag
through the tab drop targets (capture phase, stopped before xterm), carrying a type of its
own and never text, and it is not `draggedTabId`, so neither a text field nor the tab strip
takes it; Escape or a drop anywhere else cancels with nothing changed. `Ctrl+Shift+Arrows`
(Move Tile Left/Right/Up/Down, registry, rebindable) swap the focused tile with the
neighbour the focus chords pick, and focus stays on it. Every move, a tiled tab's drop
included, goes through `_reorderTiles`: no remount, reconnect or reload; divider sizes
belong to the cells, so only a tile whose cell size changed fits (one PTY resize, #464).
Moving is off while a tile is zoomed (the chords still apply there, as a no-op, so their
keys never reach the CLI) and with a single tile, and the chords skip a text field, where
Ctrl+Shift+Arrows select by word. Default keys: every other two-modifier arrow chord is
taken (Ctrl+Alt switches workspaces, Ctrl+Alt+Shift moves a window to another workspace
in GNOME, Alt is back/forward, Alt+Shift focuses tiles); Ctrl+Shift+Arrows is unclaimed by
the browsers, GNOME, KDE, macOS and Claude Code, and costs only a terminal editor's word
selection inside a tile while the grid is open.
- **A tile that joins before its pane exists resends its size when the pid appears**
(`TerminalTile.paneStarted()`): the server drops a resize for a session with no PTY and
spawns at 120x40, and Run's own resize measures the parked main terminal. Applying a