okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Merge f-clean-3 (321794636): docs and history (cleanup step 3, items 3.0-3.10); release manifest and capability table with checks, history/ with pointers, link check, tools/ split, bench index; owner OK'd the wording 11-082b36e8a02

main
4.5 KiB89 linesraw

03 · Engine tuning

Route #/tuning · File src/screens/Tuning.tsx (413 lines)

Where a beginner mode and an expert mode have to coexist without either feeling like a compromise. It is the most control-dense screen in the app.

What it is today

  • Beginner / Expert tabs — a segmented control.
  • Nine Field rows in beginner mode: context length, memory mode, image support, free-CPU policy, and others, each with a hint line and a Select.
  • An "Expected effect" side card — the consequences of the current settings, in plain language.
  • A pinned action — "Save & restart engine".
  • Expert mode — a settings table plus raw parameter rows.

Where it falls short

  1. No sense of scale. Fixed. The context field now carries the live figure, and the host predicts the draft rather than the saved config — which is what makes the line a preview of the choice instead of a restatement of the status quo. Verified: setting 128K changes the line from about 1.9 GB to about 2.4 GB and raises the trained-context warning in place.
  2. Every field has equal weight. Context length and image support are not equally consequential, and the layout says they are.
  3. The consequence is not shown at the moment of change. Fixed for the three beginner fields. The plan's own criterion — "a static line is a failure" — is what caught the first attempt: reading engine.predicted showed the saved config, so the line never moved. /api/engine/validate now accepts a draft and returns its prediction.
  4. Expert mode is a wall. A table plus raw rows, with no grouping and no explanation of which values are safe.
  5. "Save & restart engine" is the only exit — restarting is heavy, and there is no "these settings apply to the next load" alternative.
  6. No diff against defaults. After changing three things it is impossible to see what is no longer recommended.
  7. No validation feedback in place. Fixed for beginner mode: issues for the draft render above the fields they concern, toned by severity.

The plan

Substance

Two defects found in a design pass, both fixed. The model breakdown note was printed twice in the Expected-effect panel — once as a standalone line added in an earlier round, once in the notes list beneath it. And a long memory value wrapped after "of", leaving an orphaned "12 GB" on its own line; the measurement is now non-breaking, so the break falls before the figure. — consequence at the moment of choice

  1. Inline impact per field. Each row gains a muted right-hand consequence line that updates live: context length shows ≈1.9 GB of 24 GB, memory mode shows what it trades. The Expected-effect card stays as the summary, not the only place the answer lives.
  2. A live "before → after" on the summary card whenever a value differs from the saved config, so a change is legible before committing.
  3. "Modified from recommended" markers per field, with a one-click revert on the row. The drawer already has this pattern for sampling; reuse it.

Hierarchy

  1. Split beginner into two groups: What the model can do (context, images) and How it uses your computer (memory, CPU policy). Nine flat rows is a list; two groups of four is a decision.
  2. Expert mode gets sections and a safety cue — each group labelled, and any value outside the recommended band marked, so a dangerous number is visible rather than merely permitted.

Fluidity

  1. Apply-on-next-load becomes the default action, with a separate, clearly marked "Apply now (restarts the engine)" for people who want it immediately. This removes the heaviest action from the critical path.
  2. Invalid values are marked in place with the reason under the field, and the save action disables with a stated reason rather than failing on submit.

Motion

InteractionSpec
Beginner ↔ ExpertSegmented thumb + panel cross-fade, --st-t-control
Impact line changingNumber-only cross-fade, --st-t-control; no layout shift — the row reserves the line
Revert to recommendedst-enter on the value, --st-t-control
Save enabledColour and elevation only, --st-t-control. No movement

Verification

  • Assert every field renders a consequence line and that it changes when the value changes — a static line is a failure.
  • Assert "Save" is disabled with a visible reason when a value is invalid.
  • flow tuning extended to switch modes, modify a value, revert, and save.
1# 03 · Engine tuning
2
3**Route** `#/tuning` · **File** `src/screens/Tuning.tsx` (413 lines)
4
5Where a beginner mode and an expert mode have to coexist without either feeling
6like a compromise. It is the most control-dense screen in the app.
7
8## What it is today
9
10- **Beginner / Expert tabs** — a segmented control.
11- **Nine `Field` rows** in beginner mode: context length, memory mode, image
12  support, free-CPU policy, and others, each with a hint line and a `Select`.
13- **An "Expected effect" side card** — the consequences of the current settings,
14  in plain language.
15- **A pinned action** — "Save & restart engine".
16- **Expert mode** — a settings table plus raw parameter rows.
17
18## Where it falls short
19
201. ~~No sense of scale.~~ **Fixed.** The context field now carries the live
21   figure, and the host predicts the *draft* rather than the saved config — which
22   is what makes the line a preview of the choice instead of a restatement of the
23   status quo. Verified: setting 128K changes the line from `about 1.9 GB` to
24   `about 2.4 GB` and raises the trained-context warning in place.
252. **Every field has equal weight.** Context length and image support are not
26   equally consequential, and the layout says they are.
273. ~~The consequence is not shown at the moment of change.~~ **Fixed** for the
28   three beginner fields. The plan's own criterion — "a static line is a
29   failure" — is what caught the first attempt: reading `engine.predicted` showed
30   the saved config, so the line never moved. `/api/engine/validate` now accepts
31   a draft and returns its prediction.
324. **Expert mode is a wall.** A table plus raw rows, with no grouping and no
33   explanation of which values are safe.
345. **"Save & restart engine" is the only exit** — restarting is heavy, and there
35   is no "these settings apply to the next load" alternative.
366. **No diff against defaults.** After changing three things it is impossible to
37   see what is no longer recommended.
387. ~~No validation feedback in place.~~ **Fixed** for beginner mode: issues for
39   the draft render above the fields they concern, toned by severity.
40
41## The plan
42
43### Substance
44
45> **Two defects found in a design pass, both fixed.** The model breakdown note
46> was printed **twice** in the Expected-effect panel — once as a standalone line
47> added in an earlier round, once in the notes list beneath it. And a long memory
48> value wrapped after "of", leaving an orphaned "12 GB" on its own line; the
49> measurement is now non-breaking, so the break falls before the figure.
50 — consequence at the moment of choice
511. **Inline impact per field.** Each row gains a muted right-hand consequence
52   line that updates live: context length shows `≈1.9 GB of 24 GB`, memory mode
53   shows what it trades. The Expected-effect card stays as the summary, not the
54   only place the answer lives.
552. **A live "before → after" on the summary card** whenever a value differs from
56   the saved config, so a change is legible before committing.
573. **"Modified from recommended" markers per field**, with a one-click revert on
58   the row. The drawer already has this pattern for sampling; reuse it.
59
60### Hierarchy
614. **Split beginner into two groups**: *What the model can do* (context, images)
62   and *How it uses your computer* (memory, CPU policy). Nine flat rows is a
63   list; two groups of four is a decision.
645. **Expert mode gets sections and a safety cue** — each group labelled, and any
65   value outside the recommended band marked, so a dangerous number is visible
66   rather than merely permitted.
67
68### Fluidity
696. **Apply-on-next-load becomes the default action**, with a separate, clearly
70   marked "Apply now (restarts the engine)" for people who want it immediately.
71   This removes the heaviest action from the critical path.
727. **Invalid values are marked in place** with the reason under the field, and
73   the save action disables with a stated reason rather than failing on submit.
74
75## Motion
76
77| Interaction | Spec |
78|---|---|
79| Beginner ↔ Expert | Segmented thumb + panel cross-fade, `--st-t-control` |
80| Impact line changing | Number-only cross-fade, `--st-t-control`; no layout shift — the row reserves the line |
81| Revert to recommended | `st-enter` on the value, `--st-t-control` |
82| Save enabled | Colour and elevation only, `--st-t-control`. No movement |
83
84## Verification
85
86- Assert every field renders a consequence line and that it **changes when the
87  value changes** — a static line is a failure.
88- Assert "Save" is disabled with a visible reason when a value is invalid.
89- `flow tuning` extended to switch modes, modify a value, revert, and save.