Surface WAIT_USER and add Confirm to the browser client

Ports show_user_message() from client/brewpi_gui.py: a plain <dialog>
pops with the step's user_message the instant WAIT_USER is newly
entered (tracked via a prevState comparison in onSudChanged()'s State
branch), and sends {"Sud": {"Confirm": true}} on the dialog's close
event - covers both the OK button and Escape dismissal.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0189FkmyJkY77HqsNomr1DwV
This commit is contained in:
2026-06-25 00:21:49 +02:00
co-authored by Claude Sonnet 4.6
parent 83fd16e46c
commit 0e343655b7
5 changed files with 49 additions and 18 deletions
+12 -15
View File
@@ -7,22 +7,19 @@ flagged as deferred in the plan, or only noticed once the port was done
and checked against the Qt source side by side.
- [x] **No way to actually run a brew.** ~~There's no Start/Pause/Stop/
Confirm anywhere in `web/index.html`~~ Start/Stop are now wired up
(`btn-sud-start`/`btn-sud-stop` in `app.js`, gated by `updateSudActions()`
mirroring `update_sud_actions()`'s enabled/disabled logic). Still
missing: Pause, and `{"Sud": {"Confirm": true}}` - that one needs
`sudUserMessage`/`sudState` (next item) to know *when* it's actually
waiting on one.
Confirm anywhere in `web/index.html`~~ Start/Stop/Confirm are now wired
up (`btn-sud-start`/`btn-sud-stop` in `app.js`, gated by
`updateSudActions()` mirroring `update_sud_actions()`'s
enabled/disabled logic; Confirm via the `#sud-message-dialog` below).
Still missing: Pause - trivial to add the same way as Start/Stop
whenever it's actually needed.
- [ ] **`WAIT_USER` never surfaces to the user.** `sudUserMessage` is
tracked in `app.js` but nothing ever shows it - `show_user_message()`
(`client/brewpi_gui.py:877-882`) pops a modal the instant `WAIT_USER` is
newly entered (`prev_state != WAIT_USER`) and sends `Confirm` itself
when the user dismisses it. Needs the same "newly entered" edge
detection in `onSudChanged()`'s `State` branch (the `wasRunning`
tracking there is close, but checks running-vs-not, not specifically
the `WAIT_USER` transition) plus a modal (a plain `<dialog>` works,
no library needed) that sends `Confirm` on close.
- [x] **`WAIT_USER` never surfaces to the user.** `showUserMessage()`
pops `#sud-message-dialog` (a plain `<dialog>`, no library) the instant
`WAIT_USER` is newly entered (`onSudChanged()`'s `State` branch tracks
`prevState` for this), and sends `{"Sud": {"Confirm": true}}` on the
dialog's `close` event - covers both the OK button and Escape, mirrors
`show_user_message()` (`client/brewpi_gui.py:877-882`).
- [x] **No schedule management.** New/Load/Save are now wired up in
`app.js`: Load is `<input type="file">` + `FileReader` +