feat(desktop): a collapsed repository group counts its plans on hover, and keeps the open plan in sight
Merged
DA
8d ago+134+134+012345678901234567890123456789-13-13-01234567890123456789
Summary
Polish for collapsed repository groups in the sidebar (desktop/desktop-sidebar.tsx), as Dean asked:
- Plan count on hover. A collapsed group's header shows how many plans it holds, as a quiet muted number at its trailing edge, just before the ⋯ and +. It appears with the chevron while the header is hovered or reached from the keyboard (
:focus-visible). The number is always laid out while the group is collapsed and only its opacity changes, so the header's height and the label's truncation never move. An expanded group shows no count. Screen readers hear it as "4 plans" / "1 plan", as part of the toggle's name. - The open plan stays visible. If the open plan (the
aria-currentrow) belongs to a collapsed group, that one row is drawn under the collapsed header, with its normal selected style and hover buttons. The group otherwise stays collapsed. Opening another plan re-evaluates: the previous plan disappears again if its group is collapsed. ⌥⌘↑/↓ already walked through the open plan under a fold (itsdrawnlist), so back/forward is unchanged. - ⌥⌘↑/↓ matches what is drawn. The walk now treats a collapsed group's plan as present only when it is the
aria-currentrow. Before, it went byactivePlanId, which stays set while the new-plan page shows, so ⌥⌘↓ from the new-plan page could open a plan the collapsed group was not showing. - This applies to "No repository" too. Pinned and Archived are unchanged.
Evidence
- Platform-independent checks:
./scripts/check.shexit 0 - macOS Electron verification (
./scripts/verify.sh):not run. This was built in a Linux cloud workspace. CI could not verify this UI change either; it runs on Linux only. A Mac break that lands anyway is caught at the release rehearsal on a tag, not at review (LUKE-159 is the manual Mac pass). - Tests (through the public
DesktopSidebar; both fail without the change):- a collapsed group counts its plans ("2 plans", "1 plan" under No repository), and an expanded one shows no count;
- the open plan stands under its collapsed group and the group's other plans don't; opening another plan moves it, including to No repository, and the group stays collapsed;
- from the new-plan page, ⌥⌘↓ skips a collapsed group's last open plan, which the list no longer shows.
- The hover-only visibility of the count is CSS (
:hover/:focus-visible, like the ⋯ and + beside it), which jsdom cannot evaluate, so the screenshots below cover it.
Visual evidence
These are not verify.sh PNGs. The real DesktopSidebar was mounted in headless Chrome on Linux, with the real stylesheet and the shared plansControl builder. next.js and No repository are collapsed.





- Fixture screenshots inspected:
not attached(needs a Macverify.shrun)
Invariants
-
./scripts/check.shgreen; renderer/UI PRs also./scripts/verify.shwith evidence inspected. (CI): check green;verify.shnot run (no Mac) - JSON Schema goldens unchanged. (CI)
- Every behavior change has, in this PR, the test that fails without it; no change-detector test added.
- Gateway envelope goldens unchanged. (CI)
- No new
astype assertion outside the allowlisted files. (CI via anti-slop) - No
Effect.runPromise/runSync/runForkoutside the runtime edges. (CI) - No new raw async primitives. (CI)
- No Effect, Stream, or Layer written as a statement and dropped. (CI via
pnpm discarded-effect)
🤖 Generated with Claude Code