refactor(snapshot): one shared model for occluding system surfaces across Android and iOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- android, ios, typescript
- Domain
- mobile-dev
Research direction
Start with SnapshotState and src/daemon/system-surface-disclosure.ts, then trace the Android systemSurfaceOnly and iOS iosSystemSurfaceBundleId producers and review the SnapshotState field checklist rules. Done means both platforms populate one shared optional system-surface model, disclosure derives from its kind, existing comparison behavior remains covered, and the current tests still pass.
Written by the indexing model from the issue text.
Description
Raised in #2448 review and deliberately filed rather than blocked on, because it is cross-platform scope.
The shape. SnapshotState now carries two parallel channels for the same concept:
systemSurfaceOnly?: boolean— Android: the capture is an occluding system surface (notification shade, quick settings) rather than app content.iosSystemSurfaceBundleId?: string— iOS: the capture is an in-place system surface (a web sign-in sheet,com.apple.SafariViewService) presented over the app.
withSystemSurfaceDisclosure (src/daemon/system-surface-disclosure.ts) then branches on which field is set to pick a platform-specific sentence. As the reviewer put it, that is a missing shared model, not a nit.
Why it matters beyond tidiness. Both fields answer the same two questions — "is this capture app content?" and "what should the agent be told?" — and every new consumer has to learn that the answer lives in two places with different types. The iOS side additionally needs the identity (which surface) because it feeds comparison refusal; the Android side only needs the boolean today, but the shade/quick-settings distinction is latent.
Rough direction (not prescriptive): one optional systemSurface?: { platform-neutral kind; identity? } that both producers populate, with the disclosure derived from the kind rather than from which field happens to be set. The Android boolean becomes the degenerate case. Wants a look at whether the Android systemSurfaceOnly producers can supply an identity cheaply, and at the SnapshotState field checklist rules before adding or replacing fields.
Not urgent. Both channels work and are tested today. This is about preventing a third platform from adding a third channel.
Context: #2448 added the iOS side; the Android side predates it.
- Dominant language
- TypeScript
- Stars
- 4.7k
- Forks
- 304
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 514
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstack/agent-device
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
callstack/agent-device#1869 ·
-
needs-triage
Difficulty 5/5 Over a week Newbie friendliness 32/100
callstack/agent-device#2948 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
callstack/agent-device#2946 ·
-
needs-triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
callstack/agent-device#2940 ·
-
bug ready-for-agent
Difficulty 5/5 Over a week Newbie friendliness 35/100
callstack/agent-device#2935 ·
All issues in callstack/agent-device
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
bcgov/bc-wallet-mobile#4761 · 1 comment ·
-
external-issue to-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
refactor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100