Wall batching stays live in cutaway - #761
Merged
Merged
Conversation
Cutaway never changes wall geometry: WallCutout swaps each wall's material array by camera facing and stamps userData.wallHidden. The merged batch already released tinted walls per frame, so hidden walls take the same path — released the frame the stamp appears (WallCutout runs at priority 0, this system at 5), excluded from candidates and from the re-merge drift count, re-sewn at settle when they come back. Mode flips between up and cutaway no longer dispose every level; down, translucent and isolation still stand the batch down. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmmz2AMwTzcnKsSHHPEMhN
The panel's batch row covers node batching only; scripted runs had no way to tell whether the merged wall batch was live in a given wall mode. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmmz2AMwTzcnKsSHHPEMhN
|
I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…). Please try again, rephrase, or reach out if it keeps failing. Error id: 815fb384-88cf-4ca0-bcbb-565a4dc71626 |
Releasing on the hidden stamp covered only half the flip: when the stamp lifted nothing marked the level stale, so a wall that became visible again drew itself until an unrelated edit re-sewed the floor. Bugbot caught it; the parity probe confirmed it (rich-4× stayed at 172 batched walls after returning to full height, now 352). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmmz2AMwTzcnKsSHHPEMhN
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e264b67. Configure here.
They aliased the same Set, so tinted walls leaked into last frame's hidden set and read as stamp lifts every frame — the settle window never closed while anything was selected or hovered. Bugbot caught it. The regression test hovers one wall after a flip and expects the other eight to re-sew. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmmz2AMwTzcnKsSHHPEMhN
This was referenced Sep 4, 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.

Metric
Charter backlog 3c: idle frame cpu in cutaway should match the full-height number on the rich fixtures (the mode users edit in loads walls unbatched today).
What changes
Cutaway never changes wall geometry:
WallCutout(viewer,useFramepriority 0) swaps each wall's material array by camera facing and stampsuserData.wallHidden. The merged wall batch already released tinted walls every frame, so hidden walls take the same path — released the frame the stamp appears (this system runs at priority 5, same frame), excluded from candidates and from the re-merge drift count, re-sewn at settle when they come back. Mode flips between up and cutaway no longer dispose every level.down,translucentand isolation still stand the batch down.window.__wallBatch.stats()is exposed under?perfso scripted runs can read wall batch membership (the panel's batch row only covers node batching).Before / after (private
scripts/perf/run-scaling-matrix.ts, same machine, load avg 5–6)Wall mode is persisted per project, so only the rich fixtures load in cutaway. In-page probe on the PR build: cutaway batches 164 of the rich-4× walls (172 hidden), 82 on rich-2×, 160 on Maxi-4×; cutaway vs full-height frame cost within 5 % on all three; draws −350…−580 at the load pose.
Gates
bun test packages/nodes: 1888 pass. New unit coverage: hidden walls are not candidates, a batched wall is released the frame its stamp appears, hidden walls do not count toward the re-merge threshold, released walls re-sew once visible and settled.placement-preview-follows-cursorfails identically on base (pre-existing).Follow-ups (not here)
Camera flips still cost a re-sew at each orbit stop in cutaway; keeping hidden walls resident (or moving walls onto
NodeBatchStore) removes that. The rich-4× < 12 ms target needs ceilings + slabs coverage on top.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jmmz2AMwTzcnKsSHHPEMhN
Note
Medium Risk
Changes core rendering batching and cutaway interaction timing; mistakes could cause wrong walls drawn, missing picks, or hover glitches, though coverage is strong.
Overview
Wall merging now stays enabled in cutaway instead of tearing down every level batch on mode entry.
canBatchWallstreatscutawaylikeup;down,translucent, and isolation still suspend batching.Cutaway-hidden walls are handled like hover/selection releases: meshes stamped
userData.wallHiddenare skipped as batch candidates, released from the merged mesh the same frame the stamp appears (after WallCutout at priority 0), and excluded from the settle re-merge count so the batch can stay stable while most walls remain merged. When a stamp clears, the level is marked stale so visible walls re-sew after the usual settle window.Re-merge and candidate collection use a combined
excludedNodeIdsset (cutaway-hidden plus tinted walls).?perfsessions getwindow.__wallBatch.stats()for scripted batch metrics. Tests cover suspension rules, hidden candidates, per-frame release, settle behavior, visibility flip re-sew, and hover not blocking settle.Reviewed by Cursor Bugbot for commit b4f6706. Bugbot is set up for automated code reviews on this repo. Configure here.