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
{{ message }}
Repository navigation
fix(view3d): old view reports a scramble step that ends after the cube was replaced #85
In the existing 3D view on main (2a84c77), a scramble step that ends after the shown cube was replaced (for example by choosing "Solved cube" during a running scramble) is still reported to the app via onTurnStateChange. The app couples that late report to the new source (src/client/scannerAppView.tsx:483, setTurnedCube({ source: baseCube, … })). The move history stays empty, but the app cube is not the solved cube.
Found in the independent review of #83 (A4, round 2): measured on the old view with 4x4/5x5, turn-ms 200, "Solved cube" clicked during a scramble: the app cube was not solved in 14 of 24 tries (browser, SwiftShader; not measured on real GPU). The new PuzlWerk view in #83 closes the same class with a generation counter; the old view is not part of that PR.
Scope
Drop (do not report) a turn that ends after the source, size or shown cube changed in the old view (useCubeTurns and the scramble loop), with a test that fails on the current behaviour.
No change to the move or sound behaviour otherwise.
Done when
A unit or e2e test reproduces the late report on the current code and passes after the fix (12 or more tries in e2e, or a controllable fake player in unit).
Activity