GeezerVison is showing github.com — fix(web): opening a hidden chat adds its project to the sidebar filter by juliusmarminge · Pull Request #34062 · pingdotgg/t3code
Conversation
Cause: when the routed thread was hidden by the sidebar project filter, resolveSidebarRouteReveal reported widensScope and Sidebar.tsx replaced the scope with [] and saved it with setPersistedProjectScopeKeys([]). That wiped the user's filter. A draft has no sidebar row, so the reset fired on the first send, when the draft became a real thread with a row. Fix: resolveSidebarRouteReveal (apps/web/src/components/sidebar/routeReveal.ts) now also takes the chosen scope keys and the pickable project groups, and returns scopeKeys. When it widens, that is the current scope plus the project group that holds the thread. It falls back to [] (all projects) only when no pickable group holds the thread, e.g. an archived project, so the reveal still always shows the routed row. Sidebar.tsx renders that scope and its existing reveal effect saves it, reading the stable joined projectScopeKey so the effect does not re-run on each new array. No new regex or parser. The bug was not reproduced or checked in a browser in this step. The reporter's repro on the same commit pins down the cause in code, and the new unit cases fail on main.
Fixes #33251
Reproduction on main
Commit d756fed (origin/main). Web dev client from T3CODE_DEV_SEED=0 vp run dev on a fresh worktree database. Created two git repos, projA and projB, added both with t3 project add, and started one Replay (dev) thread in each. In the browser: (1) set the sidebar project filter to projA; the saved sidebarProjectScopeKeys became [projA] and the sidebar listed only projA's thread. (2) Pressed Ctrl+Shift+O and picked projB; a draft opened at /draft/ titled 'What should we build in projB?' while the filter still showed projA. (3) Chose the Replay (dev) 'Showcase' model, typed a message and pressed Enter. Within about 3 seconds the route changed to the real thread URL, sidebarProjectScopeKeys in the saved UI state was [], the filter button label changed from 'Filter threads by project: projA' to 'Filter threads by project' (value 'all'), and the sidebar listed threads from projB, projA and the unrelated server project.
Evidence
Same steps on both commits: seed projA and projB with an existing replay chat each; open projA's chat; filter the sidebar to projA; press Ctrl+Shift+O and select projB; send the first message in its draft; reopen the filter after the response.
Environment for every capture: real web dev client, Linux Chromium, dark appearance, 1280×800 CSS viewport, separate fresh database with automatic seeding disabled. Directory labels and streaming details containing paths are masked for privacy; the sidebar remains visible.
Both final stills passed a pixel-identical comparison between screenshots taken 500 ms apart.
Scripts: browser driver, synthetic seed, privacy mask.
AI-assisted; verified with the tests and tools listed above.
Not shown:
- Desktop and mobile were not exercised; this proof covers the reported web reproduction.
- Existing-thread route reveals, grouped projects across environments, and the fallback for a thread outside every scopable project were not exercised; the captured scenario uses two local projects and a draft's first send.
Tests
cd apps/web && vp test run src/components/Sidebar.logic.test.ts -t RouteReveal: 7 passed. These are the existing resolveSidebarRouteReveal cases updated for the new inputs, plus a new case for the fallback to all projects. The 'adds the project' assertion fails on main. vp test run src/components/sidebar/routeReveal.browser.test.tsx: passed, after installing Playwright's chromium-headless-shell. vp run check:changed: all pass (format, lint, knip 1/2 and 2/2, typecheck of 2 packages, tests for 8 files, react compiler). Its first run failed on a missing Playwright browser and on lint/format of my first draft, both fixed.
Not in this change
- The issue also suggests switching the filter to only the thread's project rather than adding it. I chose to add it, the less destructive of the two options the issue allows, and did not make it configurable.
- When the hidden thread's project is archived or otherwise not pickable, the reveal still widens to all projects, as before.
AI-assisted; verified with the tests and tools listed above.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
When the routed thread was hidden by the sidebar project filter, the route
reveal replaced the scope with all projects and saved that, so the first send
in a draft from another project cleared the user's filter. The reveal now adds
the thread's project group to the current scope, and widens to all projects
only when no scopable project holds the thread.
Fixes #33251
AI-assisted; verified with the tests and tools listed above.
Approvability
Verdict: Approved at c49d51b
Macroscope's review found this PR approvable — Opening a hidden chat now adds its project to the sidebar filter while preserving previously selected projects. The change is limited to adjustable UI state and retains the existing all-projects fallback.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Hidden-thread route reveals now resolve a project scope from the thread’s project group when available. The sidebar persists that resolved scope instead of always clearing the project filter.
Changes: Sidebar route reveal
| Layer / File(s) |
Summary |
Resolve project scope for route reveals apps/web/src/components/sidebar/routeReveal.ts, apps/web/src/components/Sidebar.logic.test.ts |
The resolver returns the existing scope when widening is unnecessary. When widening is needed, it adds the matching project group key, or returns an empty scope if no group matches. Tests cover these cases. |
Persist the resolved sidebar scope apps/web/src/components/Sidebar.tsx |
The sidebar passes the current scope and project groups to the resolver. When a route reveal widens scope, it persists the returned scope and reruns the effect when the resolved scope changes. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- pingdotgg/t3code#33533: Adds configurable route-reveal behavior for switching the sidebar to a thread’s project.
- pingdotgg/t3code#24816: Introduces the route-reveal resolver and tests scope widening for hidden threads.
- pingdotgg/t3code#25234: Implements route reveal by widening scope when the active thread is hidden by the project filter.
Suggested labels: bugfix
Suggested reviewers: maria-rcks, macroscopeapp
Merge Risk: Minimal · up to c49d5
-
The sidebar is intended to add a hidden thread’s project to the current filter, with an all-projects fallback. No concrete issue has been established that prevents merging after normal checks.
Pre-merge checks: 3 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Description check |
 |
The description explains the problem, the change, reproduction steps, evidence, and focused test results. It does not provide the required scope and approval information: a maintainer approval or an e… |
Add the maintainer approval and link to the approved discussion, or explain why this focused fix qualifies without prior approval. Also add the AI model and harness used, or clarify that no agent was used. |
Passed checks: 3 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly summarizes the main change: opening a hidden chat adds its project to the sidebar filter. |
| Linked Issues check |
 |
Issue #33251 allows adding the routed thread’s project to the current filter. resolveSidebarRouteReveal now adds the matching pickable project group to scopeKeys, and it falls back to [] when no… |
| Out of Scope Changes check |
 |
All changes support issue #33251. Sidebar.tsx and routeReveal.ts implement the filter behavior and persistence. The Sidebar.logic.test.ts changes validate the added scope and all-projects fallba… |
Full details: Linked Issues check
-
Explanation
Issue #33251 allows adding the routed thread’s project to the current filter. resolveSidebarRouteReveal now adds the matching pickable project group to scopeKeys, and it falls back to [] when no group matches. Sidebar.tsx renders and persists that scope. The updated tests cover both outcomes. The issue describes a configurable setting as an ideal proposal, not a required coding objective.
Full details: Out of Scope Changes check
-
Explanation
All changes support issue #33251. Sidebar.tsx and routeReveal.ts implement the filter behavior and persistence. The Sidebar.logic.test.ts changes validate the added scope and all-projects fallback. No unrelated changes appear in the reviewed diff.
Full details: Description check
-
Explanation
The description explains the problem, the change, reproduction steps, evidence, and focused test results. It does not provide the required scope and approval information: a maintainer approval or an explanation of why this focused bug fix qualifies without prior approval. It also says the work used an AI agent but does not identify the model and harness as requested by the template.
Resolution
Add the maintainer approval and link to the approved discussion, or explain why this focused fix qualifies without prior approval. Also add the AI model and harness used, or clarify that no agent was used.
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- 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 9cd7a04 and c49d51b.
Files selected for processing: 3
-
apps/web/src/components/Sidebar.logic.test.ts
apps/web/src/components/Sidebar.tsx
apps/web/src/components/sidebar/routeReveal.ts
Limit details: You’ve used all 10 included reviews currently available.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:M
30-99 changed lines (additions + deletions).
vouch:trusted
Author is trusted by repo permissions or the VOUCHED list.
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|