You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: First message in a chat outside the sidebar project filter resets the filter to All projects #33251
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
In the sidebar, set the project filter to a single project, e.g. Project A.
Start a new chat in another project, Project B (new-thread picker / Cmd+Shift+O, or a thread link).
Send the first message.
Expected behavior
The sidebar follows the chat I am working in: the filter switches to Project B (or at least adds B to the current selection), so I keep a focused, single-project list.
Actual behavior
The filter is reset to All projects and that choice is persisted, so the sidebar suddenly lists every thread of every project. I then have to reopen the filter menu and pick the project again, many times a day.
resolveSidebarRouteReveal (apps/web/src/components/sidebar/routeReveal.ts) reports widensScope when the routed thread is hidden by the current project scope.
Sidebar.tsx (~L1132-1149) then uses projectScopeKeys = [] and persists it with setPersistedProjectScopeKeys([]).
While the chat is still a draft the thread shell does not exist, so findThread returns undefined and nothing happens; the widening fires at the first send, when the shell arrives.
Proposal
Make the reveal target the thread's own project instead of clearing the scope, ideally behind a setting so both behaviors stay available:
Settings > Sidebar > When the open thread is outside the project filter:
Switch the filter to its project (proposed default)
Add its project to the filter
Show all projects (current behavior)
The project group key is already at hand in Sidebar.tsx: the group whose memberProjectRefs contains ${thread.environmentId}:${thread.projectId}. When no group matches, fall back to all projects as today.
Impact
Minor bug or occasional failure
Version or commit
0.1.8-nightly.20261109.4399 (code unchanged on main at c6ca605)
Environment
Linux (Lubuntu), desktop AppImage, default (non-boring) sidebar
Workaround
Re-select the project in the filter after each first message in another project. Locally I patch the minified renderer bundle so the effect persists [threadProjectKey] instead of [].
🤖 Claude Opus 5.5 responding on behalf of viicslen
Adding a project through the sidebar filter's Add project option also hits this. Adding the project leaves the filter alone. It opens a draft in the new project, though, and the first message sent there resets the filter to All projects through the same widensScope path.
Reproduced on main at 5c95c69 (web dev server, Replay (dev)):
Filter the sidebar to project A.
Filter menu → Add project → add folder B. The filter stays on A (sidebarProjectScopeKeys is [A]).
Send a message in B's draft. sidebarProjectScopeKeys becomes [].
Going by its description, #34062 (add the thread's project to the scope instead of clearing it) covers this case too. I haven't run that branch.
Activity
viicslen commentedon Nov 30, 2026
Note
🤖 Claude Opus 5.5 responding on behalf of viicslen
Adding a project through the sidebar filter's Add project option also hits this. Adding the project leaves the filter alone. It opens a draft in the new project, though, and the first message sent there resets the filter to All projects through the same
widensScopepath.Reproduced on
mainat 5c95c69 (web dev server, Replay (dev)):sidebarProjectScopeKeysis[A]).sidebarProjectScopeKeysbecomes[].Going by its description, #34062 (add the thread's project to the scope instead of clearing it) covers this case too. I haven't run that branch.