Skip to content

♻️ Collapse projection layers — consume server types directly#147

Merged
Robdel12 merged 1 commit intomainfrom
mission/robdel12-orbitdock#119
Mar 24, 2026
Merged

♻️ Collapse projection layers — consume server types directly#147
Robdel12 merged 1 commit intomainfrom
mission/robdel12-orbitdock#119

Conversation

@Robdel12
Copy link
Owner

Summary

  • Remove SessionDetailSnapshotProjection and SessionStateProjection intermediary structs that only copied fields between server wire types and SessionObservable
  • SessionObservable now consumes ServerSessionState (snapshot) and ServerStateChanges (delta) directly via applyServerSnapshot() and applyServerDelta()
  • Remove dead Session mutation methods (applyProjection, applyTokenUsage, applyPendingApprovalSummary, etc.) and unused Session-based convenience initializers in Theme/CapabilityBadge
  • Net removal of ~700 lines of structural-copy boilerplate

Test plan

  • Full macOS test suite passes (all projection, status consistency, and existing tests green)
  • Preview/demo code paths updated to use populateFromPreviewSession()
  • Build compiles clean on macOS

Closes #119

…es directly

Remove SessionDetailSnapshotProjection and SessionStateProjection intermediary
structs that only copied fields between server wire types and SessionObservable.
SessionObservable now consumes ServerSessionState (snapshot) and ServerStateChanges
(delta) directly via applyServerSnapshot() and applyServerDelta().

Also removes dead Session mutation methods, unused Session-based convenience
initializers in Theme/CapabilityBadge, and updates preview/demo/test code.

Closes #119
@Robdel12 Robdel12 merged commit 8eaf312 into main Mar 24, 2026
2 checks passed
@Robdel12 Robdel12 deleted the mission/robdel12-orbitdock#119 branch March 24, 2026 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

♻️ Simplify Swift session state to consume server-driven session concerns

1 participant