Repository navigation
fix(mothership): cancel desktop tools a signed-out turn starts late, guard the shown-once license key - #8757
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 6 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…guard the shown-once license key - A turn's stream now binds to the session it started in. Its tool events can arrive after sign-out stops every desktop tool, and each one then gets an already-aborted lease instead of a fresh controller. A turn started after sign-in runs normally. - The generated license key counts as an unsaved change, so leaving the Licenses tab asks first, and confirming drops it.
…ounted in A send or reconnect still in flight at sign-out reaches the stream reader after the stop, so a per-reader capture took the new session. The surface now takes its session once at mount; signing out leaves or reloads every chat surface.
210ff35 to
5ac72c9
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
desktopToolSession(), held once peruseChatmount). Sign-out (stopAllDesktopTools) aborts that session and starts a new one. A send still pending at sign-out, or a reconnect of an old stream, delivers its tool events to a surface mounted before the stop, so each of them gets an already-aborted lease instead of a fresh controller. Signing out leaves or reloads every chat surface, so surfaces mounted after sign-in run normally, with no reset hook needed.effortin the chat response) and the effort pick's lifetime across the first-send composer swap already landed in fix(mothership): close a pre-aborted SSE stream, keep the new-chat effort across a failed first send #8754, with regression tests.Type of Change
Testing
desktop-tool-lifetimes.test.ts: leases from a surface mounted before sign-out, including on a stream it reads later, are aborted with the sign-out reason (fails with the session guard reverted), and a surface mounted after sign-out gets live leases.stores/index.test.tswas updated to the new interface.mothership.test.tsx(new): after generating a key, leaving is refused until confirmed, and confirming drops the key. Both tests fail on the pre-fix code.bun run lint,bun run type-check,bun run check:audits,docs-manifest:check, block registry check, and the home/settings/stores vitest suites. Rootbun run testpasses except two CPU-heavy tests that time out under local load (archive.test.ts,remark-plain-text.test.ts); this PR doesn't touch them.Checklist
test-auditauthoring gate)