Watch: status, environment and notifications screens
A gear on the feed opens a status overview that leads with what is wrong: offline hosts, hosts on a fallback route, tokens expiring within 7 days, and push problems, with healthy hosts folded into one row. Each host opens its route ladder with Reconnect. The notifications page shows registration, the last push, Send test and Unpair. Demo mode gains a Laptop on its VPN fallback, and snapshot tests render the three screens.
This commit is contained in:
1 parent
9707daf1fe
commit
7ca0362745
17 files changed
+1063
-14
No files matched your search
+17
-4
@@ -45,10 +45,13 @@ the pairing screen has a "Try the demo" button, and launch arguments open a scre
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo # feed
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -thread littleman/t-next # thread
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -screen new # new thread
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -screen status # status overview
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -host laptop # one environment
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -screen notifications # notifications
|
||||
```
|
||||
|
||||
`screenshots/` holds the screens captured this way. The complication and the multi-select question
|
||||
are rendered by `SnapshotTests` instead, which only run when given a directory:
|
||||
`screenshots/` holds the screens captured this way. The complication, the multi-select question and
|
||||
the status screens are rendered by `SnapshotTests` instead, which only run when given a directory:
|
||||
|
||||
```sh
|
||||
TEST_RUNNER_WC_SCREENSHOT_DIR=$PWD/screenshots xcodebuild -scheme WristCode \
|
||||
@@ -58,6 +61,15 @@ TEST_RUNNER_WC_SCREENSHOT_DIR=$PWD/screenshots xcodebuild -scheme WristCode \
|
||||
|
||||
In demo mode the complication shows the demo counts too.
|
||||
|
||||
## Status and settings
|
||||
|
||||
The gear at the top left of the feed opens the status overview (`GET /v1/status`). It leads with
|
||||
"All connected" or "Needs attention", lists only the issues worst first (offline hosts, a host on a
|
||||
fallback route, tokens expiring within 7 days, push problems), and folds the healthy hosts into one
|
||||
row. Each host opens its route ladder with Reconnect. The Notifications row shows whether this watch
|
||||
is registered, the last push, Send test, the gateway, and Unpair. Each screen loads once when it
|
||||
appears; nothing polls.
|
||||
|
||||
## Complication
|
||||
|
||||
`WristCodeWidget` shows how many threads wait on you, from `GET /v1/summary`, in the circular,
|
||||
@@ -87,6 +99,7 @@ To add it: long-press the watch face, Edit, swipe to Complications, pick a slot,
|
||||
| `Auth/DeviceStore.swift` | Device token and gateway URL in the shared Keychain group |
|
||||
| `Shared/SharedState.swift` | Demo flag and last summary in the shared Keychain group, for the complication |
|
||||
| `Demo/DemoGateway.swift` | In-memory gateway with fixtures |
|
||||
| `Views/` | Pair, Feed, Thread, New thread, and the mock B theme |
|
||||
| `Notifications/NotificationHandler.swift` | Categories `approval`, `finished`, `failed`, `input`, `host` and their actions |
|
||||
| `Views/` | Pair, Feed, Thread, New thread, Status, and the mock B theme |
|
||||
| `Views/StatusReport.swift` | What the status overview says: headline, issues worst first, healthy hosts |
|
||||
| `Notifications/NotificationHandler.swift` | Categories `approval`, `finished`, `failed`, `input`, `host`, `test` and their actions |
|
||||
| `../WristCodeWidget/` | The complication: timeline provider, and one view per family |
|
||||
Reference in new issue
Block a user