Skip to content

Editor general core step 5: settle, element in the app, scale to 50k - #1367

Merged
wass08 merged 53 commits into
mainfrom
feat/general-core-step5
Dec 5, 2026
Merged

wass08 merged 53 commits into
mainfrom
feat/general-core-step5

Conversation

@wass08

@wass08 wass08 commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Step 5 of the editor general core plan: visual settle on the house, the general element in the app, and scale to 50k elements.

What changes

5a, settle after an edit. A committed edit settles without fixed waits. A wall move rebuilds only the walls that join or leave a room (it was 54 walls, 40 of them twice). The batcher waits on events instead of timers.

5b, the element in the app. The step-4 fragments come from a public builder, open on a sample route, and their actions carry the class name ("Move column").

5c, scale. Elements and static items go through a render compiler:

  • Pages are shared per material in 128 m cells, with one identity table and stand-ins that keep the compiled nodes visible to every consumer (selection, outline, hover, paint, export, captures).
  • Geometry builds in workers kept in sync by patches. A worker that never starts hands its work to the main thread after 10 s, and small scenes stay on the main thread.
  • Loads are progressive and staged. Load publications are bounded; edits and undo publish atomically. Thumbnails and exports wait for the whole scene.
  • Culling uses the current camera against the eye and light frusta. The shadow implementation is unchanged.
  • The cached shadow map is kept only when a material swap provably cannot change the shadow.
  • The document scales to 50k elements (row patches, staged load), and autosave serializes off the main thread.
  • Element paint covers object, row and part scopes.

Results (lab, M5 Max, production build, contended host)

Scene Load Select Edit settle (geometry) Drag gap p95
syn-el-10k 2.8 s 57 ms 45–79 ms 17 ms
syn-el-50k 5.3 s 62 ms 114–261 ms 17 ms
House (1,224) 6.1 s — wall move 305 ms, undo 263 ms (were 750 ms) —
  • The idle editor draws nothing.
  • Fixed-pose screenshots match the pre-compiler build within run-to-run noise (under 0.2% of pixels).
  • While loading 50k elements, no task caused by the scene runs longer than about 80 ms (it was 4.5 s). What remains is editor startup: the React shell mount (about 100 ms) and canvas creation (78 ms).

Not met

  • House wall move and undo settle in about 300 ms against a 250 ms goal. The tail is the room daylight rebuild, which has to read the rebuilt walls.
  • Legacy wall and window scenes at 30k and 50k still don't settle; they need the step-6 migration to elements.

Review and verification

  • Each slice was implemented by one model and adversarially reviewed by another (Gemini Neon). Every P0 and P1 finding was fixed, with tests that fail when the fix is removed.
  • bun run ci is green.
  • The private suite passes against this head: 13,900 tests and the full private CI.

🤖 Generated with Claude Code

wass08 and others added 30 commits December 5, 2026 02:19
On the house, a wall move or undo kept changing the picture for about 770 ms after
commit, mostly behind fixed delays:

- Wall and node batches waited 180 ms quiet windows after committed edits, one after the
  other. They keep the window during drags and live previews and join on the next stable
  frame after release.
- Shadows waited for those batch swaps, which do not change the picture. They now wait
  for real geometry only (dirty nodes, wall neighbours, roofs); batch aggregates are not
  shadow bounds sources, so released slots cannot move the frustum.
- Committed wall edits and undo flushed neighbour and miter rebuilds after an 80 ms drag
  debounce. They now rebuild in the commit frame within the shared eight-wall budget,
  continuing next frame if needed; drags keep their locality.
- Daylight could not preempt its 100 ms busy retry and waited an extra rendered frame
  after a producer finished. A wake cancels the retry, and a producer completion keeps the
  frame it already observed.
- Floor-plate reconciliation reuses intersection areas through the prepared-footprint
  cache: the structure preview bench drops from 1.98 to 0.97 ms per tick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first settle pass let every non-drag change rejoin batches immediately, so streaming
model loads, undo spamming and nudges rebuilt BatchedMeshes every frame and load settle
grew from 2-6 s to 16 s.

- Editor gesture completion, applied undo/redo, paint with a new history step and wall
  nudges signal notifyUserEditCommitted. An isolated commit gets a 32 ms quiet period;
  commits under 180 ms apart, previews, loads and unsignalled writes keep 180 ms.
- Deferred surfaces and the wall reveal retry use the computed window, not a fixed 200 ms.
- Live drags of up to eight linked walls rebuild together again (no corner tearing). The
  commit-frame wall budget starts at the engine frame start and never begins an
  indivisible cutout build past it; deferred heavy walls lead the next frame.
- Daylight keeps its busy backoff while geometry is busy and preempts it once ready, reads
  changed nodes from the core reader, and reuses wall footprints by exact revision (17%
  less incremental build CPU on the 48-room benchmark).
- History index writes replace values in place, preserving priorities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`@pascal-app/nodes/element-fragments` builds the datacenter rack hall and
the Colosseum bay arc through the element operations only, so the app can
open them as sample scenes and benches can measure the same scene. The
fragments now sit under a site, as every Pascal scene does. The pinned arch
geometry moves from a JSON test fixture to a module the builder imports;
`definitionHash` returns its `sha256:` template type so template pins need
no cast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A repeated element stores one node and a row per placement, so its node
position alone left its rows out of the scene bounds that fit the camera
(a Colosseum arc 95 m from its element's origin). Rows are posed in the
element's own frame; a surface-hosted element's [u, v, offset] position is
not a plan point and is bounded by its host instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only the minimal box recipe exposed width, depth and height, so a rack,
cable tray or rectangular profile had no plan footprint, no inspector rows
and no resize arrows for the dimensions its builder reads: the fragments
drew nothing in the floor plan. Each box-like recipe now lists its
dimensions with the builder's own fallbacks; round and contract-shaped
profiles, slabs and plates keep their own schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Actions and labels for an element now come from its building class: the
inspector title names the selected row or part ("Column" for a bay's pier),
Move and Delete name what they act on ("Move assembly", "Delete whole
assembly" next to a row), and the floating and plan action menus, move
and edit HUD titles and scene tree fall back the same way. A kind declares
its classes once in `presentation.classes` (labels plus the class of a
node or part); the i18n extractor emits one descriptor per class, so every
class name is translated like a kind label. Other kinds read "Move door",
"Delete wall" from their own label.

`/samples/rack-hall` and `/samples/colosseum-arc` (development only) save
a fragment as a new project through the regular scene route and open it.

Translations are fuzzy drafts awaiting review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…load)

Step 5c, slice 2.

- Element row edits (override, detach, repetition, pose edits) emit indexed row patches
  and share untouched rows: a one-row edit on a 10,000-row table records 286 bytes
  instead of 1.08 MB, and undo is exact. Saves stay plain arrays.
- SceneDocument.load stages hydration without cloning the whole snapshot, without per-node
  rollback closures and without eager history indexes, and publishes atomically;
  loadChunked yields between phases. At 50k nodes sync load drops from 2,441 to 422 ms,
  and chunked load's largest chunk is about 18 ms.
- Element plain geometry is memoized by shape, parameters, detail, contracts and cuts.
- Autosave detects changes by document revision; a pure checkpoint encoder and a
  revision-checked patch replica run in a worker (tested in a real worker).
- turbo passes PASCAL_BLENDER through, so test runs can skip the local Blender.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…osave per commit

Review fixes for the 50k store slice: invalid or stale row patches return false instead of
throwing (undo after a shrink no longer wedges; row keys order numerically); HistoryView diffs
tombstones against the base, respects deletes in order and builds secondary indexes once;
placement caches only for frozen tables; unchanged reloads stay silent; autosave decides
dirtiness per commit so a nested default commit cannot hide a local edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A compiler owned by ViewerEngine turns document patches into pages per (storey, 32 m cell):
instanced BatchedMesh pages for repeated geometry, merged pages per material for unique
geometry, transparent and animated geometry kept apart. Compiled elements and static GLB
items no longer create per-node fibers or source meshes. A table from address to GPU slot
drives picking (cell, instance, cached BVH), selection, proxy outlines and paint. Edits
rebuild only the affected pages, atomically and revision-checked; drags write instance
matrices only. 10k rows: one page per edit in about 1.2 ms, drag frame 0.015 ms;
50k elements: 98 pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wall pass could be starved forever when earlier producers used the frame budget; it now
admits one rebuild after a budget-only stall. Waves no longer rebuild walls already done in the
same snapshot, neighbour lookup reuses the miter junction graph, covering slabs are found via a
bounding-box tree, and wall treatment advances in 4 ms slices. A GPU-free drain bench covers
syn-style graphs (50k: stalled -> drains in 26 s CPU; 30k: 17.4 -> 10.8 s).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The staged load published without running replay settlers, so state derived from loaded
content (a legacy scene's plugin list) was never settled. Settlers now run in a follow-up
commit, after load listeners and without adding history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes for the render compiler. Each compiled node registers a stand-in in the scene
registry, with a live world matrix, lazy proxy geometry and material forwarding, so handles,
drag, tint, paint and scopes keep working. One visibility API covers level shadowOnly, X-ray
and isolation, plus level snapping. Export, bake and colliders read compiled geometry.
Hover leave now reaches every ancestor. Shadows follow materialCastsShadow, and transparent
pages resolve in the ID pass. Items the compiler cannot represent yet (drafts, live
overrides, hosted, animated, cutouts, floor lifts) stay on the island. Load, async and
failure paths are now revision-checked and leak-free.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…readiness

Review fixes for the wall-scale change. Wall treatment now keeps its pending dirty walls and
terrain changes across cancellation. It tracks live slab transforms, so it never publishes
mixed supports. It runs one job per level, so continuous edits still publish. Scene readiness
waits for pending treatment in production too, through a pendingSceneWork token owned by the
viewer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…igins (step 5c slice 4)

- Worker pools are fed by replicas synced through document patches. Jobs are keyed by revision,
  and buffers are transferred back.
- Workers build opening geometry, wall envelopes, miters, merged pages and per-shape BVHs. The
  main thread uploads and swaps in tasks of about 4 ms.
- Loading parses, migrates and validates in a worker, then publishes the active storey and the
  full graph in atomic stages.
- Compiled pages use 32 m cell origins.
- Autosave serializes in a worker.
- A long-task counter is exposed to the perf probe.

At 50k legacy: wall/opening CPU 26 -> 14 s, longest task 70 -> 48 ms (p95 4.6 ms).
At 50k elements: full load 0.4 s. Autosave main-thread time 117 ms -> 0.03 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…onsistent

Review fixes for slice 4:
- Workers are an accelerator only. Construction, transport and runtime failures fall back to
  the main thread; a pool restarts once and reseeds; replica gaps reseed.
- Preview ghosts build synchronously.
- Element rebuilds over 32 rows remove old addresses first and record new ones only after a
  committed swap. Async page uploads publish atomically per revision.
- Progressive load pins its epoch, stages every level needed for elevations, restores on
  failure, and keeps the hasUsableSceneGraph and stair-opening paths.
- The worker save payload matches the canonical document. Cache keys are complete, and the
  slab worker guards match.
- Cached asset builds are synchronous again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kers fall back

- Next compiles worker chunks as client code, so `typeof window` becomes "object" and three's
  `window.__THREE__` registration threw while the worker evaluated. The error never reached the
  Worker's error event, so jobs waited forever and the main-thread fallback never ran.
- Worker entries import `@pascal-app/core/worker-scope` first, which aliases `window` to the
  worker global.
- Pools and the progressive load worker need a `hello` reply before work. Silence past
  DOCUMENT_WORKER_HANDSHAKE_MS sends the work to the main thread without a restart.
- The page compiler skips a failed pool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The daylight room observer called `traverse` inside a `childadded` dispatch. On a compiler
  stand-in that materializes proxies, and the nested `add` cleared three's shared event `child`,
  so the layer-pass index read null and publication threw partway.
- Async publication now hands its pages over before publishing, so a throw there cannot dispose
  meshes that are already live. Before, the retry disposed them twice and the element compiler
  wedged with dirty nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ice 5)

Compiled content is culled by hidden storey first, then by cell against the eye frustum and
the shadow light frusta, so off-camera casters stay. Page culling uses spheres derived from
the cell AABBs, and per-instance culling is kept.
For partial views, the directional shadow camera fits the visible receivers, with extents
quantised and the centre snapped to texels. Full views keep today's calibrated fit.
Elements declare paint per authored slot and placement/part, with one undo transaction, and
get metre-scale UVs.
GPU-free bench, 50k elements with a partial view: camera draws 217 -> 17, shadow draws
455 -> 30, shadow triangles 600k -> 28k. Occlusion was deferred, with no measured benefit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent paint fixes

Review fixes for slice 5:
- Partial-view shadow fitting is removed, and the shadow implementation is byte-identical to
  before the slice.
- Cell culling updates the camera before computing its frustum. Custom pipelines, captures,
  picking and export do not inherit viewport culling.
- Element paint accepts raw object-scope slots, resolves island instances, previews and
  commits the same target for placementless assemblies, never materialises every proxy, and
  always restores its preview.
- A saved-scene test pins part-type finish precedence.
- Corrected cap and reveal UV orientation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d, scans skip stand-ins

- Document compiler: dispatch and apply share each budgeted flush. Worker results publish as
  one batch (held up to 150 ms while builds are in flight), and row slices of a node merge.
  Builds keep starting during an apply. Continuation is a task (MessageChannel), never a frame, while the engine runs (a paused
  engine compiles on the frames and flushes it is given).
  Page building yields on time and bytes to a task, not a requestAnimationFrame.
- Worker slices are 512 rows (32 on the main thread). Each worker holds a 16-job pipeline, so
  it keeps building while the main thread is busy. The 7 ms round trip per 0.25 ms job capped
  element loads at about 200 jobs/s. Snapshot seeding yields on time through messages.
- Legacy geometry readers may queue 128 jobs (8 limited legacy loads to about 8 builds a frame).
- Pages: repeated shapes of one material share BatchedMesh pages, and cells are 128 m. WebGPU
  builds a pipeline per BatchedMesh and pass, and per-hash pages in 32 m cells made thousands.
- Daylight glass flags and shadow bounds read compiled parts instead of materializing every
  stand-in. The dirty scan uses member sets, not children.includes (quadratic at 5k dirty).
- The item batch wakes after a thumbnail capture releases it; on a resting engine it stayed
  stale.
- The perf probe exposes compiler queues and pool timings (__pascalPerf.compiler).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y there, one publication

- A scene under 2 MB of JSON (or 2000 nodes) loads on the main thread in one stage, as before
  workers: booting the load worker and compiling the active storey, then the rest, cost a
  house several hundred milliseconds. Larger scenes keep the worker and staged publication.
- DocumentWorkerPool.ready: seeded with every worker answering. Until then geometry readers,
  compiled builds and page merges run on the main thread within their existing budgets
  instead of queueing behind worker start-up; BVHs are then built on first pick.
- Compiled builds predicted under 1 ms (decaying main-thread cost per row per builder) stay on
  the main thread: a worker job cost ~7 ms of round trip for ~0.25 ms of work.
- The daylight baked-root search skips stand-ins (it materialized every compiled node), and
  shadow bounds union compiled page bounds once instead of a box per part.
- Finished builds wait up to 600 ms (was 150) for the rest of their batch: a second publication
  rebuilt the filling pages and their pipelines.
- The item batch no longer offers compiled stand-ins, which have nothing to batch: candidate
  scans for every compiled node cost each wave tens of milliseconds.
- Picking BVHs build in workers after publication instead of before it: every load waited
  for a job per new shape. A pick before one lands builds it on demand, as before.
- Row slices of one element build concurrently, so they land and publish as one batch. One
  slice at a time republished a large node's filling pages, with new pipelines, per slice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Held worker results keep the revision they were built against; anything edited during the
  hold rebuilds instead of publishing stale geometry.
- Worker reseeds coalesce per missed patch, release stale pipeline jobs, and stale results keep
  their error identity across the message boundary so they retry.
- A load during publication stops at the next yield and never requeues old-epoch nodes.
- Task continuation respects pause, hidden tabs, external loops and device loss; one waiter
  resolves per task and a throw never strands the others.
- Rebuilt shared pages keep paint previews and lamp emitters on untouched siblings.
- Shadow bounds from compiled parts include storey and root transforms.
- Tests for each mechanism, picking before deferred BVHs, and worker/main-thread geometry parity.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…BVHs always land

- Structure reconcile clamped each ceiling with getCeilingClampBound on the plain load record,
  and each call rescanned every node to validate its memo: syn-50k spent ~22 s of a 29 s load
  worker there, past the editor's 20 s data fallback, so the shell showed an empty scene and
  the lab counted 0 walls. ceilingClampBounds settles the covering context once per level.
- Picking BVHs are queued after every publication, including those made while the worker pool
  was still starting (main-thread loads). Before, those shapes never received a BVH and each
  pick built one on demand (syn-el-10k select 203 ms). A job made stale by an edit retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Probes read a registered node's matrix directly; compiled stand-ins live outside their level
group, so a scene-graph search no longer finds it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…very stand-in

RenderCompiler.pick began with root.updateWorldMatrix(true, true). The descendant walk reached
every compiled stand-in, whose matrix override materializes a proxy per part: a syn-el-10k
select spent ~120 ms there (input to change ~200 ms). The pick now updates the root and storey
frames, and a proxy updates only its own stand-in's frame without materializing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every element is a composite-shell host, and compositeDescendantsBusy scanned the whole
scene for each one's hosted children. A batch wave asks it of every candidate, so the wave
was quadratic: about 2.4 s of one frame while syn-el-50k loaded. It now reads the
document's byHost index.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
three r187 keys a BatchedMesh's node build on its own matrices and colours textures and bakes
them into the build, so each compiled page paid a full TSL build per pass in the frame it
first drew: seconds of main-thread work while a 50k-element scene loaded. Its InstancedMesh
path already reads instance data per object. The viewer now does the same for BatchedMesh:
the batch textures resolve from the drawn object at build and at every draw, and the build
key leaves their identities out. The generated WGSL is byte-identical to three's.

Materials with their own setupPosition, morphs, skinning or displacement keep three's path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…piler

flagRoomGlass reruns on every scene-registry change, which a loading element scene makes
many times. It walked each stand-in's compiled parts, cloning a world matrix and bounds per
part it never read: about 200 ms per scan at 50k elements. The compiler now hands out its
slots' materials in one pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compiled pages mostly carry classic materials (MeshStandardMaterial), which three builds as
the node material class it converts them to. The shared-build key looked for the shared
vertex setup on the material itself, so those pages still keyed per page: 154 of the 186
builds left while syn-el-50k loaded. It now checks the class three builds them as.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Worker results publish together, and staging plus publishing a patch is synchronous at a
few microseconds per primitive: a 50k-element load published tens of thousands at once and
held the main thread for hundreds of milliseconds per step. A publication now takes at most
4096 primitives; results left over have already waited their batch window, so they publish
on the next task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wass08 and others added 19 commits December 5, 2026 02:20
- Unversioned records never reuse cached storey elevations, so a hoisted ceiling clamp sees
  lifted slabs (2.79 vs 3.39 m on a multi-level plain record).
- A pick forces current root, storey and stand-in frames after an ancestor moves, still
  without materializing unhit stand-ins.
- A deferred BVH, including a stale retry, attaches only to the shape it was built for.
- Tests for each, plus unavailable workers and stand-in frame stability.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation

React handed a node to the compiler only once the compiler had published it. Until then every
element mounted a ParametricNodeRenderer whose group GeometrySystem never fills, and
publication unmounted it again: two React commits per batch of elements, 85-166 ms each while
syn-el-50k loaded. A compiled-geometry kind that never fell back to an island now renders as
compiler-owned from the start; a failed build makes it an island, which notifies ownership
and mounts the React path as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w maps

Hover, selection and paint previews split a compiled slot: its page instance hides and a
one-instance mesh with the override material draws at the same pose. The frame walk saw a
caster appear and redrew every cached shadow map, about 30 ms per light on syn-el-50k, for a
change that casts the same shadow. Such a mesh is now marked shadow-neutral when its pose,
layers, shadow casting and shadow-relevant material state match the slot's own, and the walk
does not count it as a caster change. Overrides that change the shadow still redraw it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nged

three frustum-culls and depth-sorts every instance of every batched mesh for every pass of
every frame, 20-70 ms a frame across the pages of syn-el-50k, and repeats the previous result
whenever the camera and the page stand still (a select or paint, the shadow passes of an
orbit). Each camera now keeps the list it last got, keyed on every input three reads: camera,
mesh and instance matrices, instance and geometry layout, sort mode and draw format. An
unchanged key restores that list; the lists are identical to three's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A paint moves the painted parts to another material's page: both pages are rebuilt as new
meshes, the frame walk saw casters appear and vanish, and the compiler bridge invalidated
shadows after every publication, so each paint redrew every map (about 28 ms on syn-el-50k)
for an unchanged shadow. Compiled pages now report their own shadow changes: a publication
whose parts keep their poses and cast through materials with the same shadow depth leaves
the maps cached, and visibility changes report through a hook. Pages still redraw shadows
when an ancestor moves them, and any other publication redraws as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The editor warms its sound cues as it mounts, and the first Howl creates the page's
AudioContext: about 130 ms of the editor's first commit on every scene. No sound can start
before a user gesture, so a preload before the first one only records its cues and the first
pointer or key press warms them. Playback still loads at once, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check built a shadow state for every part of every rebuilt page, about 20 ms per
publication while syn-el-50k loaded, although a loading publication always adds parts. It now
compares part by part and stops at the first part added or removed, and builds shadow states
only for parts whose primitive changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es wait for loads

- Pages share a shader build only for the same material (uuid and version) and the same
  daylight predicates (object layer, glass slot); three's cache key collapses those numbers.
- The 4096-primitive cap applies to load publications only; edits and undo publish complete
  replacements atomically.
- Scene readiness, frame sync, thumbnails and GLB export track remaining compiler work and settle
  every load chunk before capturing; synchronous exports refuse an unfinished scene.
- Tests with real materials, lifecycle wiring, deadlines, atomic undo and capture waits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st and sound fixes

- A slot swap or tint keeps cached shadows only when both materials are provably opaque with the
  same shadow-relevant state and nothing pending to load; overrides, reverts, caster previews,
  local and ancestor transforms and late textures invalidate shadows.
- Zero-part compiled elements keep a registered frame, node events, parent lookup, outliner
  fallback and readiness.
- Every draw-parameter update bumps the draw version; per-camera draw lists hold cameras weakly.
- A cue requested before its sound loads plays once loaded, with or without a gesture.
- Tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Walls rebuild progressively in 6-8 ms of each frame, the load budget, also after a committed
edit when nothing is dragged. A moved wall and its junction neighbours (about 60 ms on the full
house) then took about ten frames, each also drawing the whole scene and its shadows, so most
of the wall-move settle went to rendering intermediate states. Without a drag or live preview
and outside the initial load, the frame budget is now 24 ms: the same walls finish in about
three frames, and a large edit still keeps each frame bounded. Tests that pinned the 8 ms
numbers now use the settle budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After an edit the daylight room build runs in task slices between rendered frames. At 8 ms a
slice it took about twice its CPU time in wall time (about 220 ms for 110 ms of work on the
full house), the last pending source of a wall move's settle. With nothing interacting a slice
now takes up to 20 ms; during a drag, wheel, walkthrough or live preview it stays at 3 ms, and
input still gets a turn between slices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reverts c7795474f and 1b64fd6ab. On full-native the wall-move settle stayed at 390 ms with
them (369 ms before): the settle is a chain of dependent producer waves (commit settlers,
re-dirtied walls, wall-batch merges redrawing shadows, then the daylight build), not the
per-frame budget of the last two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Node pointer events computed the hit's local point with `object.worldToLocal`, which calls the
object's own `updateWorldMatrix`; a compiled stand-in overrides that to build a proxy mesh per
part. Every element the pointer crossed kept its proxies, and each later frame walked and
re-posed them: after the lab's hover phase on syn-el-50k, an item drag's frame-gap p95 went
from 17 to 125 ms and its settle from 120 to 272 ms. The local point now uses the base world
matrix update, the same math without materializing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ing them

The hero pose (thumbnails, framing) measured every registered node with Box3.setFromObject,
which materializes a compiled stand-in's proxy per part: one framing pass left every element
of a 50k-element scene materialized, and each later frame walked and re-posed the proxies.
Stand-ins are now measured through their compiled parts, the same boxes the proxies give.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng them

`__pascalPerf.projectNode` and `nodeMatrixWorld` called a node's own world-matrix update; on a
compiled stand-in that materializes a proxy per part, so the lab's target and framing scans
changed the scene they then measured. Both now use the base world-matrix update.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r leaving it

Moving one wall makes room detection re-list the boundary walls of several rooms whose shape
is unchanged. Each changed room dirtied its whole old and new boundary and every wall its
unchanged polygon touches: one wall move on the full house rebuilt 54 walls (some twice) and
held the daylight rebuild behind them. A room change that leaves shape, floor and separators
alone now dirties only the walls that joined or left its boundary; shape changes dirty as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on a timer

A selected or hovered node (and what its host carries) stays out of the batch while tinted,
and every wave with such a node re-armed a wake timer: frames kept coming for as long as the
selection lasted. After a wall move the moved wall stays selected, so its outlets kept the
frame loop running, and each frame's walk and shadow pass starved the daylight rebuild that
settles the edit. Tint-only deferrals no longer poll; a selection, hover, preview or live
override change wakes the batch frame instead. Other deferrals poll as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…torey frames

- Node events on a picked proxy update it through the compiler's frame path, so sibling parts
  are never materialized.
- Source bounds force current root and storey frames after a root move with frozen storeys.
- Tests with real pick hits, both framing call sites and independent probe updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er bakes a highlight

- Paint preview, override, transform and selection deferrals wait on their events instead of
  polling; a persistent dirty mark no longer restarts settling, empty batches rest, and consumed
  wake timers are cancelled, so the idle editor and a stationary paint hover rest.
- A deselected instanced node batches its original material before the highlight is disposed.
- Tests for the room guards, every selection wake, the override unsubscribe and the settle timer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Dec 5, 2026

Copy link
Copy Markdown

This PR is too large for Bugbot to review. It changes 30,017 lines and 3,216,027 characters. Split the change into smaller pull requests to get a review.

wass08 and others added 4 commits December 5, 2026 08:40
The 50k compiler budgets were set on the reference machine; a calibration loop scales them on
slower hosts. The wall-system history probe gets a 30 s timeout for its fresh-process import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ners

The host-speed calibration runs right after each timed section, the 50k compiler test gets 120 s,
and every fresh-process history probe gets 60 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ick count

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The element compiler edit, host-scan and bulk slab budgets use the same calibration as the render
compiler, so a contended CI runner no longer fails them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wass08
wass08 merged commit 55ab3e9 into main Dec 5, 2026
8 checks passed
@wass08
wass08 deleted the feat/general-core-step5 branch December 5, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant