Skip to content

[codex] debounce thread jump hint pills#1526

Merged
juliusmarminge merged 5 commits intomainfrom
t3code/debounced-thread-hint-pills
Mar 30, 2026
Merged

[codex] debounce thread jump hint pills#1526
juliusmarminge merged 5 commits intomainfrom
t3code/debounced-thread-hint-pills

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 29, 2026

Summary

Debounce the thread jump hint pills in the sidebar so they only appear after the jump modifiers have been held briefly.

What changed

  • added a small delayed-reveal controller for thread jump hint visibility
  • kept hide behavior immediate on modifier release and window blur
  • added logic tests covering delayed show, immediate hide, and canceling an in-flight reveal

Why

The pills were flashing whenever the jump modifier was pressed as part of unrelated shortcuts like Cmd+Tab, which made the sidebar feel noisy.

Impact

Thread jump shortcuts still work the same way, but the hint pills no longer pop in immediately for transient modifier presses.

Validation

  • cd apps/web && bun run test src/components/Sidebar.logic.test.ts
  • bun fmt
  • bun lint
  • bun typecheck

Notice the difference when Cmd+Tabbing from the desktop app (prod) vs The browser (dev). The pills doesn't flash

CleanShot.2026-03-29.at.09.36.39.mp4

Note

Debounce thread jump hint pills with a 100ms delay in the Sidebar

  • Introduces createThreadJumpHintVisibilityController in Sidebar.logic.ts to delay showing thread jump hints by THREAD_JUMP_HINT_SHOW_DELAY_MS (100ms) while hiding them immediately when modifiers are released or the window loses focus.
  • Adds useThreadJumpHintVisibility React hook to wire the controller into the Sidebar, replacing the previous immediate-show state.
  • Fixes getVisibleSidebarThreadIds to exclude threads from projects where shouldShowThreadPanel is false, so jump shortcuts and ordered thread IDs no longer include threads from collapsed projects.
  • Behavioral Change: thread jump hints no longer appear instantly on modifier keydown — they now require holding the modifier for 100ms before appearing.

Macroscope summarized 6f731bf.


Note

Medium Risk
Changes keyboard-hint visibility timing and the set/order of threads considered “visible” for jump commands, which can subtly affect sidebar keyboard navigation and hint rendering. Limited scope to sidebar UI logic with added unit tests for the timer controller.

Overview
Debounces sidebar thread-jump hint pills by introducing createThreadJumpHintVisibilityController (and useThreadJumpHintVisibility) so hints only appear after THREAD_JUMP_HINT_SHOW_DELAY_MS and hide immediately on modifier release/blur.

Adjusts visible thread ordering for keyboard jump commands by updating getVisibleSidebarThreadIds to omit threads from projects whose thread panel isn’t shown, and reworks Sidebar.tsx jump-command indexing to use this filtered list. Adds Vitest coverage for the delayed show/cancel/hide behavior and the new visibility filtering.

Written by Cursor Bugbot for commit 6f731bf. This will update automatically on new commits. Configure here.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0946417e-c779-4e11-a311-05eebc21aa67

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/debounced-thread-hint-pills

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 29, 2026
Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Mar 29, 2026
juliusmarminge and others added 3 commits March 29, 2026 09:33
Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge marked this pull request as ready for review March 29, 2026 16:40
@juliusmarminge juliusmarminge requested a review from t3dotgg March 29, 2026 16:40
@juliusmarminge juliusmarminge merged commit 32dca3b into main Mar 30, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the t3code/debounced-thread-hint-pills branch March 30, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant