Double-click a sidebar thread row to rename#3064
Conversation
Double-clicking a thread row now starts the existing inline rename, reusing the context-menu rename flow. A detail>1 guard keeps the trailing click of a double-click from also navigating. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba0abbd. Configure here.
| // while a double-click is starting an inline rename. | ||
| if (isTrailingDoubleClick(event.detail)) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Mobile sidebar closes before rename
Medium Severity
On mobile, the first tap of a double-tap still runs handleThreadClick, which calls setOpenMobile(false) and closes the sidebar before the row’s dblclick handler can start inline rename. Double-tap-to-rename therefore likely never works in the mobile sidebar even though desktop double-click does.
Reviewed by Cursor Bugbot for commit ba0abbd. Configure here.
There was a problem hiding this comment.
🟡 Medium
t3code/apps/web/src/components/Sidebar.tsx
Line 595 in ba0abbd
Double-clicking inside the rename input to select text bubbles dblclick to SidebarMenuSubButton, triggering handleRowDoubleClick which resets renamingTitle to thread.title and discards the user's edits. The input's onClick handler only stops click propagation, not dblclick. Consider adding onDoubleClick={stopPropagation} to the rename input to prevent the event from reaching the row button.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/Sidebar.tsx around line 595:
Double-clicking inside the rename input to select text bubbles `dblclick` to `SidebarMenuSubButton`, triggering `handleRowDoubleClick` which resets `renamingTitle` to `thread.title` and discards the user's edits. The input's `onClick` handler only stops `click` propagation, not `dblclick`. Consider adding `onDoubleClick={stopPropagation}` to the rename input to prevent the event from reaching the row button.
Evidence trail:
apps/web/src/components/Sidebar.tsx lines 595-603 (input element with onClick but no onDoubleClick), lines 505-507 (handleRenameInputClick stops propagation for click only), line 571 (parent onDoubleClick={handleRowDoubleClick}), lines 425-431 (handleRowDoubleClick calls startThreadRename(threadKey, thread.title)), lines 1804-1808 (startThreadRename calls setRenamingTitle(title) resetting to original thread.title).
ApprovabilityVerdict: Needs human review 1 blocking correctness issue found. This PR introduces new double-click-to-rename functionality. Two unresolved review comments identify functional bugs: mobile double-tap doesn't work because the sidebar closes first, and double-clicking inside the rename input resets edits. These issues warrant human review before merging. You can customize Macroscope's approvability policy. Learn more. |


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 > 1guard stops the trailing click of a double-click from also navigating, so cmd/shift multi-select is unaffected.Tests
isTrailingDoubleClickcovers single / synthetic / double / triple clicks.🤖 Generated with Claude Code
Note
Low Risk
Sidebar interaction-only change with a small click-handling guard; no auth, API, or data-model changes beyond existing rename commit.
Overview
Double-click on a sidebar thread row now starts the same inline rename flow as the context menu (focused input with full title selected; Enter commits, Escape cancels).
The row wires
onDoubleClickthrough a sharedstartThreadRenamehelper (also used by “Rename thread” in the menu).handleThreadClickskips navigation whenMouseEvent.detail > 1so the second click of a double-click does not open the thread.SidebarThreadRowis exported for browser tests; coverage includesisTrailingDoubleClick(unit) and double-click / Enter / Escape / single-click behavior (browser).Reviewed by Cursor Bugbot for commit ba0abbd. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add double-click to rename a thread row inline in the sidebar
SidebarThreadRownow opens an inline rename input with the title pre-selected, mirroring the existing context-menu rename flow.isTrailingDoubleClick(detail)in Sidebar.logic.ts to detect and ignore the trailing click(s) fired by the browser as part of a double-click sequence, preventing unintended navigation.startThreadRenamecallback onSidebarProjectItem.📊 Macroscope summarized ba0abbd. 3 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.