diff --git a/docs/superpowers/specs/2026-10-07-scope-features-design.md b/docs/superpowers/specs/2026-10-07-scope-features-design.md index fd4dbc1..015bc49 100644 --- a/docs/superpowers/specs/2026-10-07-scope-features-design.md +++ b/docs/superpowers/specs/2026-10-07-scope-features-design.md @@ -78,7 +78,7 @@ These bind every task below and are not restated in each one. | `src/measure.hpp` / `.cpp` | `MeasureStatsAccum` (Welford) beside the existing result types. | | `src/plot_host.hpp` / `.cpp` | `kSearchMarks` cursors per row, created in `install()`, placed by a new `set_search_marks()`. | | `src/ui.cpp` | The trigger panel's type and parameter rows, the `Search` expander, the statistics toggle and second line, the chunk pump in the frame tick, and the four probes. | -| `src/session.cpp` | The new `TriggerConfig` fields and the statistics toggle. | +| `src/layout_store.hpp` / `.cpp` | One new `LayoutState` field: the statistics toggle. The trigger is not persisted today and is not persisted by this design. | | `tools/mock_udpstreamer.py` | `--glitch-at` / `--glitch-width` / `--quiet-at`. | | `README.md`, `docs/claude/*` | What was built, and the invariants it adds. | @@ -186,11 +186,16 @@ No plot instrument is added. The trigger level has never been drawn on the plot button (`src/ui.cpp:135`, `:1604`) — so a band needs no second ruler. `TriggerConfig` gains one `EventCondition` member; its `level` and `edge` replace the -`TriggerConfig` fields of those names, and every reader moves with them. The session file gains -the new keys **appended**, since the order is load-bearing -(`docs/claude/invariants-session-and-export.md`); a file without them loads as -`TriggerType::Edge` with the level, edge, hold-off, pre-% and mode it already carries, which is -exactly today's behaviour. No version bump, no migration. +`TriggerConfig` fields of those names, and every reader moves with them. + +**The condition is not persisted, because the trigger is not persisted.** `LayoutState` +(`src/layout_store.hpp:19-63`) carries the window, rows, calibration, colours, enabled signals, +the source, the math graphs and the measurements — and no trigger field at all; the trigger is +built from `--holdoff` and the panel's own defaults on every launch. Adding persistence for it +is a separate feature nobody asked for, and a session that silently restored an armed +pulse-width condition would be a surprise rather than a convenience. The only session key this +design adds is the measurements pane's **statistics toggle**, which belongs beside the +`measures` it governs. The level's existing default — the middle of the signal's declared range until the user edits it (`src/ui.cpp:2016-2054`) — applies to `Window` as a band about that middle, and `level2` @@ -423,7 +428,7 @@ instant. Both are permanent regression cases, like `--time-glitch-at`. ## Risks - **`TriggerConfig`'s `level`/`edge` move into `EventCondition`**, so every reader changes — - the panel, the session, the probes and the status line. Mechanical, but wide, and the + the panel, the probes and the status line. Mechanical, but wide, and the mitigation is that `Edge` behaviour must be bit-identical afterwards: the existing trigger probes are the regression test and are run before anything new is added. - **The scan's worst chunk is a latency the producer pays.** The chunk size is the one knob, it