fix(mapgen-studio): add rAF backstop timeout to prevent viz commits being starved in backgrounded documents#1623
Merged
Conversation
This was referenced Jun 12, 2026
refactor(studio): decompose App.tsx non-React corpus into feature modules and shared utilities
#1608
Merged
Merged
Merged
|
Railway preview (MapGen Studio): not provisioned for this PR. Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.
Debug: |
This was referenced Jun 12, 2026
Owner
Author
This was referenced Jun 12, 2026
This was referenced Jun 12, 2026
Merged
mateicanavra
force-pushed
the
design/explore-toolbar
branch
from
June 12, 2026 20:44
e6c9f01 to
d3e932c
Compare
mateicanavra
force-pushed
the
design/first-run-visibility
branch
from
June 12, 2026 20:44
5521a62 to
77ea346
Compare
Owner
Author
Merge activity
|
mateicanavra
changed the base branch from
design/explore-toolbar
to
graphite-base/1623
June 12, 2026 21:26
… commit backstop OpenSpec mapgen-studio-first-run-visibility. Diagnosis recorded in design.md: the invisible first run is NOT reproducible at tip from a clean slate — first- manifest auto-fit and selection fallbacks verified present and exercised (fresh-storage run renders framed matter, zero extra clicks). The one mechanism consistent with the original one-off is vizStore's rAF-only commit batching, which background tabs throttle indefinitely; requestCommit now pairs rAF with a 50ms timeout backstop (whichever fires first cancels the other). No camera or selection behavior changes. tsc + 144 tests + strict validation green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mateicanavra
force-pushed
the
design/first-run-visibility
branch
from
June 12, 2026 21:28
77ea346 to
5ddae8f
Compare
This was referenced Jun 12, 2026
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.

After a first run from an empty stage, the canvas could remain stuck on the "Awaiting matter" state even after the run completed and the footer showed "Ready". The root cause is that
vizStorebatches all commits — including streamed manifest updates — exclusively ontorequestAnimationFrame, and browsers throttle rAF indefinitely for hidden or backgrounded documents. This means viz events can sit uncommitted while non-rAF state like run status continues updating normally, producing a stale empty canvas.The fix adds a 50ms
setTimeoutbackstop alongside the existing rAF inrequestCommit. Whichever fires first commits the pending state and cancels the other. Foreground behavior is unchanged since rAF wins the race in visible documents; Node/test behavior is also unchanged since thesetTimeoutfallback path already existed for environments withoutrequestAnimationFrame.Camera fit and default layer selection were investigated as alternative causes and confirmed already correctly implemented — no changes were needed there.