Skip to content

feat: add pinned threads and thread ID search#2038

Open
jordant97 wants to merge 2 commits intopingdotgg:mainfrom
jordant97:feat/pinned-threads-and-thread-id-search-v2
Open

feat: add pinned threads and thread ID search#2038
jordant97 wants to merge 2 commits intopingdotgg:mainfrom
jordant97:feat/pinned-threads-and-thread-id-search-v2

Conversation

@jordant97
Copy link
Copy Markdown

@jordant97 jordant97 commented Apr 15, 2026

Summary

  • Pinned threads: Right-click any thread → "Pin thread" to pin it to the top of its project's thread list. Persisted to localStorage. Visual pin icon indicator. Unpin via context menu.
  • Thread ID search in Command Palette: Pasting a copied thread ID into ⌘K now finds the matching thread (previously only searched by title/branch/project).
  • Sidebar filter input: New filter icon next to the Projects header opens an inline search that filters threads by ID or title across all projects, including collapsed ones.

Changed files

  • apps/web/src/uiStateStore.tspinnedThreadKeys state, pinThread()/unpinThread() actions, persistence & cleanup
  • apps/web/src/components/Sidebar.tsx — Pin icon, context menu entries, pinned-first sorting, filter input UI, auto-expand on filter
  • apps/web/src/components/CommandPalette.logic.ts — Added thread.id to searchTerms
  • apps/web/src/uiStateStore.test.ts — Updated test fixture

Test plan

  • Right-click a thread → "Pin thread" → thread moves to top with pin icon
  • Right-click pinned thread → "Unpin thread" → returns to normal position
  • Pin persists after page reload
  • ⌘K → paste a thread ID → thread appears in results
  • Click filter icon in sidebar → type thread ID → matching threads shown (even in collapsed projects)
  • Press Escape or click filter icon again to dismiss filter
  • Existing tests pass (uiStateStore, CommandPalette.logic, threadSort)

🤖 Generated with Claude Code


Note

Medium Risk
Adds new persisted UI state (pinnedThreadKeys) and modifies sidebar thread ordering/filtering logic, which could affect thread visibility/order and localStorage migrations if buggy.

Overview
Adds pinned threads in the sidebar: threads can be pin/unpinned from the context menu, display a pin indicator, persist via uiStateStore localStorage, and are sorted to the top of each project’s thread list.

Adds a sidebar thread filter UI that filters threads by ID or title (showing all matches without the preview limit), and extends command palette thread search to include thread.id in searchTerms for ID-based lookup.

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

Note

Add pinned threads and thread ID search to the sidebar

  • Threads can be pinned or unpinned via the sidebar context menu; pinned threads appear at the top of each project's thread list and display a pin icon in their row.
  • Pin state is persisted to localStorage and restored on load, with cleanup when threads are removed or their UI state is cleared.
  • A filter control in the sidebar header lets users search threads by ID or title, with the filter input toggled via a toolbar button.
  • Thread IDs are now included in command palette search terms so threads can be found by ID in addition to title, project, and branch.

Macroscope summarized 53d0193.

Add two new features to the sidebar:

1. Pinned threads — right-click a thread and select "Pin thread" to
   pin it to the top of its project's thread list. Pinned state persists
   across sessions via localStorage. A small pin icon indicates pinned
   threads.

2. Search threads by ID — the Command Palette (⌘K) now matches against
   thread IDs in addition to titles, so pasting a copied thread ID finds
   the thread instantly. A sidebar filter input (filter icon next to
   Projects header) also supports filtering by ID or title, with results
   shown even in collapsed projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 15, 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: c73f4d24-5fe1-44d1-af7e-16fdcaed1558

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:L 100-499 changed lines (additions + deletions). labels Apr 15, 2026
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 5070275. Configure here.

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

macroscopeapp bot commented Apr 15, 2026

Approvability

Verdict: Needs human review

This PR introduces two new user-facing features: pinned threads and thread filtering by ID/title. While the implementation is frontend-only and well-scoped, new features introducing new UI workflows and state management warrant human review to ensure the behavior meets product expectations.

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

When a thread filter query is active, all matching threads are already
rendered. Skip the preview limit so hasOverflowingThreads is false and
hiddenThreads is empty, preventing a no-op "Show more" button and
misleading hidden-thread status indicator.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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