chore: restructure engine/ folder per Spec C#47
Merged
Conversation
Move autoLod, scaleBar, pointInfoBuilder to engine/helpers/ per Spec C. Mirror tests under tests/services/engine/helpers/. No file renames; only relative-path import updates. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move buildPointInterleavedBuffer, computeSchechterRatios, computeAngularWeights plus their .worker.ts siblings into engine/bake/ per Spec C. Mirror tests under tests/services/engine/bake/. Update consumers in pointRenderer.ts (forced cross-folder import update) and tools/buildFilaments.ts. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move thumbnailSubsystem, spaceMouseSubsystem, renderScheduler, loadProgressAggregator, fpsCounter to engine/subsystems/ per Spec C. Mirror tests under tests/services/engine/subsystems/. Update consumers in @types, in-engine modules, and cross-cutting tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move tweenManager, focusTween, cameraFraming, resolveFocusTarget, tweenToGalaxy to engine/camera/ per Spec C target taxonomy. Mirror tests under tests/services/engine/camera/. Update @types, hooks/useFocusUrlSync, in-engine consumers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move runFrame, renderFrame to engine/frame/ per Spec C. Mirror tests under tests/services/engine/frame/. Update phases/startLoop import. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move settingsTable, seedSettingsCallbacks, pointSourceRegistry to engine/wiring/ per Spec C. Mirror tests under tests/services/engine/wiring/. Update phases/initGpu, phases/wireInput, engine.ts consumers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move inputBindings, clickHandler to engine/interaction/ per Spec C. Mirror tests under tests/services/engine/interaction/. Update @types and phases/wireInput consumers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
skymap | 81386cd | Commit Preview URL Branch Preview URL |
May 08 2026, 01:38 AM |
Two changes to Spec C: 1. New `engine/camera/` subfolder groups the stateful camera-orchestration files that were scattered between `subsystems/` and `interaction/` in the first draft: tweenManager, focusTween, cameraFraming, resolveFocusTarget, tweenToGalaxy. `subsystems/` shrinks to 5 (drops tweenManager). `interaction/` shrinks to 2 (inputBindings, clickHandler) and is recharacterised as "input edge" with the camera-side responses moved to camera/. Layering note added: services/camera/ holds pure primitives (orbitCamera, orbitControls, cameraTween). engine/camera/ is one layer up — uses those primitives plus EngineState. Two layers, two folders. 2. New "Follow-up — subsystem API consistency" section at the end. The state.subsystems.* bag groups owned long-lived helpers but doesn't enforce a shared API; the EngineSubsystemHandles docstring overpromises a `runFrame/apply/connect` contract that doesn't exist. Two flavours of follow-up flagged: light-touch consistency (suffix-rename + docstring refresh) and a real Subsystem interface (Spec D candidate). Neither in scope here. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
Pure relocation pass over
src/services/engine/per Spec C. The flat 28-file layout becomes 7 subfolders plusengine.ts+index.ts. No file renames, no module splits, no new abstractions, no re-export shims.tests/services/engine/mirrors the new layout one-to-one; the two cross-cutting integration tests (engine.tier-swap-race.test.ts,proceduralDiskEmission.test.ts) stay at the test root.The
gpu/half of Spec C is deliberately left for a separate PR. The onlygpu/edits in this PR are forced import-path updates inpointRenderer.tstriggered by the bake/ relocation.What moved where
Test plan
npx tsc --noEmitclean at every commit boundarynpx vitest run— 931/931 tests pass at every commitgit mvused for every move so blame/history follows filesindex.tsre-export ofautoLodMaskrepointed to./helpers/autoLodnpm run devand confirm rendering still works (left for reviewer / merge-time)Notes for reviewer
git mvplus relative-import updates with consistent depth bumps.tweenManageretc. intocamera/(vs the spec text which placedtweenManagerinsubsystems/and the rest ininteraction/). Implementation follows the user's task message.pointRenderer.tsimports updated to point atengine/bake/*— this is a cross-folder import change forced by the relocation; the gpu PR can keep this layout untouched.tools/buildFilaments.tsimport similarly updated.🤖 Generated with Claude Code