Repository navigation
Switcher: icon view button, pin in a ⋯ menu, tighter bar - #396
Merged
Merged
Conversation
…e pills show The operator asked for icons instead of the view button's labels, the pin moved into a three-dots context menu, and less padding so more session pills fit. - View button: icon only (clock = Recent, bell = Waiting, pin = Pins, grid = All), 40x44 around a 32px face. Every view's icon is rendered and the inline script toggles `hidden` before paint, so a stored view shows its icon with no flash and no shift. Each icon is role=img with an aria-label and title; the button keeps its "Showing <view> sessions" aria-label and title. The view menu shows each view's icon beside its words. - Pin: the standalone button is gone. A ⋯ button (#switcher-more-btn) at the bar's right end opens a popover role=menu (#switcher-more) holding the same pin form (same action, fields, view=switcher, back, hx-post and out-of-band rows; still one #switcher-pin id per page). Its item is a role=menuitem with data-pinned in place of aria-pressed, which menuitem does not allow. It opens with popovertarget, so it works without script; the script adds arrow/Home/End/Escape/Tab, places the menu above the button, and closes it on submit. No page session means no ⋯. - Padding: icon buttons are w-10 (40px) and still h-11, the pinned bar's inset is 4px a side (max with env(safe-area-inset-left/right)), row gap is gap-1, pills are px-2/gap-1. Bar height and room are unchanged. Measured at 390px, shown row clientWidth: 182 -> 250px on a Terminal view's screen-wide bar, 174 -> 226px on an agent chat page. Tests: switcher_compact_test.go (icon per view with name, pin form in the ⋯ menu, no standalone pin, tight classes) is red at the base branch (c0ee49c) and green here. A new 390x844 e2e test in composer-switcher covers the row width, the icon changing with the view, and ⋯ -> Pin -> the Pins view. It is red at the base (row 174 < 210). Existing Go/e2e assertions on labels, aria-pressed, 44px widths and class strings were updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ZacxDev
force-pushed
the
feat/switcher-compact
branch
from
November 1, 2026 20:29
fc82be9 to
fd2caf9
Compare
Owner
Author
|
Round 0 (requirements & deletion): requirement questioned (Q1, forcing: user). Ledger: requirements 9 (unattributed 2) · deletion candidates 3. |
Owner
Author
|
… keys Following the operator's decision, the bar's view, search and ⋯ buttons go back to 44px-wide targets (w-11). The extra room now comes from three places: the pinned bar has no inset beyond the safe-area insets, the bar's row has no gaps (each 44px box already sets its 32px face 6px in), and the pills keep px-2/gap-1. Measured at 390px (the shown row's clientWidth): - Terminal view: 182px on main before this PR -> 258px - agent chat page: 174px -> 226px layout.spec passes. - The ⋯ menu holds one item, so its ArrowUp/ArrowDown/Home/End handlers are gone. Escape, Tab, focus-return, and an arrow on the button to open it all remain. - Dropped TestTheBarIsTight. It only re-checked class strings that other tests already pin. - Reverted the 44->40 test edits and removed the stray measurement logs. - Comments now paraphrase the operator instead of quoting. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
Round 1 (nine-axis checklist): 0 🔴, 0 🟡, 3 🟢. No 🔴, so the ladder ends; the 🟢s are recorded open here rather than fixed in this PR. |
ZacxDev
marked this pull request as ready for review
November 1, 2026 21:41
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.
Targets
main. It builds on the session switcher on Terminal views (#393, merged as 3cce631).The operator asked for three changes to the bottom bar: icons instead of each view's text label, the pin moved into a three-dots menu, and less padding so more of the session pills show.
What changed
The view button is an icon. Clock = Recent, bell = Waiting, pin = Pins, grid = All. It is a 44×44 target around a 32px face.
hiddenbefore paint, so a stored view shows its own icon with no flash and no shift.role=imgwith anaria-labeland atitle. The button keeps itsShowing <view> sessions; choose a viewname and title.The pin moved into a ⋯ menu. The standalone pin button is gone.
#switcher-more-btn, at the bar's right end after the search, opens a popoverrole=menu(#switcher-more).popovertarget, so it opens without script.view=switcher,back, htmx answer and out-of-band rows. There is still one#switcher-pinper page.role=menuitemwithdata-pinned. It no longer usesaria-pressed, which ARIA does not allow onmenuitem.Tighter bar, 44×44 targets kept (operator decision). The view, search and ⋯ buttons stay
w-11 h-11. The room comes from three places:env(safe-area-inset-left/right/bottom);px-2/gap-1.switcherHeight/switcherRoomare unchanged. Pills still show their whole label, and the row still scrolls sideways.Measured at 390px (the shown row's
clientWidth)Tests
internal/ui/switcher_compact_test.gohas 3 tests:back;composer-switcher.spec.tscovers:pins.spec.tsasserts the Terminal view's row is ≥ 240px.go test ./internal/ui/ ./internal/api/against a fresh private Postgres 16: 3305 PASS, 0 FAIL, 0 SKIP.go vet ./...and gofmt are clean, andmake css-checkmatches.Not verified
back) was not run in a browser. A Go test covers the 303.🤖 Generated with Claude Code