Surfaced by the clarity-review pass on the v0.1.0 release branch (B2). Do NOT apply for v0.1.0 — captured for post-launch.
src/components/ScramblerCard.svelte:36-38 carries two booleans (isFocused, isExpanded) whose only legal combinations are (false,false), (true,false), (true,true) — exactly the orbital → focused → expanded ladder spelled out in the comments at lines 416-429 and 442-445. isLifted is then derived.
A single cardState: 'orbital' | 'focused' | 'expanded' enum makes the three-state ladder explicit, makes isLifted = cardState !== 'orbital' a single read, and rules out the impossible (false, true) state by construction. Also simplifies the iframe gate added by #45 (it currently reads isLifted, which is the derived flag) and the toggle / close logic.
Files
src/components/ScramblerCard.svelte
- (call sites in tests / Storybook that initialize the card)
Surfaced by the clarity-review pass on the v0.1.0 release branch (B2). Do NOT apply for v0.1.0 — captured for post-launch.
src/components/ScramblerCard.svelte:36-38carries two booleans (isFocused,isExpanded) whose only legal combinations are(false,false),(true,false),(true,true)— exactly the orbital → focused → expanded ladder spelled out in the comments at lines 416-429 and 442-445.isLiftedis then derived.A single
cardState: 'orbital' | 'focused' | 'expanded'enum makes the three-state ladder explicit, makesisLifted = cardState !== 'orbital'a single read, and rules out the impossible(false, true)state by construction. Also simplifies the iframe gate added by #45 (it currently readsisLifted, which is the derived flag) and the toggle / close logic.Files
src/components/ScramblerCard.svelte