fix(web): pin "Add workspace…" below the New session workspace list - #948
Merged
Merged
Conversation
The New session dialog offered its workspaces in a native select with "Create new workspace…" as the last option — at the end of a long list it was the row nobody scrolled to. The picker is now the app's own Menu: a row per folder (the path as a second line only where two folders share a name, the current one checked) in a scrolling list, with "Add workspace…" pinned below it after a divider, as the reference does. Menu gains a `footer` (rows outside the scrolling viewport, after a divider, never checked) and a `block` mode (the trigger fills the owner and the list spans it — the form-control shape). Rows, separators and labels no longer shrink in a height-constrained list: they are flex items of the viewport, and with an explicit min-height a long list squashed every row before it scrolled, so a two-line row's hint overlapped the row below. Unreachable before — the composer menus are short. Escape and a press outside the open list close only the list; the dialog closes on the next one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ck list spans its trigger Review round: the list's stylesheet cap bounded it by the window's height, not by where its anchor sat, so the New session picker opening below a control in the middle of a 768px-tall window ran past the bottom edge — with the page unable to scroll, the pinned "Add workspace…" was not on screen at all. The menu now measures the room above and below its anchor once open (and on resize), caps the list to the room on its side, and opens on the other side when its own has too little and the other more. The composer pickers keep opening upward. `.listBlock` was declared before `.list` at equal specificity, so the base width bounds won: the block list was 360px under a 402px trigger; it is now a compound rule after `.list`. The trigger's accessible name carries the chosen folder, not just the field label; focus returns to the trigger when the list closes; the Escape handler reads the menu state from its own closure instead of a ref written during render; the name in the trigger keeps its width and the path absorbs the truncation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Deferred follow-ups from the review (non-gating, shared with the composer pickers built on the same
|
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.
Why
With a long list of workspaces, the "Create new workspace…" option at the end of the New session dialog's native select was hard to find. The reference shows the workspace list with Add workspace… pinned below it in its own section.
What changed
Menu: a row per folder with a folder glyph, the current one checked, the full path as a second line only where two folders share a name (so twoclawcodexcheckouts stay distinguishable while the common case stays one compact line). The list scrolls; Add workspace… sits below it, after a divider, pinned in view at any list length. Picking it reveals the folder-path field as before.Menugainsfooter(rows rendered outside the scrolling viewport, after a divider, never marked selected) andblock(the trigger fills the owner, the list spans it).Menubug fixed: rows/separators/labels are flex items of a height-constrained viewport with an explicitmin-height, so a long list squashed every row to its minimum before scrolling — a two-line row's hint overlapped the next row. Unreachable before this change (the composer menus are short);flex: noneon those rows.Menumeasures the room above and below its anchor once open (and on resize), caps the list to the room on its side, and opens on the other side when its own has too little and the other has more (menuPlacement, unit-tested). Before, the stylesheet capped the list by the window's height regardless of where the anchor sat, so on a 1366×768 window the picker ran below the fold with the page unable to scroll — the pinned row was off-screen. The composer pickers keep opening upward..listand follows it, so the list spans its trigger (it was 360px under a 402px trigger).Verification
Menufooter/block);tscclean; bundle builds.ui-web/diston this machine's 37-workspace sidebar) at 1366×768, 1440×900 and 1280×640: the list spans the trigger (402px), scrolls, and its pinned Add workspace… row is within the viewport at every size (list capped to 366px / 420px / 302px); hinted rows 50px and plain rows 34px with no overlap; picking a row returns focus to the trigger; the composer's model picker still opens upward and in view; no console errors.🤖 Generated with Claude Code