forked from vhaudiquet/rhema-claw
feat(web/claw): list every key and control its dispatch
The sidebar listed only the resident prefixes. The phone's status keys, the coding jobs' `job:<instance>#<id>` keys and the forge threads were on the wire and invisible in the client: an operator watching a job fill a queue had no row to look at, let alone act on. *Others* now carries the whole inventory, folded to the working count as before and every row listed unfolded. A row the chat cannot open is a control row — the resident prefixes are the only ones with a transcript — so it renders as a disabled entry rather than a dead click-through, and it keeps the status dot, the held badge and the depth that every row has. Beside the delete button, on hover: `hold` posts the pause and the row badges `held` in the warn tone, `run` posts the resume, `stop` posts the abort. `stop` is disabled when there is neither a live turn nor queued work, so an idle row sends nothing instead of collecting a no-op answer. What the abort did reads in the notice — the turn stopped, N queued items dropped, or nothing running — straight from the answer's `cut` and `dropped`. An aborted turn renders in the warn tone too: cut by the operator, not failed, and unlike a steered turn nothing replaces it. The About page's route list gains the three, and the README's inventory and delete paragraphs follow the fold and the controls. nuxt typecheck and build pass; checked against a mock daemon on a seeded store, folded and unfolded, with a held row, a queued job and an aborted turn.
This commit is contained in:
1 parent
38292b6344
commit
dc269472eb
6 files changed
+224
-16
No files matched your search
+17
-5
@@ -128,11 +128,13 @@ Two consequences worth knowing before changing this code:
|
||||
- **Sessions are created in place.** The sidebar's `+` form posts
|
||||
`POST /v1/sessions` with a client-validated name
|
||||
(`[A-Za-z0-9._-]{1,64}`), switches the chat to the new key, and
|
||||
lets 400/409 land in the error banner. The inventory lists only the
|
||||
resident prefixes (`interactive:`, `task:`, `calendar:`) — the ones the
|
||||
message, event and history routes answer for. The phone's status keys
|
||||
(`phone:…`), the coding jobs' `job:<instance>#<id>` keys and forge keys
|
||||
stay out, and the full list stays on the wire.
|
||||
lets 400/409 land in the error banner. The interactive prefixes
|
||||
(`interactive:`) list above the fold; *others* holds the whole rest
|
||||
of the inventory — `task:`, `calendar:`, the phone's status keys
|
||||
(`phone:…`), the coding jobs' `job:<instance>#<id>` keys and forge
|
||||
keys. Only the resident prefixes have a transcript, so a row in
|
||||
*others* for anything else is a control row: no click-through, but
|
||||
the same pause/resume/abort and delete as every other row.
|
||||
- **Deleting a session is a decision, not a click.** The row's delete
|
||||
button only names the key; the shell's dialog spells out that the
|
||||
turn history goes with it, and `DELETE /v1/sessions/{key}` runs on
|
||||
@@ -141,6 +143,16 @@ Two consequences worth knowing before changing this code:
|
||||
error banner like every other refusal, and the chat moves to the
|
||||
first remaining session, the stream's watcher following the key so
|
||||
nothing keeps streaming a session that no longer exists.
|
||||
- **Every row is controllable.** Beside the delete button, on hover:
|
||||
`hold` posts `POST /v1/sessions/{key}/pause` and the row badges
|
||||
`held` — queued work accumulates and nothing dispatches until `run`
|
||||
posts the resume, both answered by the inventory's `paused` flag.
|
||||
`stop` posts `POST /v1/sessions/{key}/abort`: a live turn is cut
|
||||
(the stream closes on its `aborted` marker, in the warn tone, since
|
||||
nothing failed), and an idle key's queued work is dropped instead —
|
||||
the notice says which, from the answer's `cut`/`dropped`. A key with
|
||||
neither running nor queued work has `stop` disabled rather than
|
||||
sending a no-op.
|
||||
|
||||
## Layout
|
||||
|
||||
|
||||
Reference in new issue
Block a user