You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/backlog.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,30 @@ At the end: update design doc status → Implemented, update specs to match what
13
13
14
14
review builder page. do available options change when i make selections? hiding incompatiable things?
15
15
16
+
## 2 — Bug: `getBuildHash` omits `switchType`
17
+
18
+
`src/utils/assemblyStepFilter.ts` — `getBuildHash()` does not include `switchType` in the hash it computes. Changing switch type changes which assembly steps are shown (via `isStepRelevant`), but the hash stays the same, so saved progress is incorrectly preserved across the change instead of being reset.
19
+
20
+
Fix: add `switchType: choices.switchType` to the `relevantChoices` object in `getBuildHash`.
21
+
22
+
Test to update: `assemblyStepFilter.test.ts` → `getBuildHash > BUG: hash does not change when switchType changes` — flip the assertion from `toBe` to `not.toBe` once fixed.
23
+
24
+
## 3 — Bug: `isStepRelevant` ignores feature requirements of `false`
25
+
26
+
`src/utils/assemblyStepFilter.ts` — Feature requirements expressed as `false` (e.g. `{ features: { hotswap: false } }`, meaning "only show this step if hotswap is NOT enabled") are silently skipped. The guard `if (required && ...)` short-circuits on `false`, so the step is shown regardless of whether the feature is enabled.
27
+
28
+
Fix: change the guard to check both directions — hide the step if `required === true` and the feature is off, or if `required === false` and the feature is on.
29
+
30
+
Test to update: `assemblyStepFilter.test.ts` → `isStepRelevant > BUG: feature requirement of false is not enforced` — change `toHaveLength(1)` to `toHaveLength(0)` once fixed.
31
+
32
+
## 4 — Bug: `pcb-kit` case cost overwritten by `ergonomic-3d` layout
33
+
34
+
`src/utils/costCalculator.ts` — When `buildMethod === 'pcb-kit'` and `layout.formFactor === 'ergonomic-3d'`, the kit's included case cost ($40) is set first then silently overwritten to $20 by the ergonomic-3d check. The $40 drops out of the estimate without trace.
35
+
36
+
Decide intended behaviour: if the 3D layout requires a custom case that replaces the kit case, the overwrite is correct but should use `+=` or be made explicit. If the kit case cost should be preserved, guard the ergonomic-3d block with `if (!breakdown.case)`.
37
+
38
+
Test to update: `costCalculator.test.ts` → `calculateCost > case cost — ergonomic-3d layout > overwrites pcb-kit case cost` — update the expected value and remove the `// BUG` comment once resolved.
39
+
16
40
## 2
17
41
18
42
[vite:css][postcss]@import must precede all other statements (besides @charset or empty @layer)
0 commit comments