Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 tasks done
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.
Primary change type
Problem and motivation
When Start Terminal emitted a session status update before its HTTP response, the conversation remounted and aborted that request. A real PTY started, but the pane returned to Assistant and attached again.
Summary and scope
Keep one conversation and Studio-keyed Terminal operation owner through dormant, starting, ready and exited states. Settle the explicit request before showing its latest Terminal state. Natural Terminal exit also preserves selected Assistant focus and drafts. Existing account, navigation, lifecycle and End guards still reject stale operations.
Related work
Related issue: https://linear.app/sapiom/issue/SAP-3292
Depends on #1040. Native stack target: main.
Validation
108 browser cases passed: 86 Continue/End/history/portable Terminal, 14 chat/focus/draft/lease and 8 saved Terminal record. The new held starting/ready response, failed startup and End race cases pass; deliberately restoring the remount made the regression fail. Frontend TypeScript, explicit four-file ESLint and diff checks passed. A fresh non-mock full workspace build passed.
The actual built browser → Studio server → corrected native → real PTY flow then passed in 14.60 seconds: one paused continuation/seed, one model request only after Send, same-ID paused Resume, Start HTTP200 with one PTY and zero extra Assistant attachment/history, and selected two-engine End while a sibling survived. All four native processes and the PTY were confirmed absent after cleanup. This is source-built E2 with loopback fixture services, not signed activated production E3.
Tests and documentation
Added three realistic status-before-acknowledgement regressions. Made the End-before-attach fixture deterministic under React StrictMode; retained stale-lease/no-conversation assertions. Updated natural-exit focus/draft expectations and assistant-history.md. Increment: 327 changed lines including tests/docs/changeset.
pnpm pr:sizeis absent in this SDK; measured the incremental Git diff.Compatibility and release impact
Security
AI assistance
Checklist
Visual verification
These fixture images show the action states before and after the held Start response. The fixture Terminal is blank; the actual PTY proof follows separately.
The 14-second actual browser/native/PTY flow uses the built SPA and real Studio server with the corrected candidate, isolated account/model fixtures and a real bash PTY. It covers Continue, explicit Send, End, paused Resume, explicit Start Terminal and final End. This is E2 source verification; production activation and signed installed E3 remain separate.