Watch: activity line on working cards, All threads browsing, a thread's subagents, Load earlier, and markdown messages
This commit is contained in:
1 parent
abd2fd0e13
commit
d916bfbab5
21 files changed
+928
-46
No files matched your search
+32
-3
@@ -40,7 +40,9 @@ 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. Recent
|
||||
holds 14 threads, so the feed shows its first 10 and a "4 more" row. The SwiftUI previews use it,
|
||||
holds 14 threads, so the feed shows its first 10 and a "4 more" row. The working cards show
|
||||
activity lines, the Containerfile thread has two subagents, and "Fix hyprlock crash" has two older
|
||||
pages behind Load earlier. The SwiftUI previews use it,
|
||||
the pairing screen has a "Try the demo" button, and launch arguments open a screen directly:
|
||||
|
||||
```sh
|
||||
@@ -51,12 +53,14 @@ xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -screen recent
|
||||
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
|
||||
xcrun simctl launch <udid> org.gbrown.wristcode.watchkitapp -demo -screen threads # All threads
|
||||
```
|
||||
|
||||
`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 the "N more" row, the full
|
||||
Recent list, a finished thread with Settle, a running thread with Ask before acting, and New thread
|
||||
with its model list are rendered by `SnapshotTests` instead, which only run when given a directory:
|
||||
Recent list, a finished thread with Settle, a running thread with Ask before acting, New thread
|
||||
with its model list, the working cards' activity lines, All threads' hosts and a project's threads,
|
||||
a thread's subagents, and Load earlier with markdown are rendered by `SnapshotTests` instead, which only run when given a directory:
|
||||
|
||||
```sh
|
||||
TEST_RUNNER_WC_SCREENSHOT_DIR=$PWD/screenshots xcodebuild -scheme WristCode \
|
||||
@@ -83,6 +87,29 @@ and the full list, is one `POST /v1/recent/settle` for every completed thread in
|
||||
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.
|
||||
|
||||
## Activity, All threads and history
|
||||
|
||||
A working card shows the step the agent is on instead of its last message: a teal symbol for the
|
||||
kind (command, edit, search, web, subagent, thinking or tool), the text, commands and file names in
|
||||
monospace, and how long the step has run on the right. The time is worked out when the card renders,
|
||||
so it moves on with the feed's 10 s refresh. Nothing ticks between refreshes. A card falls back to
|
||||
the last message when the gateway names no step.
|
||||
|
||||
The feed's last row opens All threads: hosts from `GET /v1/projects` (offline ones dimmed), then a
|
||||
host's projects by title, then the project's threads from
|
||||
`GET /v1/projects/:hostId/:projectId/threads`, settled ones included. Each thread is one line with
|
||||
a status dot and its age, and opens the usual thread screen. Each screen loads when it appears.
|
||||
|
||||
A thread screen lists the thread's subagents under its messages, above Reply, each with a status
|
||||
word. A row opens that subagent's thread. When the thread has messages before the latest 20, Load
|
||||
earlier at the top fetches the page before them (`GET /v1/threads/:hostId/:threadId/history`), and
|
||||
the next tap uses the cursor that page returned. The 10 s refresh replaces only the latest window.
|
||||
Loaded pages stay, and a message shows once by id. Message text renders as markdown: bold, italics,
|
||||
inline code and links inline, headings in bold, list items as bullets, and fenced code in monospace.
|
||||
|
||||
Against a gateway older than these fields, the cards show the last message, and Load earlier and
|
||||
the subagents stay hidden.
|
||||
|
||||
## Status and settings
|
||||
|
||||
The gear at the top left of the feed opens the status overview (`GET /v1/status`). It leads with
|
||||
@@ -137,6 +164,8 @@ To add it: long-press the watch face, Edit, swipe to Complications, pick a slot,
|
||||
| `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, full Recent list, Thread, New thread, Status, and the mock B theme |
|
||||
| `Views/BrowseView.swift` | All threads: hosts, a host's projects, a project's threads |
|
||||
| `Views/Markdown.swift` | Message text as styled text |
|
||||
| `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