fix(video3d): ignore slower first library confirm - #239
Merged
IAnMove merged 1 commit intoSep 7, 2026
Conversation
Paging clears the in-flight opening lock without bumping generation, so a later Open scene could lose to the first fetch and replace the current project (wiping undo). Advance generation on each confirm and on page changes. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
PR Review — Loreframe StudioRisk: low Automated review from Findings
Changed files
CONTRIBUTING checklist
Posted by the repo PR review workflow. Re-runs on each push to the PR. |
Code healthQuality score: 54.6/100Higher is better. The score is a trend dashboard; the independent ratchet below remains the CI gate.
Change vs PR base: +0.0 points.
Markdown, JSON catalogs and tests are out of this table. Only Most complex functions
Trend vs baseline
Warnings
Ratchet passed. |
IAnMove
marked this pull request as ready for review
September 7, 2026 20:20
Author
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_0838bf2f-6d12-4359-a246-4a54051c5084) |
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.
Resumen ejecutivo
Qué cambia
Si el usuario confirma una escena de la biblioteca, pagina a otra y confirma esa, ya no puede ganar el fetch más lento de la primera. La confirmación más reciente es la que abre el proyecto.
Para qué sirve
#233/#236 evitan un open tardío después de Cancel, pero no invalidan un open anterior cuando el usuario cambia de página. Paginar limpia el candado
openingy deja dos fetches con la misma generación. El primero en terminar llama aimportSceney borra el undo.Impacto para el usuario
Elegir la escena equivocada, pasar de página y abrir la correcta ya no sustituye el proyecto actual por la primera.
Riesgo
Estado
Summary
SceneLibraryDialog.openItemcapturedgenerationRefwithout advancing it. The listuseEffectclearsopening(andselected) on page change, so a second confirm can start while the first fetch is still in flight. Both captures share the same generation/workspace/purpose;commitLibraryChoicethen accepts whichever fetch settles first while the dialog is still open.importScenewipes undo.Trigger: Open scene A → Next page (opening lock cleared) → Open scene B → A's JSON arrives first → current project is replaced with A and B is ignored.
Overview
Each confirm now bumps generation before capture, so a later Open scene invalidates any in-flight open. Pagination buttons bump generation the same way tab changes already do, so browsing away from a pending open does not apply it.
Detailed changes
Backend
Unchanged.
UI and Wizard
SceneLibraryDialog.openItemincrementsgenerationRefbefore capturing live stategenerationRef(same pattern as the tab buttons)Data, provenance and compatibility
No persistence or catalog identity changes.
Files and ownership
ui/src/components/Sidebar/SceneLibraryDialog.tsx— generation bumpsui/tests/sceneLibraryDialog.test.tsx— slower first fetch vs later confirmsceneLibraryChoice.tscontract,SceneAnimatorPanel.importSceneValidation
Date (UTC): 2026-09-07
Base SHA:
661d241c01a74740ae07cab016e503ba7cfbae4a(origin/development)Head SHA:
404ffde0964c19258cf84cfc699e3f474fc6666fValidation scope: focused
python scripts/verify_clean_repo.pypython -m compileall -q app/services app/launch.py scriptsFocused Python tests: N/A (UI-only)
cd ui && npm run i18n:checkUI tests:
npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/sceneLibraryDialog.test.tsx tests/sceneLibraryChoice.test.mjs— 5 passedcd ui && npm run lint -- --max-warnings=0on the touched files — passcd ui && npm run buildgit diff --check— cleanE2E/smoke checks: N/A (race is covered by the gated-fetch unit test)
Code quality
main: pending CICI and review
CI of this HEAD: pending
Independent agent review of this HEAD: pending
Human merge click (operational, not code review): pending
Reviewed at current HEAD
Earlier review; HEAD has changed since (stale)
Pending
Unavailable
Coste de la tarea
Notes and limitations
The race needs overlapping scene JSON fetches. The unit test gates both responses; no live compositor session was used.
Follow-up work
#235 (remote catalog identity on Tools picks) remains open. #232 (stale compositor layer binds) stays rejected.
Checklist
Note
Low Risk
UI-only invalidation logic in the scene library dialog; no auth, persistence, or API contract changes.
Overview
Fixes a race in the 3D scene library where confirming one scene, paging away, and confirming another could still load the first scene if its JSON returned after the second fetch started (pagination clears
opening, so both requests could share the same generation).SceneLibraryDialognow bumpsgenerationRefat the start of each Open scene confirm and on previous/next page clicks (matching tab switches), socommitLibraryChoicedrops stale in-flight opens and only the latest choice can callonOpenScene/ wipe undo.Adds a unit test that gates two overlapping scene fetches and asserts the later confirm wins when the slower first response arrives last.
Reviewed by Cursor Bugbot for commit 404ffde. Configure here.