Skip to content

fix(web): going back from Pull Requests reveals the reopened thread in the sidebar - #48453

Open
StiensWout wants to merge 2 commits into
pingdotgg:mainfrom
StiensWout:wf/find-831a58e79a57ca096f156e0e
Open

StiensWout wants to merge 2 commits into
pingdotgg:mainfrom
StiensWout:wf/find-831a58e79a57ca096f156e0e

Conversation

@StiensWout

Copy link
Copy Markdown
Contributor

After opening Pull Requests from a thread, changing the sidebar's project filter, and pressing Back, the conversation reopened but its row stayed hidden because the sidebar never saw a route change: Pull Requests named no route for the reveal, so returning to the same thread looked like staying on it. The sidebar now keys its route reveal to sidebar utility pages (Pull Requests, Issues, Workflows, project pages), so coming back to a thread widens the project filter and reveals its row, as history already does for other routes.

Related: #40820, #24355, #43835, #39881, #46711, #48403

Reproduction on main

Commit e915e31bcf (main). The conversation reopens. The sidebar still shows only the other project, so the open thread has no visible row. Expected: The sidebar reveals the reopened thread, as it does when history opens a thread outside the current project filter.

  1. Open a thread in one of two projects.
  2. Click Pull requests in the sidebar.
  3. Filter the sidebar to the other project.
  4. Press the browser’s Back button.

The cause is at apps/web/src/components/Sidebar.tsx:1179. Ran pnpm scenarios:prove scripts/scenarios/history-reveals-thread-after-pull-requests.e2e.ts --target web with the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, with expect.toBeVisible failed in the output.

Evidence

Environment: The web app in Chromium on Linux x64, a fresh checkout on a boat.dev VM reset before each run.

Proven: the repro fails at the test commit 9abac69cd7 and passes on the head 8cad9c0af7, both on main e915e31bcf.

Before After
Commit 9abac69cd7 8cad9c0af7
Result ASSERTION_FAILED: expect.toBeVisible failed passed
thread reopened from pull requests Before: thread reopened from pull requests Before: thread reopened from pull requests (changed region)
The conversation reopens. The sidebar still shows only the other project, so the open thread has no visible row.
After: thread reopened from pull requests After: thread reopened from pull requests (changed region)
The sidebar reveals the reopened thread, as it does when history opens a thread outside the current project filter.
failure Before: failure
Recording Before: recording After: recording

Tests

  • 9abac69cd7 adds the failing test, alone, before the fix.
  • pnpm exec vp run check:changed e915e31bcf47ae8d9d9e9cace684d786c12c15b7 passed on head.

Not in this change

  • The empty chat index route still names no reveal route, so returning to a thread from it after re-scoping keeps the thread hidden.
  • No component-level browser test was added; the saved scenario is the regression proof.
  • Mobile has its own navigation and was not changed.

Who did the work

  • Repro written by GPT 6.2 Sol, in Codex
  • Duplicate check judged by Claude Opus 5.5, in Claude Code
  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by Claude Opus 5.5, in Claude Code, and by GPT 6.2 Sol, in Codex
  • Reproduction, checks and proof run by a program on base and head, not by an agent

Made in T3 Code by Claude Opus 5.5 and GPT 6.2 Sol

StiensWout and others added 2 commits December 3, 2026 22:19
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…n the sidebar

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Dec 3, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 8cad9c0

Macroscope's review found this PR approvable — Returning from Pull Requests and other utility pages now reveals the reopened thread using the sidebar’s existing scrolling and scope-adjustment behavior. The change is limited to client-side navigation presentation.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The sidebar now uses recognized utility-page paths in its route reveal key when no thread row or draft route is active. A new end-to-end scenario checks that a thread row reappears after navigating to Pull Requests, switching projects, and returning with browser back.

Changes: Utility route reveal

Layer / File(s) Summary
Utility route reveal key and navigation check
apps/web/src/components/Sidebar.tsx, scripts/scenarios/history-reveals-thread-after-pull-requests.e2e.ts
The sidebar uses the first matched utility-page path for the reveal key when no active row or draft route applies. The end-to-end scenario checks that the thread message and sidebar row appear after browser back navigation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • Issue 33251: Both changes involve sidebar route reveals and project scope. This diff adds utility-page reveal keys, but does not change the project-filter widening logic described in the issue.

Suggested reviewers: juliusmarminge, iamshadmantaqi

Merge Risk: Minimal · up to 8cad9

This change makes the sidebar reveal the reopened thread when you go back from Pull Requests after switching projects. It adds a regression scenario for that flow. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: going back from Pull Requests now reveals the reopened thread in the sidebar. It is specific, uses conventional commit format, and matches the objectives and the sideb…
Description check Passed The description follows the template. It states the problem with reproduction steps and expected behavior, explains the change to the sidebar route reveal, gives a scope rationale via related issues, …
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.
Full details: Title check

Explanation

The title names the main change: going back from Pull Requests now reveals the reopened thread in the sidebar. It is specific, uses conventional commit format, and matches the objectives and the sidebar route-reveal change in Sidebar.tsx.

Full details: Description check

Explanation

The description follows the template. It states the problem with reproduction steps and expected behavior, explains the change to the sidebar route reveal, gives a scope rationale via related issues, and includes detailed verification with before/after screenshots and recordings. It also notes what is out of scope and the authorship. The Scope section does not clearly state why no issue is linked for a bug fix, and it lists related issues without a clear primary issue, but these are minor gaps.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 88df74d and 8cad9c0.

Files selected for processing: 2

  • apps/web/src/components/Sidebar.tsx
  • scripts/scenarios/history-reveals-thread-after-pull-requests.e2e.ts

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant