Skip to content

feat(web): sidebar shelf for open pull requests linked to unsettled threads - #19132

Closed
NullVoxPopuli wants to merge 1 commit into
pingdotgg:mainfrom
NullVoxPopuli:feat/sidebar-active-pull-requests
Closed

NullVoxPopuli wants to merge 1 commit into
pingdotgg:mainfrom
NullVoxPopuli:feat/sidebar-active-pull-requests

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Oct 13, 2026 •

Copy link
Copy Markdown

Problem

The PRs button in the sidebar footer shows every PR on every repo my threads touch.
I want the PRs my active threads have linked, and nothing else.

Each of my threads has subagents, and often a few related worktrees, so it's hard to tell which PR belongs to which thread.
Right now the only way to find out is to hover each thread's PR badge.

Change

This PR adds a collapsible "Pull requests" section to the sidebar, under Working / Snoozed / Settled.
It lists the open PRs linked from my active threads, and clicking one jumps to its thread with the PR open in the right panel.

The section works like the other ones: collapsed by default, remembers open/closed in localStorage, and shows a count while collapsed.

What shows up:

  • open PRs linked from pinned, active, working, and snoozed threads (settled threads are skipped)
  • links that haven't synced yet count as open, same as the badges
  • stack-dismissed links are hidden, same as the badges
  • a PR linked from more than one thread shows once
  • most recently updated first

Clicking a row goes to the thread and opens the PR in the right panel, same as clicking a thread's PR badge.
Cmd/ctrl+click opens it on GitHub.
If the PR's repo doesn't match a project in that thread's environment, the click opens the link instead (same fallback the badge has).

It reads the pullRequests already on the shell, so there are no new subscriptions, RPCs, or contract changes.
The section is hidden when there are no open PRs, and while searching threads.

Files
  • collectSidebarOpenPullRequests in apps/web/src/components/Sidebar.logic.ts picks, de-dupes, and sorts the PRs
  • apps/web/src/components/sidebar/SidebarPullRequestsShelf.tsx renders the section
  • Sidebar.tsx feeds it the unsettled threads and renders it after the thread list

Not in this PR: mobile.

Scope and approval

This is a new feature, and there's no approved Ideas discussion for it yet.
Happy to open one, or close this if it's not the direction you want.

Verification

Before:

After:

sidebar-pull-requests-shelf.webm

🤖 Generated with Claude Code (Claude Opus 5.5)

…hreads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 Oct 13, 2026
@NullVoxPopuli

Copy link
Copy Markdown
Author

each of my conversations/threads has sub-agents, and often multiple related worktrees, so I'm hoping that this linked PRs thing would allow me to more easily find which PR belongs to which conversation

@NullVoxPopuli

Copy link
Copy Markdown
Author
sidebar-pull-requests-shelf.webm

@NullVoxPopuli
NullVoxPopuli marked this pull request as ready for review October 13, 2026 20:40
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f12d4519-6488-4437-9a79-a50e3d9deb68
📥 Commits

Reviewing files that changed from the base of the PR and between 380bba3 and 2ed9e6a.

📒 Files selected for processing: 4
  • apps/web/src/components/Sidebar.logic.test.ts
  • apps/web/src/components/Sidebar.logic.ts
  • apps/web/src/components/Sidebar.tsx
  • apps/web/src/components/sidebar/SidebarPullRequestsShelf.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The sidebar now collects open pull requests from eligible threads and displays them in a collapsible shelf. The shelf supports pull-request navigation and activation of the associated thread.

Changes: Sidebar pull-request shelf

Layer / File(s) Summary
Collect and order pull requests
apps/web/src/components/Sidebar.logic.ts, apps/web/src/components/Sidebar.logic.test.ts
The collection helper keeps the first link for each pull request, excludes non-open snapshots, and sorts results by timestamp. Tests cover filtering, ordering, and deduplication.
Render and navigate from the shelf
apps/web/src/components/sidebar/SidebarPullRequestsShelf.tsx, apps/web/src/components/Sidebar.tsx
The sidebar collects links from pinned, active, working, and snoozed threads, then renders a persisted, collapsible shelf outside search results. The shelf displays pull-request details and activates the associated thread when link handling succeeds.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Sidebar
  participant collectSidebarOpenPullRequests
  participant SidebarPullRequestsShelf
  participant useOpenPrLink
  Sidebar->>collectSidebarOpenPullRequests: collect eligible thread links
  collectSidebarOpenPullRequests-->>Sidebar: return ordered pull requests
  Sidebar->>SidebarPullRequestsShelf: render pull requests and callbacks
  SidebarPullRequestsShelf->>useOpenPrLink: open selected pull-request link
  useOpenPrLink-->>SidebarPullRequestsShelf: return success
  SidebarPullRequestsShelf->>Sidebar: activate scoped thread when successful
Loading

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 2ed9e

No concrete issue remains that would prevent merging after normal checks.

Security architecture risk: 🔵 Low · up to 2ed9e

The feature adds a new way to find and open pull requests from the sidebar while retaining the existing link-opening and environment-selection safeguards. No confirmed security issue was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The changed surface is confined to web-client sidebar aggregation and rendering. The full PR comparison contains no changes to service interfaces, credentials, IAM, networking, deployment configuration, or the shared link-opening implementation.

Security Findings and Attack Paths

  • observed — No confirmed new attack path was identified: modified clicks preserve native anchor handling, while ordinary clicks use the existing capability- and environment-scoped in-app opening path or the established external-link fallback.

Trust Boundaries and Controls

  • observed — The selected thread identity is derived from the retained sidebar entry rather than from the URL. Project lookup is filtered to that thread's environment before the panel is opened, preserving the existing environment boundary for the normal in-app flow.

Resilience and Maintainability Implications

  • inferred — Rapid or failed navigation can leave a pull-request surface selected for its scoped thread before route completion, but the right-panel store keys state by scoped thread and pull-request surface identity. The supplied source does not establish a recovery policy for rejected or out-of-order router transitions.
Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the problem, implementation, behavior, verification, and scope. However, it states that maintainer approval or an approved Ideas discussion has not been obtained, and the requir… Add a link to the triaged issue or maintainer approval with the approval comment, or explain why this focused change qualifies for an exemption. Add clear before and after screenshots for the UI change. Keep the existing verification detail…
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: adding a sidebar shelf for open pull requests linked to unsettled threads.
Full details: Description check

Explanation

The description covers the problem, implementation, behavior, verification, and scope. However, it states that maintainer approval or an approved Ideas discussion has not been obtained, and the required before/after UI screenshots are missing. The description includes a screen recording, but it does not replace the required screenshots.

Resolution

Add a link to the triaged issue or maintainer approval with the approval comment, or explain why this focused change qualifies for an exemption. Add clear before and after screenshots for the UI change. Keep the existing verification details and state any remaining checks that were not run.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Thanks for submitting this. The new collapsible Pull requests shelf adds a sidebar workflow, and the description confirms it has no approved Ideas discussion, so it requires prior approval. Please bring the linked-PR discoverability problem to an Ideas discussion and obtain explicit direction and scope approval before requesting reconsideration.

@maria-rcks maria-rcks closed this Oct 14, 2026
@NullVoxPopuli

Copy link
Copy Markdown
Author

Prs are also a place to discuss these things

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.

2 participants