refactor(snapshot): one shared model for occluding system surfaces
Merged
SA
7h ago+159+159+012345678901234567890123456789-118-118-012345678901234567890123456789
Summary
Replace the parallel Android and iOS occluding-surface fields on SnapshotState (systemSurfaceOnly and iosSystemSurfaceBundleId) with one discriminated union systemSurface?: SnapshotSystemSurface. Closes #2489.
- Add
SnapshotSystemSurface(android-system-overlay|IosSystemSurfaceProvenance) inpackages/contracts/src/snapshot-model.tsand export it from the snapshot facade. - Replace
@agent-device/contracts/android-system-surface-disclosurewith@agent-device/contracts/system-surface-disclosure, routing both deferred capture disclosure and direct capture warnings throughsystemSurfaceDisclosure. - Keep Android wire metadata (
AndroidSnapshotBackendMetadata.systemSurfaceOnly), disclosure copy, andsurfaceBundleIdcomparison scoping unchanged.
Value
- Parallel
SnapshotStatesystem-surface fields: 2 -> 1 - Non-test lines reading platform-specific
SnapshotStatefields: 14 across 6 files -> 0 - Disclosure modules imported by
capture-disclosure.ts: 2 -> 1 - Diff: 24 files, +159/-118, zero new eager module imports
Validation
- Head
779c4cfb8:pnpm format,pnpm check:quick,layering,build,package,di-seams,fallow(0 issues),facade-surface(3/3),eager-closure-budgets+ baseline tests (948/948), and 96 contracts/snapshot/daemon test files (933/933) passed.
Reviewed with sol-loop: 2 rounds with gpt-6.2-sol. Sol verdict: approved.
Created with Claude Opus 5.5 and Gemini 4 Neon in T3 Code.

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.