Commit e666ac8
fix(schedule6): import groupInput — the blur re-mask shipped inert (#291)
CI surfaced 16 Vitest unhandled errors, all one root cause: `commitRate` called
`groupInput` without importing it, so every blur threw a ReferenceError. The
throw landed AFTER `apply(rateInputsOf(form))`, so the rate itself updated and
the defect-291 fix looked correct in manual testing — only the re-mask was lost,
leaving `50000` unmasked beside a freshly formatted rate.
Nothing caught it. `tsc --noEmit` aborts on this repo's tsconfig (TS5107/TS6310)
before reading a single source file; eslint has no-undef off for TS, as standard;
and vite build uses esbuild, which does not type-check. An unhandled error in a
React event handler fails no test, so the suite stayed green.
Three failure-path assertions expected the unmasked value — they had encoded the
broken behaviour. Grouping on blur is the established convention here (schedule9,
schedule1OtherCosts, CommaNumberInput all assert it), so the expectations were
stale, not the fix.
Also adds a test that asserts the FIELD, not just the rate — mutation-verified to
fail with the original ReferenceError when the import is removed.
Separately, OtherAcceptableSubtotal becomes a type alias: Schedule3SubPage's
deriveSummary prop is `=> Readonly<Record<string, number | null>>` and TypeScript
grants an implicit index signature to a type alias but never to an interface.
That was a second error the broken type-check hid. Verified against an
origin/main baseline: zero type-error regressions in any file this branch
touches.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5fd9c17 commit e666ac8
3 files changed
Lines changed: 46 additions & 6 deletions
File tree
- frontend/src/components
- schedule3OtherAcceptableCosts
- schedule6
- __tests__
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
| |||
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
212 | 244 | | |
213 | 245 | | |
214 | 246 | | |
| |||
1172 | 1204 | | |
1173 | 1205 | | |
1174 | 1206 | | |
1175 | | - | |
| 1207 | + | |
1176 | 1208 | | |
1177 | 1209 | | |
1178 | 1210 | | |
| |||
1205 | 1237 | | |
1206 | 1238 | | |
1207 | 1239 | | |
1208 | | - | |
| 1240 | + | |
1209 | 1241 | | |
1210 | 1242 | | |
1211 | 1243 | | |
| |||
1227 | 1259 | | |
1228 | 1260 | | |
1229 | 1261 | | |
1230 | | - | |
| 1262 | + | |
1231 | 1263 | | |
1232 | 1264 | | |
1233 | 1265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments