Repository navigation
fix(web): a focused folder New thread button no longer draws over the hidden-thread count - #35499
Conversation
… hidden-thread count AI-assisted; verified with the tests and tools listed above.
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The hidden-thread count now hides when the folder’s New thread action has focus, preventing visual overlap. This is a presentation-only adjustment with no changes to thread creation, stored data, or product defaults. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… hidden-thread count (pingdotgg#35499) (cherry picked from commit a7779fc)
In SidebarProjectFolderHeader the absolutely positioned New thread action shows on row hover and on focus-within, but the hidden-thread count hid only on row hover, so keyboard focus (or the focus left on the button after clicking it) drew the pen icon over a still-visible count. The count now also gets
group-has-[[data-sidebar-action-for]:focus]/project-folder:invisible, so it hides whenever the action it sits under is shown for focus.:focusis used rather than:focus-visiblebecause the action's reveal is focus-within (any focus), so the two conditions match exactly. The nearby comment now says the count hides on hover or focus. Nothing else visible changes: at rest and on hover the row looks as before. No new regex or parser.Fixes #35482
Reproduction on main
Commit fc2b5de (origin/main). Ran a temporary browser test (vp test run --project browser, from apps/web with NODE_ENV unset) that mounts the real AppRoot, router and sidebar with index.css. It uses the repo's fake environment: project 'render', threads active, hidden-one and hidden-two. Boring sidebar on, thread 'active' open, folder button clicked to collapse it, pointer reset away from the row. At rest: count '2' visible, action wrapper opacity 0. After userEvent.tab() focus is on 'New thread in render': count still visible, action opacity 1, rects intersect, row not hovered. The screenshot shows the pen icon drawn over the '2'. After a second Tab: action opacity 0, count reads normally. The temporary test was deleted.
Evidence
Real web client, Chromium, 1280×800 CSS pixels, light theme, separate fresh synthetic databases. Create render with active, hidden-one, and hidden-two; enable Boring sidebar; open active; collapse render; move the pointer away; press Tab to focus New thread in render, then Tab again to leave it.
Both sides show count 2 at rest and restore it after focus leaves. Selected stills were stable across two screenshots at least 500 ms apart.
Seed script · Reproduction procedure
AI-assisted; verified with the tests and tools listed above.
Tests
Temporary browser test (NODE_ENV= vp test run --project browser, apps/web, with index.css) rendering SidebarProjectFolderHeader collapsed with 2 hidden threads and tabbing to 'New thread in render': on origin/main it failed (count visibility 'visible', expected 'hidden'); with the fix it passed. The test was deleted, not committed.
vp run check:changed: format, lint, knip, typecheck (2 packages) and react compiler all pass.AI-assisted; verified with the tests and tools listed above.