Skip to content

CL-6621: every workbench keeps its sidebar row - #303

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6621-sidebar-list
Aug 22, 2026
Merged

CL-6621: every workbench keeps its sidebar row#303
TheGreatAxios merged 2 commits into
mainfrom
cl-6621-sidebar-list

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

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, to
hide 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 a
stale 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
definitionId across deliberate creations) CL-6452 invalidated. If
stale 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 pass
  • Grepped for removed helpers (dropSupersededAgentChats,
    agentIdentityKey, isAgentChat) — zero remaining references
  • WORKBENCH_CHECK_SINCE=origin/main bun run typecheck — pass
  • WORKBENCH_CHECK_SINCE=origin/main bun run test — 848/848 pass
  • bun run lint — 0 errors

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.
@TheGreatAxios
TheGreatAxios merged commit 373c275 into main Aug 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant