From bf65345b831fe0effc40e7621dbdc4c0ab151567 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 19 Jun 2026 08:59:13 +0200 Subject: [PATCH] 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/?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. --- docs/web-ui/dashboard.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/docs/web-ui/dashboard.md b/docs/web-ui/dashboard.md index 9ce7fe58..4a77e131 100644 --- a/docs/web-ui/dashboard.md +++ b/docs/web-ui/dashboard.md @@ -755,7 +755,8 @@ per-agent actions and navigation links. Contents: - `journal logs →` — opens `/logs.html#agent?agent=` 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: ↗` — 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/?graceful=1` (the bulk path appends +the flag per-agent); unticked is today's instant hard stop +(`/kill/` 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