Skip to content

Support two-digit sidebar thread jumps#2623

Open
svenbuild wants to merge 2 commits intopingdotgg:mainfrom
svenbuild:sidebar-two-digit-thread-jumps
Open

Support two-digit sidebar thread jumps#2623
svenbuild wants to merge 2 commits intopingdotgg:mainfrom
svenbuild:sidebar-two-digit-thread-jumps

Conversation

@svenbuild
Copy link
Copy Markdown

@svenbuild svenbuild commented May 9, 2026

Summary

  • Allow sidebar thread jump shortcuts to target visible threads 10-99 by pressing a second digit shortly after the first shortcut.
  • Extend sidebar shortcut hints after Ctrl+9 with labels like Ctrl+10 and Ctrl+15.
  • Keep existing thread.jump.1 through thread.jump.9 keybinding commands unchanged.

Why

This keeps the existing shortcut model but makes it work for longer thread lists without adding new keybinding commands.

Interaction notes

  • Ctrl+1 still jumps to thread 1 after the short timeout.
  • Ctrl+1, then 5 within the timeout jumps to visible thread 15.
  • The second digit is intentionally accepted while the modifier is still held, so users can type a continuous sequence like Ctrl+1, 5 without releasing Ctrl.
  • Sidebar hints now show the synthesized two-digit labels for visible threads after 9.

Verification

  • bun run test src/components/Sidebar.logic.test.ts from apps/web
  • bun run typecheck --filter=@t3tools/web
  • git diff --check

Note

Support two-digit keyboard thread jumps in sidebar navigation

  • Extends sidebar thread-jump shortcuts to support indices 10–99 by introducing a 250ms pending-digit window after a first-digit keypress.
  • If a second digit is pressed within the window, the sidebar navigates to the combined two-digit thread index; otherwise it falls back to the single-digit jump.
  • Updates buildThreadJumpLabelMap in Sidebar.tsx to generate composed shortcut labels (first-digit label + second digit character) for threads 10–99.
  • Pending state is cleared on navigation, route changes, traversal commands, and non-digit keypresses.
  • Behavioral Change: single-digit jumps (1–9) now navigate after a 250ms delay instead of immediately, to allow time for a second digit.

Macroscope summarized c21f44f.


Note

Medium Risk
Updates the global sidebar keydown handler to add timed two-digit jump sequences and delays existing single-digit jumps by 250ms, which could subtly affect keyboard navigation behavior and event handling.

Overview
Adds two-digit sidebar thread-jump navigation (10–99) by capturing a second digit shortly after thread.jump.1thread.jump.9 is triggered and computing the target visible thread index.

Updates buildThreadJumpLabelMap to synthesize and display shortcut hint labels for visible threads beyond 9 (e.g., Ctrl+10, Ctrl+15), and introduces pending-jump state/timeout management that is cleared on navigation and route changes.

Reviewed by Cursor Bugbot for commit c21f44f. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 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: 84536503-3fe8-46ce-8a31-f210253c0ec1

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels May 9, 2026
@svenbuild svenbuild marked this pull request as ready for review May 9, 2026 20:03
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 90fcd63. Configure here.

Comment thread apps/web/src/components/Sidebar.tsx
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented May 9, 2026

Approvability

Verdict: Needs human review

This PR introduces new user-facing behavior (two-digit thread jump shortcuts) and modifies existing behavior by adding a 250ms delay to single-digit jumps while awaiting a potential second digit. New features with runtime behavior changes warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@svenbuild svenbuild force-pushed the sidebar-two-digit-thread-jumps branch from 90fcd63 to 667a308 Compare May 9, 2026 20:14
@svenbuild svenbuild marked this pull request as draft May 9, 2026 20:14
@svenbuild svenbuild force-pushed the sidebar-two-digit-thread-jumps branch from 667a308 to 70800d6 Compare May 9, 2026 20:23
@svenbuild svenbuild marked this pull request as ready for review May 9, 2026 20:25
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70800d6771

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/web/src/components/Sidebar.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant