feat(webui): add zoom to the session menu by edwin-zvs · Pull Request #1316 · construct-worlds/construct · GitHub
Skip to content

feat(webui): add zoom to the session menu - #1316

Merged
edwin-zvs merged 3 commits into
mainfrom
webui-session-menu-zoom
Aug 28, 2026
Merged

feat(webui): add zoom to the session menu#1316
edwin-zvs merged 3 commits into
mainfrom
webui-session-menu-zoom

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Follow-up to #1315, which added zoom to 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 was C-x z-only. The row lands in the same slot the TUI uses, between the splits and close split, and shares one togglePaneZoom() with the chord.

session menu with the zoom row

It does relabel to unzoom here, 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 split already behaves.

Drive-by fix: closing the last split left state.paneZoom set, so the next split came back pre-zoomed with the row disabled and no visible way out. closePane now clears the flag when the layout collapses to one pane. Reachable before this PR via C-x z → close pane, but the menu puts zoom and close split adjacent, 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.rs extended: the menu must offer zoom; clicking it sets .is-zoomed on the pane grid; the layout version is unchanged (client-local); the row then reads unzoom and 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 --workspace green (playbook_instant_dispatch_mixed_selection_falls_through flaked 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 embeds index.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.

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.
@edwin-zvs
edwin-zvs merged commit 75e151d into main Aug 28, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the webui-session-menu-zoom branch August 28, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant