Commit 999136f
committed
feat(v7-f56b,f53): DimEnvEditor for live H/nh/head_dim mutation
vbgui/src/components/DimEnvEditor.tsx:
- Five-input row (H, nh, head_dim, B, S) + Apply button, rendered
above the canvas. Each input has data-testid='dim-env-{key}'.
- Inline mismatch indicator (data-testid='dim-env-inline-mismatch')
appears live as the user types — without waiting for Apply — when
nh*head_dim ≠ H. Renders "nh*head_dim = N ≠ H = M".
- Numeric inputs; non-finite drafts are ignored on Apply.
vbgui/src/App.tsx:
- MINI_DIM_ENV constant was previously inlined into 3 RPC call sites
(verify, suggest_sharding, buildVerifyParams default). Promoted
to dimEnv useState, fed back into wireSpecRef and into the verify
debouncer dep list (dimEnvKey) so a user mismatch immediately
re-runs verify and surfaces the F56b warning badge.
- Canvas wrapper switched to flexDirection='column' so the editor
stacks above FlowCanvas without occluding it.
- DimEnvEditor and the existing F56b badge co-render: the editor's
inline indicator surfaces *during* typing; the badge surfaces
*after* verify roundtrip completes.
vbgui/tests/DimEnvEditor.test.tsx — 5 unit tests:
- Inputs populate from value prop.
- Apply forwards parsed numeric draft.
- Mismatch indicator visible when nh*head_dim ≠ H.
- Mismatch indicator hidden when consistent.
- Indicator re-evaluates live (before Apply) on edit.
App.integration tests still pass 7/7; vitest total 12/12.
Unlocks F56b visual e2e (type mismatch into editor → assert badge)
and F53 scaling sweep (programmatic H ∈ {64,128,256,512} via Apply).
Ref: cppmega-mlx-j3qa.2, cppmega-mlx-j3qa.41 parent c970384 commit 999136f
3 files changed
Lines changed: 163 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
150 | 157 | | |
151 | | - | |
| 158 | + | |
| 159 | + | |
152 | 160 | | |
153 | | - | |
154 | | - | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
155 | 164 | | |
156 | 165 | | |
157 | 166 | | |
| |||
163 | 172 | | |
164 | 173 | | |
165 | 174 | | |
| 175 | + | |
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
| |||
227 | 237 | | |
228 | 238 | | |
229 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
230 | 244 | | |
231 | 245 | | |
232 | 246 | | |
233 | | - | |
| 247 | + | |
234 | 248 | | |
235 | 249 | | |
236 | 250 | | |
| |||
343 | 357 | | |
344 | 358 | | |
345 | 359 | | |
346 | | - | |
| 360 | + | |
347 | 361 | | |
348 | 362 | | |
349 | 363 | | |
| |||
626 | 640 | | |
627 | 641 | | |
628 | 642 | | |
629 | | - | |
| 643 | + | |
| 644 | + | |
630 | 645 | | |
| 646 | + | |
631 | 647 | | |
632 | 648 | | |
633 | 649 | | |
| |||
821 | 837 | | |
822 | 838 | | |
823 | 839 | | |
| 840 | + | |
824 | 841 | | |
825 | 842 | | |
826 | 843 | | |
827 | | - | |
| 844 | + | |
828 | 845 | | |
829 | 846 | | |
830 | 847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
0 commit comments