Skip to content

feat(sidebar): pin chats within projects#3913

Draft
12ya wants to merge 6 commits into
pingdotgg:mainfrom
12ya:main
Draft

feat(sidebar): pin chats within projects#3913
12ya wants to merge 6 commits into
pingdotgg:mainfrom
12ya:main

Conversation

@12ya

@12ya 12ya commented Jul 12, 2026

Copy link
Copy Markdown

What Changed

  • Persist pinned chat state per logical project.
  • Keep pinned chats above the normal thread sort order for each project.
  • Add hover pin and unpin controls without consuming title space.
  • Support pinning and unpinning by dragging a chat across the pinned divider.
  • Show a compact divider with a centered pin icon and distinct pin/unpin feedback colors.
  • Animate chats moving between pinned and regular sections.

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

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

@coderabbitai

coderabbitai Bot commented Jul 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: 0a2840b7-f3e9-46fa-8a2e-16e36e7f7608

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.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 12, 2026
onDoubleClick={handleRowDoubleClick}
onKeyDown={handleRowKeyDown}
onContextMenu={handleRowContextMenu}
{...threadDrag.attributes}

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.

🟡 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.

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: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