layout: a late-arriving tile is cut stacked on a wide wall; the aspect rule runs once
open by a73x
Labels: backlog, layout
A tile that arrives on a wall of one is cut STACKED whatever the terminal's shape: `layout.Tree.insert` on a leaf root calls `split(focus, tile, .stacked)`. The aspect rule (`wall_layout.rootOrient`: beside when cols >= 2*rows) runs only in wallview's `!restore_ok` branch, once, after the sidecar restore is tried (all hosts reported, or 2 s). Two visible effects, both reproduced 2026-08-30 with v0.0.1-16 + ssh-askpass on a 100x30 pty, hosts = local + a down host + a reachable ssh host: 1. Every reattach blinks: the local tile paints, the remote's tile inserts stacked, then the restore applies the saved `beside` tree ~2 s in. 2. A tile that arrives AFTER the restore succeeded on the one local tile (seen once: the remote's list took 6 s) inserts stacked and nothing ever re-orients it. A wide wall stays stacked until the next detach/attach. Fix: the root split a birth makes takes `rootOrient(size)` instead of `.stacked` (in `insert`, or the birth path in wallview). That removes the blink too, since the interim cut is already the right shape. Restore stays verbatim — a saved tree still wins over the aspect rule. Pin: a two-tile wall built by list arrival on a wide pty is `beside` before any restore; a tile born after `restore_tried` on a wide pty is `beside`. (Fixture holds the terminal shape constant today: cols/rows must vary.) Aside, not this issue: a picker birth on a down host sits at `[connecting]` with no reason on its bar; the reason is on the picker row only.
Comments
a73x
[claude 2026-09-05 backlog pass] Half stale, half live. The sidecar restore and its 2 s blink are gone: an unseeded wall orients once via rootOrient when a second tile appears (wallview.zig, the 'oriented' branch). What survives: layout.Tree.insert still splits a leaf root .stacked, so a tile born after that one-shot (chord or picker) on a wide wall of one is cut stacked. Fix is the same one-liner the body names.