CL-6621: every workbench keeps its sidebar row - #303
Merged
Conversation
The CL-6271 dedup heuristic collapsed same-agent chats onto the newest definitionId. Since CL-6452 clones a fresh definition per workbench creation, every workbench now looks like a stale sibling of the newest one, so it hid every workbench but one. These tests assert every row survives.
CL-6271 collapsed same-agent chats onto the newest definitionId to hide stale cross-tenant DM siblings. CL-6452 made workbench creation clone a fresh definition per workbench, invalidating that heuristic's premise: every workbench now reads as a stale sibling of the newest one, so only one workbench ever showed in the sidebar (CL-6621). Nothing was deleted server-side; the rows were always in Postgres. If stale cross-tenant DM siblings resurface, the fix belongs server-side at list time, not a client-side identity guess.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Creating a workbench made every other workbench vanish from the sidebar.
Root cause:
apps/web/src/shell/sidebar-rows.ts's dedup heuristic(CL-6271) collapsed same-agent chats onto the newest
definitionId, tohide stale cross-tenant DM siblings. Since workbench creation began
cloning a fresh definition per workbench (CL-6452), every workbench now
has a distinct
definitionId, so the heuristic could no longer tell astale sibling from a deliberately created workbench — it treated every
workbench but the newest as a stale sibling and hid it.
Verified against live Postgres: 12 workbenches exist, each with a
distinct
chat/definitionId; the sidebar showed only 1.Nothing was deleted server-side — the rows were always in Postgres.
This PR removes a client-side identity heuristic whose premise (shared
definitionIdacross deliberate creations) CL-6452 invalidated. Ifstale cross-tenant DM siblings resurface (the original CL-6271 case),
the fix belongs server-side at list time, not a client-side identity
guess.
Test plan
bun test apps/web/src/shell/sidebar-rows.test.ts— 8/8 passdropSupersededAgentChats,agentIdentityKey,isAgentChat) — zero remaining referencesWORKBENCH_CHECK_SINCE=origin/main bun run typecheck— passWORKBENCH_CHECK_SINCE=origin/main bun run test— 848/848 passbun run lint— 0 errors