Skip to content

Double-click a sidebar thread row to rename#3064

Open
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:icaruswings/sidebar-dblclick-rename
Open

Double-click a sidebar thread row to rename#3064
TheIcarusWings wants to merge 1 commit into
pingdotgg:mainfrom
TheIcarusWings:icaruswings/sidebar-dblclick-rename

Conversation

@TheIcarusWings

@TheIcarusWings TheIcarusWings commented Jun 12, 2026

Copy link
Copy Markdown

Double-clicking a thread row in the sidebar now starts the inline rename, reusing the existing context-menu rename flow (Enter commits, Esc cancels, blur commits). A detail > 1 guard stops the trailing click of a double-click from also navigating, so cmd/shift multi-select is unaffected.

Tests

  • Unit: isTrailingDoubleClick covers single / synthetic / double / triple clicks.
  • Browser: double-click starts a focused, text-selected rename; Enter persists; Esc cancels; single-click still navigates.

🤖 Generated with Claude Code


Note

Low Risk
Sidebar interaction and rename UX only; existing commit path is reused and tests cover click/double-click edge cases.

Overview
Desktop sidebar thread rows can now be double-clicked to start the same inline rename flow as the context menu (Enter commits, Escape cancels, blur commits). Mobile is excluded so tap-to-navigate behavior stays unchanged.

The row wires onDoubleClick with guards for modifier keys (multi-select), nested buttons/links, and an in-progress rename. Clicks on the rename input stop propagation so word-select double-clicks do not reset the edit. startThreadRename is extracted and passed into SidebarThreadRow so context menu and double-click share one entry point.

Navigation no longer runs on the second click of a double-click: handleThreadClick bails when isTrailingDoubleClick(event.detail) is true (after modifier-click handling). isTrailingDoubleClick lives in Sidebar.logic.ts with unit tests; browser tests cover rename start, commit, cancel, and edge cases. SidebarThreadRow is exported for the new browser test file.

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

Note

Add double-click to rename a thread row in the sidebar

  • Double-clicking a sidebar thread row now starts inline rename instead of navigating; modifier double-clicks and double-clicks on nested buttons/links are ignored.
  • The single-click navigation handler guards against the trailing click of a double-click using a new isTrailingDoubleClick util in Sidebar.logic.ts, preventing unintended navigation when rename is triggered.
  • Double-clicks inside the rename input are stopped from bubbling so they don't reset the edit in progress.
  • Mobile is excluded from the double-click rename path; context-menu rename behavior is unchanged.
  • Browser tests in Sidebar.dblclick.browser.tsx cover the full interaction including commit via Enter, cancel via Escape, and edge cases.

Macroscope summarized 9bd0a16.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

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: c92df28e-65a5-4868-abbe-a777616d2d02

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 Jun 12, 2026
Comment thread apps/web/src/components/Sidebar.tsx Outdated
Comment thread apps/web/src/components/Sidebar.tsx
@macroscopeapp

macroscopeapp Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Minor UI enhancement adding double-click-to-rename for sidebar thread rows. Over 75% of the diff is test code; runtime changes are simple event handling that reuses existing rename functionality.

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

@TheIcarusWings TheIcarusWings force-pushed the icaruswings/sidebar-dblclick-rename branch from ba0abbd to b02c392 Compare June 14, 2026 10:25
@TheIcarusWings

Copy link
Copy Markdown
Author

Addressed both bot findings and rebased onto main:

  • Mobile (Cursor Bugbot): double-click rename is now gated to non-mobile (useIsMobile). On mobile the first tap navigates and closes the sidebar sheet, so the inline input can't be shown there — renaming stays on the context menu.
  • Rename input (Macroscope): the input now stops dblclick propagation, so double-clicking inside it to select a word no longer bubbles to the row and resets the edit.

Added a browser-test case for the input-bubbling regression; existing unit + browser tests still pass.

Comment thread apps/web/src/components/Sidebar.tsx
@TheIcarusWings TheIcarusWings force-pushed the icaruswings/sidebar-dblclick-rename branch from b02c392 to f76a272 Compare June 14, 2026 10:29
Comment thread apps/web/src/components/Sidebar.tsx Outdated
@TheIcarusWings TheIcarusWings force-pushed the icaruswings/sidebar-dblclick-rename branch from f76a272 to 93cb1df Compare June 14, 2026 10:35

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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 93cb1df. Configure here.

Comment thread apps/web/src/components/Sidebar.tsx
Double-clicking a thread row starts the existing inline rename, reusing
the context-menu rename flow.

- Plain double-click: the trailing click is ignored for navigation
  (guard runs after the cmd/shift branches, so multi-select still
  processes every click).
- Modifier double-clicks (cmd/ctrl/shift/alt) stay multi-select intent
  and do not open rename.
- Desktop-only: on mobile the first tap closes the sidebar sheet, so
  rename there stays on the context menu.
- Double-clicks on the rename input, on nested controls (PR status,
  port, archive buttons), or on an already-renaming row no longer
  start/reset a rename.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@TheIcarusWings TheIcarusWings force-pushed the icaruswings/sidebar-dblclick-rename branch from 93cb1df to 9bd0a16 Compare June 14, 2026 10:39
@juliusmarminge

Copy link
Copy Markdown
Member

please add screenshots and/or videos

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.

2 participants