CL-6459: Keep every deliberately created agent workbench in the sidebar - #186
Merged
Merged
Conversation
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.
+ New Workbenchappeared to replace the existing Myra row instead of adding one.dedupeAgentChatsByTitle(CL-6271) collapsed all agent-DM chats by the agent's mention handle, keeping only the most recently active row per handle. Sinceinstant-agent-create.tsmints every new workbench as a chat against the bench's setup agent, every workbench a person created with that agent shared one handle — so the newest one took over the single "Myra" row and the rest vanished from the sidebar. The data was always right; only the row projection was lossy.definitionIdis the discriminator: "+ New Workbench" always mints against the bench's own currently resolved definition, so N deliberate creations share one definition id, while CL-6271's cross-tenant leftover carries a different one. Per agent identity the most recently active chat now names the live definition, and only chats under some other definition — genuine superseded siblings — drop out. Every chat of the live definition keeps its row.Tests: N workbenches against one definition each keep a row; a stale ancestor sibling drops without taking the live definition's workbenches with it; CL-6271's original collapse and CL-6413's same-title/different-handle case are unchanged.
Fixes CL-6459