fix(qa): browser QA reaches the canvas past the first-run project chooser (#83) - #93
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-gizmopasses the casea selection change mid-drag commits the travel as exactly one entryon8f0c5c7and 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 gatingqa-gizmo-click-through-browserandverify-camera-rail-browserjobs 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=1keeps 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 requiresfuture === 0.src/App.jsx:selectHierarchysettles throughstoreRef.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 legacycozyclay.scene.v1persistence 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).