okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
2b36e8a02
main
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
Fieldrows in beginner mode: context length, memory mode, image support, free-CPU policy, and others, each with a hint line and aSelect. - 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
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 fromabout 1.9 GBtoabout 2.4 GBand raises the trained-context warning in place.- Every field has equal weight. Context length and image support are not equally consequential, and the layout says they are.
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: readingengine.predictedshowed the saved config, so the line never moved./api/engine/validatenow accepts a draft and returns its prediction.- Expert mode is a wall. A table plus raw rows, with no grouping and no explanation of which values are safe.
- "Save & restart engine" is the only exit — restarting is heavy, and there is no "these settings apply to the next load" alternative.
- No diff against defaults. After changing three things it is impossible to see what is no longer recommended.
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
- 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. - A live "before → after" on the summary card whenever a value differs from the saved config, so a change is legible before committing.
- "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
- 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.
- 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
- 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.
- 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
| Interaction | Spec |
|---|---|
| Beginner ↔ Expert | Segmented thumb + panel cross-fade, --st-t-control |
| Impact line changing | Number-only cross-fade, --st-t-control; no layout shift — the row reserves the line |
| Revert to recommended | st-enter on the value, --st-t-control |
| Save enabled | Colour 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 tuningextended 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 12support, 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, 14in 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 21figure, and the host predicts the *draft* rather than the saved config — which 22is what makes the line a preview of the choice instead of a restatement of the 23status 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 26equally consequential, and the layout says they are. 273. ~~The consequence is not shown at the moment of change.~~ **Fixed** for the 28three beginner fields. The plan's own criterion — "a static line is a 29failure" — is what caught the first attempt: reading `engine.predicted` showed 30the saved config, so the line never moved. `/api/engine/validate` now accepts 31a draft and returns its prediction. 324. **Expert mode is a wall.** A table plus raw rows, with no grouping and no 33explanation of which values are safe. 345. **"Save & restart engine" is the only exit** — restarting is heavy, and there 35is no "these settings apply to the next load" alternative. 366. **No diff against defaults.** After changing three things it is impossible to 37see what is no longer recommended. 387. ~~No validation feedback in place.~~ **Fixed** for beginner mode: issues for 39the 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 52line that updates live: context length shows `≈1.9 GB of 24 GB`, memory mode 53shows what it trades. The Expected-effect card stays as the summary, not the 54only place the answer lives. 552. **A live "before → after" on the summary card** whenever a value differs from 56the saved config, so a change is legible before committing. 573. **"Modified from recommended" markers per field**, with a one-click revert on 58the 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) 62and *How it uses your computer* (memory, CPU policy). Nine flat rows is a 63list; two groups of four is a decision. 645. **Expert mode gets sections and a safety cue** — each group labelled, and any 65value outside the recommended band marked, so a dangerous number is visible 66rather than merely permitted. 67 68### Fluidity 696. **Apply-on-next-load becomes the default action**, with a separate, clearly 70marked "Apply now (restarts the engine)" for people who want it immediately. 71This removes the heaviest action from the critical path. 727. **Invalid values are marked in place** with the reason under the field, and 73the 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 87value 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.