Add Sud New/Load/Save and Start/Stop to the browser client
Ports on_action_sud_new/_save/_load() and on_action_sud_start/_stop() from client/brewpi_gui.py: Load/Save stand in for the native file dialogs with <input type="file">/FileReader and a Blob/<a download>, New sends the same hardcoded empty-doc Load, and Start/Stop are gated by updateSudActions() mirroring update_sud_actions()'s enabled/disabled logic. Also fixes the status line's step number being one below what the Progress tab's plates show for the same step (same bug just fixed in the desktop client). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0189FkmyJkY77HqsNomr1DwV
This commit is contained in:
+12
-16
@@ -6,15 +6,13 @@ Everything below is what that v1 pass deliberately left out - either
|
||||
flagged as deferred in the plan, or only noticed once the port was done
|
||||
and checked against the Qt source side by side.
|
||||
|
||||
- [ ] **No way to actually run a brew.** There's no Start/Pause/Stop/
|
||||
Confirm anywhere in `web/index.html` - `on_action_sud_start()`/
|
||||
`on_action_sud_pause()`/`on_action_sud_stop()` (`client/brewpi_gui.py:
|
||||
868-875`) are one-line `{"Sud": {"Start"/"Pause"/"Stop": true}}` sends,
|
||||
trivial to add as buttons; `{"Sud": {"Confirm": true}}` already needs
|
||||
- [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. Until this exists, the Progress tab can only watch a
|
||||
run started from the desktop GUI (or a raw `Sud.Start` send from the
|
||||
browser console) - it's read-only.
|
||||
waiting on one.
|
||||
|
||||
- [ ] **`WAIT_USER` never surfaces to the user.** `sudUserMessage` is
|
||||
tracked in `app.js` but nothing ever shows it - `show_user_message()`
|
||||
@@ -26,14 +24,12 @@ and checked against the Qt source side by side.
|
||||
the `WAIT_USER` transition) plus a modal (a plain `<dialog>` works,
|
||||
no library needed) that sends `Confirm` on close.
|
||||
|
||||
- [ ] **No schedule management.** Matches README.md's "Browser client"
|
||||
section, called out there as deliberately deferred rather than missing
|
||||
by oversight - `on_action_sud_new/_save/_load()`
|
||||
(`client/brewpi_gui.py:884-912`) use native file dialogs `web/` has no
|
||||
equivalent of yet. Load maps to `<input type="file">` +
|
||||
`FileReader`+`{"Sud": {"Load": ...}}`; Save to a `Blob`+`<a download>`
|
||||
of whatever the next `Json` push contains; New is just the same
|
||||
hardcoded empty-doc `Load` Qt sends, no dialog needed at all.
|
||||
- [x] **No schedule management.** New/Load/Save are now wired up in
|
||||
`app.js`: Load is `<input type="file">` + `FileReader` +
|
||||
`{"Sud": {"Load": ...}}`; Save sends `{"Sud": {"Save": true}}` and
|
||||
downloads (`Blob`+`<a download>`) whichever `Json` push answers it
|
||||
(tracked via `sudSavePending`, mirroring `brewpi_gui.py`'s
|
||||
`sud_save_path`); New sends the same hardcoded empty-doc `Load` Qt does.
|
||||
|
||||
- [ ] **No temperature-controller state/cooldown indicator.** Qt shows
|
||||
the raw FSM state (`label_state.setText(msg['State'])` - e.g.
|
||||
|
||||
Reference in New Issue
Block a user