Repository navigation
fix(copilot): block duplicate chat deletes and leave the open chat first - #10476
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
[Low impact] The PR appears safe to merge; no new actionable issues remain. SummaryMoves Copilot chat deletion into
waleedlatif1 accepted leaving a failed deletion unselected so it cannot interrupt a conversation started while deletion was pending. Reviews (3) · Last reviewed commit: "fix(copilot): prune drafts and invalidat..." · Reviewed by Greptile |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
f1a0063 to
c65c1d0
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
useDeleteCopilotChatmutation instead of a rawrequestJsoncall, and disables the trash action while a delete is in flight, so a double-click no longer sends duplicateDELETE /api/copilot/chat/deleterequestsonSuccessprunes the chat's persisted draft and returns the list invalidation for the workflow captured at mutate time, so cleanup survives a Panel unmount and the action stays disabled until the refreshed list drops the rowdeletedchat-status event removes that chat's detail query, and a still-mounted observer (or auto-select reopening it from the unchanged list) would refetch the deleted chatType of Change
Testing
bunx biome checkon changed fileslifecycle.test.tsandmothership/chat/stop/route.test.tspass (server untouched)Checklist
test-auditauthoring gate)