nodes: stop tracking elevator dirty state - #599
Conversation
Aymericr
left a comment
There was a problem hiding this comment.
Reviewed against the current architecture and tested on the PR head plus a local merge with current main. The definition correctly opts out a renderer-driven kind with no dirty consumer; focused dirty-tracking/elevator tests (7) and the nodes dependency typecheck pass. Ready to merge after the maintainer's local release smoke.
|
Thank you, @JimmyZheng-ZJU. This was a small diff backed by a precise diagnosis: elevator nodes were entering the shared dirty queue without any geometry, floor-placement, or legacy consumer that could clear them. The regression test makes that ownership rule durable. I completed the final architecture and current- Merging this now. Credit for the contribution remains with Jimmy-Zheng in the squash commit and PR history. |
What does this PR do?
Stops renderer-driven elevator nodes from entering the shared
dirtyNodesrebuild queue. Elevators have nodef.geometry,capabilities.floorPlaced, or legacy dirty consumer, so scene-load and mutation marks were never cleared and the performance HUD remained atDIRTY 1 (1 elevator). The definition now uses the existingdirtyTracking: falsecontract, with a regression test covering both the declaration and scene-load-stylemarkDirtybehavior.How to test
bun test packages/core/src/store/use-scene-dirty-tracking.test.ts packages/core/src/store/use-scene-elevator-migration.test.ts packages/core/src/systems/elevator packages/nodes/src/elevator/definition.test.ts; expect 17 passing tests.bun test packages/nodes/src; expect 946 passing tests, 1 skipped, and 0 failures.bunx turbo run build --filter=@pascal-app/nodes...andbun run check; expect the Core, Viewer, and Nodes builds plus Biome checks to pass.Screenshots / screen recording
N/A — internal dirty-queue scheduling fix; no editor UI or elevator geometry output changes.
Checklist
bun devbun checkto verify)mainbranchNote
Low Risk
Narrow change to dirty-queue bookkeeping for one node kind; no auth, data, or elevator geometry/rendering logic changes.
Overview
Sets
dirtyTracking: falseon the elevator node definition so scene-load and mutationmarkDirtycalls no longer leave elevators in the shareddirtyNodesqueue.Elevators have no geometry rebuild or other dirty consumer that clears those marks, which previously kept the perf HUD at DIRTY 1, blocked idle-frame detection (elevator
def.systemcounts as pending work), and skewed post-processing scheduling. A newdefinition.test.tsasserts the flag and that registeredmarkDirtydoes not retain the elevator id.Reviewed by Cursor Bugbot for commit 39c59ac. Bugbot is set up for automated code reviews on this repo. Configure here.