Domain model alignment: D-13, D-15, test plans#289
Open
kirich1409 wants to merge 8 commits intomainfrom
Open
Conversation
Server was already sending stopped_at in SessionResponse but Swift client silently discarded it. Adds stoppedAt: Date? with CodingKey "stopped_at" and updates domain-model.md §7 to mark D-13 closed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RemoteTerminal.state was an untyped String while the domain model defines TerminalState with starting/running/stopped values. Adds TerminalState enum following the SessionState/ProjectState pattern with safe fallback decoder (.stopped on unknown value). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
D-14: Profile.id — mark as MVP acceptable (name-based identity) D-15: TerminalState enum — mark as closed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers gaps in CloudEntitiesTests: RemoteTerminal, TerminalState, RemoteSession.stoppedAt, ServerCredential.defaultImage, image resolution chain §5, and FK regression cases (15 TCs total). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers gaps in existing 11-client-ui.md: worktree selection → session directory, PTY isolation between worktrees, Open Terminal availability by session state, and tab persistence across project navigation. Spec source: domain-model.md §2-4. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TC-12: session with open terminal → active tab switches TC-13: session without terminal → no auto-open (explicit action required) TC-14: tab switch → sidebar selection syncs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers client-side VT state preservation on session switch: - Remote scrollback/snapshot on tab switch (TC-16, TC-18) - Accumulated output while tab was inactive (TC-17) - VT state isolation between sessions (TC-19) - Local PTY process continuity across tab switches (TC-20, TC-21) - Auto-reconnect VT restore after network loss (TC-22) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tests run in Relay scheme (RelayTests host): - stoppedAt decodes from JSON, nil when absent, roundtrip (D-13) - TerminalState all values + unknown fallback (D-15) - RemoteTerminal full decode, sessionId FK, roundtrip (D-2/D-15) 9 tests, all passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Domain model alignment pass based on acceptance check against
docs/architecture/domain-model.mdv1.0.Code fixes
stoppedAt: Date?toRemoteSession(CodingKey"stopped_at"). Server was already sending this field; Swift client silently discarded it.TerminalStateenum (starting/running/stopped) with safe fallback decoder. Replaces untypedstate: StringinRemoteTerminal, following theSessionState/ProjectStatepattern.Spec updates
docs/architecture/domain-model.md§7 — D-13 and D-15 marked closed; D-14 (Profile.id) documented as MVP-acceptable (name-based identity until server-side profile persistence is introduced).Test plans (new files)
docs/testplans/domain-model-compliance-test-plan.md— 15 TCs covering gaps inCloudEntitiesTests:RemoteTerminaldecode,TerminalStateenum,RemoteSession.stoppedAt,ServerCredential.defaultImage, image resolution chain §5, FK regression.docs/testplans/terminal-tab-switching-test-plan.md— 22 TCs + 5 edge cases covering terminal navigation not in11-client-ui.md: worktree→session directory, PTY isolation, session-switch tab activation, VT state persistence on switch, auto-reconnect restore.Not changed
RemoteSession.profile: SessionProfile?— flagged as spec drift (profile belongs to Terminal per §2), but actively used bySessionListFeaturefor display name. Removing requires Terminal-based profile resolution first.Test plan
xcodebuild buildpasses (verified locally, all commits)stoppedAtis additive optional — backward-compatible decoderTerminalStateunknown value falls back to.stopped, no throwstate: StringtoRemoteTerminaldirectly — REST decoding only🤖 Generated with Claude Code