feat(sidebar): pin chats within projects#3913
Conversation
Persist pinned thread keys per logical project, keep pinned chats above the project's normal sort order, and separate pinned chats with a compact divider.
|
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 |
| onDoubleClick={handleRowDoubleClick} | ||
| onKeyDown={handleRowKeyDown} | ||
| onContextMenu={handleRowContextMenu} | ||
| {...threadDrag.attributes} |
There was a problem hiding this comment.
🟡 Medium components/Sidebar.tsx:717
Spreading threadDrag.listeners onto the entire row makes every descendant a drag activator, including the inline rename <input>. During renaming, dragging more than 6px to select text starts a thread drag instead, disrupting text selection and causing drops to unexpectedly pin or unpin the thread. Consider attaching drag listeners to a dedicated handle or preventing drag activation from interactive descendants.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/Sidebar.tsx around line 717:
Spreading `threadDrag.listeners` onto the entire row makes every descendant a drag activator, including the inline rename `<input>`. During renaming, dragging more than 6px to select text starts a thread drag instead, disrupting text selection and causing drops to unexpectedly pin or unpin the thread. Consider attaching drag listeners to a dedicated handle or preventing drag activation from interactive descendants.
What Changed
Why
Important chats should stay easy to reach without being pinned globally across unrelated projects. Project-scoped pinning keeps each sidebar group predictable while preserving the existing thread sort order for unpinned chats.
The hover control provides a quick direct action, while divider-crossing drag behavior makes bulk sidebar organization feel natural.
UI Changes
Interaction demo:
Screen.Recording.2026-07-12.at.11.51.13.PM.mp4
Checklist