Conversation
The vertical tab rail now reads the owner's tab layout (GET /api/tab-layout) and draws its groups as collapsible sections. This is the first frontend consumer of the tab-layout backend and it is read-only: nothing in the browser writes the layout yet. - tab-layout-browser.js (new, pure, loaded before app.js): projects the layout onto the live sessions and open web tabs, renders the grouped markup, stores collapse per device, and sequences loads newest-wins with a bounded retry on failure. - app.js: loads the layout on init and on tab:layoutChanged, renders the grouped rail from the same per-row markup the flat rail uses, falls through to a full render whenever the grouping structure changes, and withholds drag-reorder in the grouped rail. - Grouping is opt-in by construction. With no layout, a failed read, a layout without groups, or a horizontal strip, the rail renders exactly as before (byte-identical markup). - Grouping is a render layer only: sessionOrder, Alt+N, Ctrl+Tab and the palette keep reading the server-projected order, and row badges keep their Alt+N slot. - A collapsed group still shows the active row; lineage arcs to a hidden session anchor to its group header. - webview-tabs.js: renderWebviewTab() extracted so a single web tab can be placed into its group with unchanged markup.
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.
This is the first of a short stack that gives the vertical tab rail named groups, built on the owner tab-layout API that already shipped as backend only (
GET/PUT /api/tab-layout).It adds a small pure module,
tab-layout-browser.js, that readsGET /api/tab-layout, projects the owner's groups onto the live sessions and open web tabs, and renders them as collapsible sections in the vertical rail. The browser never writes the layout in this PR. Creating, renaming and moving tabs between groups come in follow-ups.No change for existing users. Grouping only applies when the rail is vertical and the owner has at least one group. With no layout, a failed read, zero groups, the horizontal strip, phones or the sidebar, the rail markup is byte-identical to today. A test renders the old and new code side by side and compares them.
Grouping only changes how rows are drawn.
sessionOrder, Alt+N, Ctrl+Tab and the palette keep reading the server-projected order.webview-tabs.jsthe only change is a small extractedrenderWebviewTab(), with identical markup.Collapse is a per-device preference in localStorage. A collapsed group always keeps the active row visible, selecting a hidden session reveals just that row, and lineage arcs to a hidden session anchor to its group header.
Drag-reorder is off in the grouped rail until grouped editing lands, because a flat-order drop can't express a move between groups.
There are no server changes, no new settings and no new SSE events. The page refreshes the layout on the existing
tab:layoutChangedevent (owner-scoped, newest version wins).Tests
@vitest-environment jsdomcurrently fails on master (No such built-in module: node:), so the rail test runs the real modules in an explicit JSDOM window rather than relying on it.Open questions for review