Watch: keep Recent past 10 behind an N more row with a full list, and settle all in one call
This commit is contained in:
1 parent
2a127327bf
commit
a5222e14e8
13 files changed
+384
-52
No files matched your search
+15
-7
@@ -39,21 +39,23 @@ register their token with the gateway as `production`, Debug builds as `sandbox`
|
||||
|
||||
`DemoGateway` serves fixture data shaped like the docs/api.md examples, and it reacts to writes:
|
||||
Allow moves a thread to working, a reply restarts a finished thread, and Settle hides a thread from
|
||||
the feed. One card carries a subagent's request, so its Allow goes to the subagent's thread. The SwiftUI previews use it,
|
||||
the feed. One card carries a subagent's request, so its Allow goes to the subagent's thread. Recent
|
||||
holds 14 threads, so the feed shows its first 10 and a "4 more" row. The SwiftUI previews use it,
|
||||
the pairing screen has a "Try the demo" button, and launch arguments open a screen directly:
|
||||
|
||||
```sh
|
||||
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 recent # full Recent list
|
||||
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, the multi-select question, the
|
||||
status screens, the subagent card and thread, Recent with Settle all, and a finished thread with
|
||||
Settle are rendered by `SnapshotTests` instead, which only run when given a directory:
|
||||
status screens, the subagent card and thread, Recent with Settle all and the "N more" row, the full
|
||||
Recent list, and a finished thread with Settle are rendered by `SnapshotTests` instead, which only run when given a directory:
|
||||
|
||||
```sh
|
||||
TEST_RUNNER_WC_SCREENSHOT_DIR=$PWD/screenshots xcodebuild -scheme WristCode \
|
||||
@@ -70,9 +72,15 @@ gateway puts its request on the parent's card and names it in `via`. The card sa
|
||||
<title> wants to run:" or "asks:", and the parent's thread screen shows the request first, labeled
|
||||
"From subagent". Every answer goes to the subagent's thread.
|
||||
|
||||
Settle clears a finished or failed thread from the feed, as in T3. Swipe a Recent row left, tap
|
||||
Settle all on the Recent header (completed threads only, failed ones stay), or tap Settle under
|
||||
Reply on the thread screen. A row leaves at once and comes back with the error if its call fails.
|
||||
Settle clears a finished or failed thread from the feed, as in T3. Recent keeps every finished or
|
||||
failed thread until it is settled, however old. The feed shows the newest 10, then an "N more" row
|
||||
that opens the full Recent list (`GET /v1/recent`, loaded when the screen appears).
|
||||
|
||||
Swipe a Recent row left, here or on the full list, or tap Settle under Reply on the thread screen. A
|
||||
row leaves at once and comes back with the error if its call fails. Settle all, on the Recent header
|
||||
and the full list, is one `POST /v1/recent/settle` for every completed thread in Recent, including
|
||||
those past the first 10. Failed threads stay. The completed rows leave at once, and the header says
|
||||
so when the call fails or some threads did not settle.
|
||||
|
||||
## Status and settings
|
||||
|
||||
@@ -112,7 +120,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, Status, and the mock B theme |
|
||||
| `Views/` | Pair, Feed, full Recent list, 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