68 lines
3.4 KiB
Markdown
68 lines
3.4 KiB
Markdown
> Historical agent handoff. The integrated composition and current test status are documented in `docs/FIRST-DEVICE-PROTOTYPE.md` and `docs/VALIDATION.md`. Proposed wiring below has been incorporated or superseded.
|
|
|
|
# iPhone experience handoff
|
|
|
|
`RemoteDemoView` owns the iPhone setup and touch-remote shell for workstream D.
|
|
It is intentionally wired to `DemoPhoneService` from `WristivoApp` and visibly
|
|
labels the entire flow as Demo mode. The fake does not open a socket, request a
|
|
real permission, persist a token, or claim that a TV changed state.
|
|
|
|
## Production wiring
|
|
|
|
The integrator should keep `PhoneExperienceService` as the UI boundary and
|
|
inject a `@MainActor` production composition from `WristivoApp`:
|
|
|
|
```swift
|
|
WindowGroup {
|
|
RemoteDemoView(service: productionPhoneExperienceService,
|
|
isDemo: false)
|
|
}
|
|
```
|
|
|
|
The production service should own the transport actor, token/trust repository,
|
|
and local-network permission request. Views should not gain protocol strings,
|
|
envelopes, tokens, addresses beyond the user-entered display value, or network
|
|
state. A successful command must remain a transport receipt, not TV confirmation.
|
|
|
|
The current initializer defaults `isDemo` to `true` for safe review. When live
|
|
composition is integrated, pass `isDemo: false`; the view model will then use
|
|
truthful live-service copy for pairing and command receipts.
|
|
|
|
## Fake-state UI checks
|
|
|
|
Run these checks in Preview or by constructing `DemoPhoneService` with the
|
|
listed scenario. These are UI/state checks, not hardware evidence.
|
|
|
|
1. Default `.success`: begin setup, enter any redacted local address, continue,
|
|
start pairing, verify the selected TV and touch remote appear. Press a
|
|
directional button and verify the notice says the action was recorded in
|
|
Demo mode and that no TV was contacted.
|
|
2. `.permissionDenied`: enter an address and continue. Verify the recoverable
|
|
local-network error and Try again action. No setup transition should occur.
|
|
3. `.networkUnavailable`: continue, start pairing, and verify the network
|
|
error. On the remote screen the same scenario returns an unavailable error;
|
|
verify no command is queued.
|
|
4. `.authorizationDenied` and `.timedOut`: verify pairing remains recoverable,
|
|
explains the failure, and does not show a selected TV.
|
|
5. On the remote screen, choose Forget this TV, cancel, then confirm. Verify
|
|
cancel preserves the selected TV and confirmation returns to setup.
|
|
6. With Larger Text and VoiceOver enabled, verify each remote action has a
|
|
distinct spoken label, the Demo banner is announced once, and all controls
|
|
remain at least 44 points tall. Check iPhone 13 Pro Max, the smallest
|
|
supported phone, and an iPad width; the content uses a bounded readable
|
|
column and adaptive action grid.
|
|
|
|
## Validation status
|
|
|
|
- `git diff --check`: passed.
|
|
- `swift test` in `Packages/WristivoKit`: blocked before test execution by the
|
|
sandbox's codesign error (`resource fork ... not allowed`) in generated test
|
|
bundles.
|
|
- iPhone `xcodebuild`: blocked before app compilation by unavailable
|
|
CoreSimulator and restricted host Swift/Clang cache paths. The integrator
|
|
should run the normal app build on the combined commit.
|
|
- Hardware/TV: untested. No physical TV or motion-recognition claim is made.
|
|
- Permissions/privacy: this UI adds no manifest entries and requests no camera,
|
|
location, tracking, or account access. The production service must add the
|
|
local-network usage description only when it is introduced.
|