docs(mind): record guided groups and step gating (#16)

This commit is contained in:
Florian Schmidt
2026-11-16 16:49:47 +01:00
parent 381c7f555e
commit 04771b74a1
3 changed files with 6 additions and 4 deletions
+2
View File
@@ -18,5 +18,7 @@
- [2026-11-16] **Collapsible parameters (#13):** the form and each included group collapse (remembered via `uiPrefs.ts`). Collapsed, only missing required values and values changed from their default are listed as chips; untouched defaults are just counted, so the bar stays one line.
- [2026-11-16] **Icon (#14):** `apps/web/public/shellbook.svg` (mint notebook with `>_` on a dark tile) is the single source for favicon, top bar, sign-in, setup and README. The PNGs (192, 512, 180 apple-touch on a full dark square) are rendered from it with headless Edge; give the SVG fixed px sizes, since headless Edge enforces a minimum viewport width and `100vw` overshoots.
- [2026-11-16] **Self-update from Settings (#15):** the unprivileged service only writes `<data>/update-request`; root-owned `shellbook-update.path` (PathChanged) starts oneshot `shellbook-update.service` → fixed `/usr/local/sbin/shellbook-update`, output to `/var/log/shellbook-update.log`. Server reads `systemctl show --timestamp=unix` + log tail; UI polls through the restart and ignores runs that started before the request. Installs predating #15 need one CLI `shellbook-update` to get the units.
- [2026-11-16] **Guided text and groups (#16):** `::param{name=x}` places a parameter's input in the text (same value as the panel); `:::group{title collapsed}` is a presentational container that never gates. Core `groupInputs` gives its outline status (missing=orange, filled=green, optional/none=grey) from its fields, the params its steps/hosts reference and, for `::use` sections, the included params. Collapse state is per `path:title` in localStorage.
- [2026-11-16] **Step gating = values used (#16):** a step needs only its referenced params/runtime values, the required secrets its script reads (`$NAME`/`${NAME}`) and valid set secrets of its scope (all go to env). Unused required params no longer block it, so guided notebooks run step 1 before later values exist. `renderStep` is the only gate; server `prepareRun` dropped its scope-wide check.
## Archive
+1 -1
View File
@@ -15,7 +15,7 @@
- [2026-11-16] **Watcher timing tests:** full parallel test run on Windows delays fs events >100 ms; keep watcher test debounce/quiet windows generous.
- [2026-11-16] **HTTP errors:** server httpError messages (4xx/502/503) are user-facing and shown by the web client; 500 messages are not. Keep 4xx/502 messages free of secrets.
- [2026-11-16] **CJS named imports in the bundle:** `import { utils } from "ssh2"` passes Vitest but crashes `node dist/main.js`; import CommonJS packages via default export. `test/bundle.test.ts` starts the real bundle.
- [2026-11-16] **Capture defaults deadlock if required in the same scope:** a required param whose default waits for a capture of its own notebook blocks the step producing it. Make such params optional (e.g. `ctid: default "{{nextid}}"`).
- [2026-11-16] **Capture defaults (resolved by #16):** a required param waiting for a capture of its own notebook used to block the step producing it. Since steps are gated only by values they use, this only bites if the producing step references that param.
- [2026-11-16] **Bash tool heredocs with apostrophes fail** in this harness ("unexpected EOF"); write scripts to the scratchpad and run them instead.
- [2026-11-16] **Commas in YAML flow-mapping labels:** `{ label: Key (optional, else x) }` splits at the comma into a valueless key; quote such values. The parser now says so at the parameter line.
- [2026-11-16] **Stopping a background dev server task leaves its Node child running** on Windows (ports 8080/5173 stay taken); reuse it or kill the process.
+3 -3
View File
@@ -2,7 +2,7 @@
> Always-loaded. Everything else is on-demand. Update TOC when files change.
## Current Focus
- [2026-11-16] M0–M3 (#1–#4), UI-first follow-ups (#7–#10) and chained notebooks (#11: when/use/host, LXC + web-server templates) the UI/UX overhaul (#12) and collapsible parameters (#13) the app icon (#14) and self-update from Settings (#15) closed.
- [2026-11-16] M0–M3 (#1–#4), UI-first follow-ups (#7–#10) and chained notebooks (#11: when/use/host, LXC + web-server templates) the UI/UX overhaul (#12) and collapsible parameters (#13) the app icon (#14) self-update from Settings (#15) and guided text with groups (#16) closed.
- [2026-11-16] Open: #5/#6 need a real CT 501 deploy (bootstrap.sh one-liner, setup token, real SSH run, tmux terminal). Not yet verified in a real browser or against real OpenSSH.
## Invariants
@@ -15,7 +15,7 @@
- Everything doable from the web UI; files are storage, not the only way in.
## Table of Contents
- `architecture.md` — 17 entries — why custom app, stack, AI integration, workspace split, deploy/update, chained notebooks, template delivery, web UI shell, collapsible params, app icon, UI self-update
- `architecture.md` — 19 entries — why custom app, stack, AI integration, workspace split, deploy/update, chained notebooks, template delivery, web UI shell, collapsible params, app icon, UI self-update, groups/inline fields, step gating by used values
- `attempts.md` — 4 entries — marimo + marimo-pair trial and why it was dropped
- `open.md` — 2 entries — open design questions (sudo password, chat history)
- `gotchas.md` — 17 entries — integration foot-guns (CRLF, host-key events, tmux/systemd, env names, pct exec PATH, TUN, chat paths, watcher timing, capture-default deadlock, heredocs, YAML flow commas, orphaned dev servers)
- `gotchas.md` — 17 entries — integration foot-guns (CRLF, host-key events, tmux/systemd, env names, pct exec PATH, TUN, chat paths, watcher timing, capture defaults, heredocs, YAML flow commas, orphaned dev servers)