{{ message }}
feat(webui): add zoom to the session menu - #1316
Merged
Merged
Conversation
The web UI's session menu carries the pane actions (split horizontal / vertical, close split) but not zoom, so filling the grid with the focused pane was `C-x z`-only. Add a `zoom` row in the same slot the TUI menu uses — between the splits and `close split` — sharing one `togglePaneZoom` with the chord. Unlike the TUI, whose zoomed layout is borderless and has no title bar to reopen the menu from, a zoomed pane here keeps its head: the row is the way back out, so it relabels to `unzoom` while zoomed. Zoom stays per-client (spec 0118) — it hides panes rather than rewriting the shared tree, and publishes no layout edit. Closing the last split now also clears the per-client zoom flag, so the next split doesn't come back pre-zoomed with the row disabled. Spec 0145 said the web UI has no splits, which stopped being true when the pane grid landed; it now describes the pane actions the menu carries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Follow-up to #1315, which added
zoomto the TUI's session view menu. The web UI's session menu already carried the pane actions — split horizontal / vertical, close split — but not zoom, so filling the grid with the focused pane wasC-x z-only. The row lands in the same slot the TUI uses, between the splits andclose split, and shares onetogglePaneZoom()with the chord.It does relabel to
unzoomhere, unlike the TUI. That difference is real, not an inconsistency: the TUI's zoomed layout is borderless, so there's no title bar left to reopen the menu from and the way out is the chord. A zoomed pane in the web UI keeps its head, so this row is the way back out and has to say so — the same pattern as the menu's existing pin/unpin and archive/unarchive rows.Enabled only when a split layout is active (one pane has nothing to zoom), shown-but-disabled otherwise so the menu keeps a stable shape — matching how
close splitalready behaves.Drive-by fix: closing the last split left
state.paneZoomset, so the next split came back pre-zoomed with the row disabled and no visible way out.closePanenow clears the flag when the layout collapses to one pane. Reachable before this PR viaC-x z→ close pane, but the menu putszoomandclose splitadjacent, which makes it easy to hit.Zoom stays per-client (spec 0118): it hides panes rather than rewriting the shared tree, so it publishes no layout edit — asserted in the test below.
Testing
crates/e2e/tests/split_layout.rsextended: the menu must offerzoom; clicking it sets.is-zoomedon the pane grid; the layout version is unchanged (client-local); the row then readsunzoomand clicking it restores the split. Verified the new assertions actually execute (deliberately broke one and watched it fail) — this file drives a real browser and can skip silently if one can't launch.cargo test --workspacegreen (playbook_instant_dispatch_mixed_selection_falls_throughflaked once under concurrent load, passes on rerun).Spec 0145 said "the web UI has no splits", which stopped being true when the pane grid landed; updated to describe the pane actions the menu carries.
Relevant binary:
construct— the daemon embedsindex.html, so this ships in.claude/worktrees/webui-session-menu-zoom/target/debug/construct.The screenshot commit is removed in the next commit; the raw link is pinned to the SHA that has it.