Skip to content

fix(qa): browser QA reaches the canvas past the first-run project chooser (#83) - #93

Merged
HaD0Yun merged 4 commits into
mainfrom
fix/issue-83
Sep 3, 2026
Merged

fix(qa): browser QA reaches the canvas past the first-run project chooser (#83)#93
HaD0Yun merged 4 commits into
mainfrom
fix/issue-83

Conversation

@HaD0Yun

@HaD0Yun HaD0Yun commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #83.

What was actually wrong

The reported symptom (a gizmo drag settled by a mid-drag hierarchy click persists the travel but records no undo entry) does not reproduce on main once the browser QA can actually reach the canvas. With the startup project chooser dismissed, verify-object-gizmo passes the case a selection change mid-drag commits the travel as exactly one entry on 8f0c5c7 and on this branch (Apple M4 Pro / ANGLE Metal, and Linux Chrome).

What made it read as red: since the startup project chooser landed (f84aaa0), a fresh QA profile opens the studio under a modal dialog. Its card takes the pointer, so the suite's X-arrow press landed on a dialog button (elementFromPoint = btn primary), no drag opened, and the history stayed put. The same dialog is why the gating qa-gizmo-click-through-browser and verify-camera-rail-browser jobs currently fail on main itself (run 33757683223).

Changes

  • tools/qa-browser.mjs: seeds a project session into the QA profile before the studio loads (written once into storage; QA_STARTUP_CHOOSER=1 keeps the chooser for suites that test it). DevTools startup deadline 10 s -> 30 s (QA_CDP_TIMEOUT_MS), since a cold runner has been timing out with zero checks run.
  • test/verify-object-gizmo.mjs: the mid-suite isolation sweep keeps the session key; the selection-change assertion now also requires future === 0.
  • src/App.jsx: selectHierarchy settles through storeRef.current (the live coordinator) rather than the render-captured binding — a hardening for the scene-switch case, no behaviour change in the reported scenario.

Evidence

  • verify-object-gizmo: 114 PASS / 10 FAIL on this branch and on main under the fixed wrapper; the 10 failures are the same pre-existing legacy cozyclay.scene.v1 persistence cases on both trees. The History: a mid-drag selection change commits travel without recording an undo entry #83 case is PASS.
  • qa-gizmo-click-through-browser, verify-camera-rail-browser, verify-project-menu-browser: all PASS locally with the fixed wrapper (macOS GPU and Linux SwiftShader).

Hierarchy clicks can outlive the render that supplied their callback after a scene switch. Resolve the scene history store from its ref at event time so an active gizmo travel is committed once and clears redo before selection changes.
Keep the before and after browser artifacts, build output, full runner output, and the merge handoff notes with the fix.
…hooser (#83)

Since the startup project chooser landed (f84aaa0), a fresh QA profile opens
the studio with a modal dialog over the viewport. Its card takes the pointer,
so every canvas press a suite dispatches lands on the dialog instead of the
gizmo, and the suite reads "nothing moved" as a regression: verify-object-gizmo
reported the #83 selection-change case red with history untouched, and on the
CI runner the gating qa-gizmo-click-through and verify-camera-rail jobs failed
on main for the same reason.

The wrapper now seeds a project session into the QA profile before the studio
loads (written once, into storage, so a suite that sweeps localStorage to test
a first-run path still gets one), and QA_STARTUP_CHOOSER=1 keeps the chooser
for suites that exercise it. The DevTools startup deadline also grows to 30 s:
a cold runner without a GPU process cache has been seen to need more than the
old 10 s, and that timeout reads as a suite failure with zero checks run.
The mid-suite sweep dropped every cozyclay.* key but the locale, which also
removed the project session the QA wrapper seeded, so the studio came back on
the first-run chooser for the drop-to-surface and lifecycle sections. The
selection-change assertion now also requires the redo branch to be truncated
(future === 0), which is what the store contract promises for a settle.
@HaD0Yun
HaD0Yun merged commit adac987 into main Sep 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

History: a mid-drag selection change commits travel without recording an undo entry

1 participant