docs(dashboard): document themed dialog system + graceful-stop checkbox
The dashboard now routes all confirms/prompts/error notices through the in-app themed dialog system (modal.js: themedConfirm / themedPrompt / themedToast) instead of native browser chrome, and the stop action carries a 'stop gracefully' checkbox that POSTs /kill/<name>?graceful=1. Document both in the web-ui reference, with the note that the backend quiesce is still being implemented so the graceful flag currently behaves as a hard stop.
This commit is contained in:
parent
3d15fcb409
commit
bf65345b83
1 changed files with 37 additions and 1 deletions
|
|
@ -755,7 +755,8 @@ per-agent actions and navigation links. Contents:
|
|||
- `journal logs →` — opens `/logs.html#agent?agent=<name>` so the
|
||||
operator lands directly in the AGENT log tab pre-filtered to this
|
||||
container, without having to pick an agent from the dropdown.
|
||||
- `DESTR0Y` / `PURG3` — destructive, each prompts for confirmation.
|
||||
- `DESTR0Y` / `PURG3` — destructive, each prompts for confirmation
|
||||
via the themed dialog (see **Themed dialogs** below).
|
||||
- `deployed:<sha> ↗` — present when the agent has a `deployed_sha`
|
||||
and the forge is reachable; links the deployed commit on the forge
|
||||
agent-configs mirror.
|
||||
|
|
@ -764,6 +765,41 @@ per-agent actions and navigation links. Contents:
|
|||
agent is stale. Banner pulses on each broker SSE event
|
||||
(`pulseBanner` with a 4s grace timer).
|
||||
|
||||
### Themed dialogs
|
||||
|
||||
All confirmations, prompts, and transient error notices use an
|
||||
in-app themed dialog system (`assets/modal.js`) rather than the
|
||||
browser's native `confirm()` / `prompt()` / `alert()` chrome, so
|
||||
they match the Catppuccin palette and can't be styled away by the
|
||||
OS. Three primitives, all built on the `openDialog` core:
|
||||
|
||||
- `themedConfirm({ message, danger, confirmLabel, checkboxes })`
|
||||
— a modal confirm that resolves to `null` on cancel or an object
|
||||
of checkbox states on confirm. Destructive actions pass
|
||||
`danger: true` (the confirm button turns red and the cancel
|
||||
button takes focus). Backdrop click and `Esc` both cancel.
|
||||
- `themedPrompt(...)` — a modal with a text input, resolving to the
|
||||
entered string or `null`.
|
||||
- `themedToast({ type, ... })` — a non-blocking toast (top-right,
|
||||
`info` / `error` / `ok`) for transient validation + action
|
||||
failures, so an error doesn't trap the operator behind a modal.
|
||||
Single-action errors auto-dismiss; bulk / partial-failure
|
||||
summaries are sticky (click to dismiss) so they aren't missed.
|
||||
|
||||
Every destructive run-state action (`ST0P`, `R3ST4RT`, `R3BU1LD`,
|
||||
`DESTR0Y`, `PURG3`, `M0V3`) routes through `themedConfirm`, on both
|
||||
the per-agent `⋮` menu and the bulk selection bar.
|
||||
|
||||
**Graceful stop** — the `■ ST0P` confirm dialog (per-agent and
|
||||
bulk) carries a `stop gracefully — let the agent finish its turn
|
||||
and flush state before the container stops` checkbox. When ticked,
|
||||
the action POSTs `/kill/<name>?graceful=1` (the bulk path appends
|
||||
the flag per-agent); unticked is today's instant hard stop
|
||||
(`/kill/<name>` with no query). NOTE: the per-agent quiesce is
|
||||
still being implemented (see the graceful-agent-stop tracker) — the
|
||||
flag is accepted now so the wire shape is stable, but the backend
|
||||
currently treats a graceful request the same as a hard stop.
|
||||
|
||||
### Topology tree
|
||||
|
||||
Container rows render as a forest, not a flat list — each agent
|
||||
|
|
|
|||
Loading…
Reference in a new issue