Skip to content

fix(web): a focused folder New thread button no longer draws over the hidden-thread count - #35499

Merged
juliusmarminge merged 1 commit into
mainfrom
factory/issue-35482
Nov 12, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
factory/issue-35482

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

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. :focus is used rather than :focus-visible because 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.

Before After
fc2b5de20c e2049606a5
Focused pen overprints count 2. Count hides while the pen has focus.
Before: focused pen overlaps hidden-thread count After: focused pen with count hidden
Before recording After recording

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.

… hidden-thread count

AI-assisted; verified with the tests and tools listed above.
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 12, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at e204960

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.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The collapsed-folder thread count now hides when the folder’s new-thread action receives focus. Existing hover and coarse-pointer behavior remains.

Changes: Collapsed folder count visibility

Layer / File(s) Summary
Hide count on action focus
apps/web/src/components/sidebar/SidebarProjectFolderHeader.tsx
The hidden-thread count now also hides when a sidebar action for the folder is focused. The comment documents this behavior.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: t3dotgg

Merge Risk: Minimal · up to e2049

This change hides the collapsed-folder thread count while the new-thread action has keyboard focus, so the pen icon no longer overlaps the count. Rest and hover appearance is unchanged. No merge-blocking risk is evident.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a focused folder New thread button no longer overlaps the hidden-thread count. The raw summary says the count now hides on focus of the new-thread action, which matche…
Linked Issues check Passed Issue #35482 is the only active direct target. Its coding requirement is that the hidden-thread count and the action hide each other while the action has focus. The diff adds `group-has-[[data-sidebar…
Out of Scope Changes check Passed The whole-PR diff against the merge base changes one file, SidebarProjectFolderHeader.tsx. It adds one utility class to the count span and updates one comment to say the count hides on hover or focus.…
Description check Passed The description states the problem (the New thread pen overlaps the hidden-thread count on keyboard focus), the change (adds a focus-based invisible rule to the count), the linked issue (#35482), repr…
Full details: Title check

Explanation

The title names the main change: a focused folder New thread button no longer overlaps the hidden-thread count. The raw summary says the count now hides on focus of the new-thread action, which matches the title. The title uses the conventional fix(web) prefix and is specific to the sidebar folder header.

Full details: Linked Issues check

Explanation

Issue #35482 is the only active direct target. Its coding requirement is that the hidden-thread count and the action hide each other while the action has focus. The diff adds group-has-[[data-sidebar-action-for]:focus]/project-folder:invisible to the count span in SidebarProjectFolderHeader.tsx. The count span is a descendant of the group/project-folder li. The action Button carries data-sidebar-action-for={rowId}, so the selector hides the count when that Button has :focus. Focus leaving the Button removes the match, so the count returns. The existing group-hover/project-folder:invisible rule is unchanged, so hover and rest behavior stay the same. The action wrapper's focus-within:opacity-100 reveal and its onNewThread handler are unchanged, so draft creation and reuse are unaffected. No thread-card code changed. The selector form was checked by reading the source only. The author's browser test is not committed and was not re-run here.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff against the merge base changes one file, SidebarProjectFolderHeader.tsx. It adds one utility class to the count span and updates one comment to say the count hides on hover or focus. Both changes directly implement issue #35482. No unrelated files or behavior changes appear in the diff.

Full details: Description check

Explanation

The description states the problem (the New thread pen overlaps the hidden-thread count on keyboard focus), the change (adds a focus-based invisible rule to the count), the linked issue (#35482), reproduction steps on main, before/after evidence, and test results. It follows the template's Problem, Change, Scope, and Verification sections. It does not state a conventional commit title, and it does not include a 'used an agent' model/harness line at the end, though it does say 'AI-assisted'. These are minor gaps and do not block the check.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between fc2b5de and e204960.

Files selected for processing: 1

  • apps/web/src/components/sidebar/SidebarProjectFolderHeader.tsx

Limit details: You’ve used all 10 included reviews currently available.

@juliusmarminge
juliusmarminge merged commit a7779fc into main Nov 12, 2026
36 checks passed
@juliusmarminge
juliusmarminge deleted the factory/issue-35482 branch November 12, 2026 19:00
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Focusing a collapsed project folder's new-thread action overprints its hidden-thread count

1 participant