diff --git a/.github/coverage-ratchet.json b/.github/coverage-ratchet.json index c9f47009662..59d9a9b9d78 100644 --- a/.github/coverage-ratchet.json +++ b/.github/coverage-ratchet.json @@ -62,7 +62,7 @@ "site/packaged-object-runtime.mts", "site/model/planetary-system-members.mts", "site/prepare-body-moons.mts", - "site/prepared-arrival.mts", + "site/navigation/prepared-arrival.mts", "site/navigation/prepared-descriptor.mts", "site/prepared/prepared-object-path.mts", "site/content/prepared-panel-content.mts", @@ -410,7 +410,7 @@ "branches": 87.5, "functions": 91.6 }, - "site/prepared-arrival.mts": { + "site/navigation/prepared-arrival.mts": { "lines": 100, "branches": 100, "functions": 100 diff --git a/.github/scripts/checks/object-test-relocation.test.mts b/.github/scripts/checks/object-test-relocation.test.mts index d2edc12162f..43d12dbcbc6 100644 --- a/.github/scripts/checks/object-test-relocation.test.mts +++ b/.github/scripts/checks/object-test-relocation.test.mts @@ -9,7 +9,7 @@ import { discoverObjectTests } from '@cssearth/bake/run-implemented-objects/sour const root = projectRoot(import.meta.url); test('per-object discovery keeps shared suites and every body-owned suite collected in root lanes', async () => { const files = await discoverObjectTests('earth', { projectRoot: root }); - assert.ok(files.includes(resolve(root, 'site/test/runtime-package.test.mts'))); + assert.ok(files.includes(resolve(root, 'site/world/runtime-package.test.mts'))); assert.ok(files.includes(resolve(root, 'packages/bake/src/raster/raster-pages.test.mts'))); const lanes = testLaneFiles(root, JSON.parse(readFileSync(resolve(root, 'package.json'), 'utf8')) as unknown, ['test:packages', 'test:site']); for (const file of [...lanes.packages, ...lanes.site].filter(file => file.startsWith('src/objects/earth/'))) diff --git a/.github/site-refactor.json b/.github/site-refactor.json index 30981bb6cc3..35589bc662f 100644 --- a/.github/site-refactor.json +++ b/.github/site-refactor.json @@ -1,7 +1,39 @@ { - "mode": "semantic", - "moves": {}, - "outputs": [], - "layout": "changes", - "change": "S3-1 held address" + "mode": "pure-move", + "moves": { + "site/prepared-arrival.mts": "site/navigation/prepared-arrival.mts", + "site/test/body-moons.test.mts": "site/build/prepare/body-moons.test.mts", + "site/test/category-frames.test.mts": "site/build/prepare/category-frames.test.mts", + "site/test/compact-spectrum.test.mts": "site/overview/compact-spectrum.test.mts", + "site/test/moon-labels.test.mts": "site/world/moon-labels.test.mts", + "site/test/navigation-ontology.test.mts": "site/world/navigation-ontology.test.mts", + "site/test/navigation-preparation.test.mts": "site/world/navigation-preparation.test.mts", + "site/test/navigation-request.test.mts": "site/navigation/navigation-request.test.mts", + "site/test/navigation-router-context.mts": "site/scene/navigation-router-context.test-support.mts", + "site/test/navigation-test-values.mts": "site/navigation/navigation-test-values.test-support.mts", + "site/test/nebula-search.test.mts": "site/world/nebula-search.test.mts", + "site/test/object-navigation.test.mts": "site/world/object-navigation.test.mts", + "site/test/object-package-contract.test.mts": "site/build/object-package-contract.test.mts", + "site/test/prepared-arrival.test.mts": "site/navigation/prepared-arrival.test.mts", + "site/test/prepared-body-billboards.test.mts": "site/world/prepared-body-billboards.test.mts", + "site/test/prepared-icons.test.mts": "site/build/prepare/prepared-icons.test.mts", + "site/test/prepared-world-context.test.ts": "site/world/prepared-world-context.test.ts", + "site/test/runtime-package.test.mts": "site/world/runtime-package.test.mts", + "site/test/satellite-arrival-framing.test.mts": "site/navigation/satellite-arrival-framing.test.mts", + "site/test/scene-contract.test.mts": "site/world/scene-contract.test.mts", + "site/test/search-api.test.mts": "site/journeys/search-api.test.mts", + "site/test/search-response.test.mts": "site/server/search-response.test.mts", + "site/test/startup-cover.test.mts": "site/browser/startup-cover.test.mts", + "site/test/system-text.test.mts": "site/build/prepare/system-text.test.mts", + "site/test/system-view-file.mts": "site/world/system-view-file.test-support.mts", + "site/test/world-stars.test.mts": "site/world/world-stars.test.mts", + "site/test/world-tables.test.mts": "site/world/world-tables.test.mts", + "site/prepared-arrival.characterization.test.mts": "site/navigation/prepared-arrival.characterization.test.mts", + "site/object-entry-types.test.mts": "site/directory/object-entry-types.test.mts", + "site/moon-catalogue.mts": "site/content/moon-catalogue.mts", + "site/moon-catalogue.test.mts": "site/content/moon-catalogue.test.mts", + "site/surrounded-body.mts": "site/world/surrounded-body.mts", + "site/surrounded-body.test.mts": "site/world/surrounded-body.test.mts" + }, + "change": "S4-2 remaining moves" } diff --git a/docs/moon-catalogues.md b/docs/moon-catalogues.md index 8ddadb13028..68293bd51f8 100644 --- a/docs/moon-catalogues.md +++ b/docs/moon-catalogues.md @@ -79,7 +79,7 @@ sequential and cached in `output/moon-horizons/`. Review changes in totals, identity and ephemeris coverage before accepting refreshed inputs. Do not reuse cached replies for a different epoch or reference frame. -Focused checks: `node --test site/test/body-moons.test.mts -site/test/moon-labels.test.mts site/browser/source-link.test.mts`. They verify full +Focused checks: `node --test site/build/prepare/body-moons.test.mts +site/world/moon-labels.test.mts site/browser/source-link.test.mts`. They verify full catalogue membership, available destinations, major/minor orbit policy, planet occlusion, caption collision and overview hiding. diff --git a/docs/navigation-identity.md b/docs/navigation-identity.md index a6fdaaf633e..0387b540aca 100644 --- a/docs/navigation-identity.md +++ b/docs/navigation-identity.md @@ -35,7 +35,7 @@ the body as that object's centre and its radius. A star of the Large Magellanic zooms out into the Cloud, M87* into M87, M87 into the Virgo Cluster. That scene is then left the way any body's is ([overview-selection.mts](../site/overview-selection.mts), [inside-view.mts](../site/inside-view.mts)). The way back in needs no click where the object's walls -surround a body: its entry names that body (`inner`, [surrounded-body.mts](../site/surrounded-body.mts)), and +surround a body: its entry names that body (`inner`, [surrounded-body.mts](../site/world/surrounded-body.mts)), and a zoom in that reaches the nearest view the object's scene allows goes on into the body's scene, which draws the walls around it. While that body is selected the object has no marker: the view is among its walls, and its breadcrumb names it ([application-world-context.mts](../site/application-world-context.mts)). The Homunculus Nebula zooms in to Eta Carinae, NGC 2392 to HD 59088. A system can be inside another: a star @@ -196,7 +196,7 @@ identities. See [object provenance](object-provenance.md) for their lineage. ## Checks -`site/test/navigation-ontology.test.mts` compares every prepared spatial subject +`site/world/navigation-ontology.test.mts` compares every prepared spatial subject with the registry and search, checks every body distance against its prepared frame, and resolves the actual galaxy references. The bibliography tests reject conflicting keys and invalid locators. Contribution tests distinguish view diff --git a/docs/object-discovery.md b/docs/object-discovery.md index e17ebd5fe37..30a9363eb88 100644 --- a/docs/object-discovery.md +++ b/docs/object-discovery.md @@ -241,7 +241,7 @@ Gray placeholders receive the same display cue without invented surface detail. Measured stellar limb darkening and thermal-map palettes keep their source treatment. The Earth and Moon browser view checks the Moon sprite in the existing world renderer. -`site/test/navigation-preparation.test.mts` checks every registered body marker +`site/world/navigation-preparation.test.mts` checks every registered body marker and resolved context image for transparent corners and nonempty content. The shared recipe tests separately check bright-center, darker-limb shading. The catalogue audit diff --git a/docs/page-navigation-transport.md b/docs/page-navigation-transport.md index 3e4911849f0..1b3b9aac99b 100644 --- a/docs/page-navigation-transport.md +++ b/docs/page-navigation-transport.md @@ -204,7 +204,7 @@ After building the packages and renderer, check page metadata with: node --test site/server/object-page-data.test.mts pnpm test:packages # includes rendering/prepared-scene-serialization.test.ts node --test site/journeys/rendered-page.test.mts -node --test site/test/search-response.test.mts +node --test site/server/search-response.test.mts node --test site/server/dataset-response.test.mts site/model/dataset-url.test.mts node --test site/scene/scene-session.test.mts ``` diff --git a/docs/performance/startup-billboard.md b/docs/performance/startup-billboard.md index 4659b9af910..7f4c2c12137 100644 --- a/docs/performance/startup-billboard.md +++ b/docs/performance/startup-billboard.md @@ -4,7 +4,7 @@ A default object page with a prepared arrival billboard sends that image instead The shared responsive fit determines the initial silhouette. The camera retains the billboard's baked distance and rotation, adjusting projection scale to fit the viewport. The billboard and detailed scene therefore use the same perspective. Preparation requests the selected viewport texture level and uses the same visible-face demand as the mounted scene; existing low-resolution textures for unseen faces remain an independent resource optimization. -`site/prepared-arrival.mts` owns the resource lease, viewport texture policy, progressive mount options, camera acknowledgement, cancellation and cover release for startup and navigation. Startup supplies its prepared destination view; fly-to supplies its travelling camera and resumes its existing flight after acknowledgement. Both use the same scene-session activation and camera-acknowledged reveal path. The two modes differ only in camera progression: startup supplies a stationary destination; fly-to runs the existing travel clock. +`site/navigation/prepared-arrival.mts` owns the resource lease, viewport texture policy, progressive mount options, camera acknowledgement, cancellation and cover release for startup and navigation. Startup supplies its prepared destination view; fly-to supplies its travelling camera and resumes its existing flight after acknowledgement. Both use the same scene-session activation and camera-acknowledged reveal path. The two modes differ only in camera progression: startup supplies a stationary destination; fly-to runs the existing travel clock. The input surface stays inert through prepared scene activation, whether or not the camera can use a billboard cover. Like a fly-to replacement, startup attaches the shared world before mounting detail. Behind the photograph, startup builds that world and the shell while the first view's images download. On every screen a body first draws its first texture level, then sharpens to the level its size on screen calls for. The world's first frame is planned while the detail activates and paints: as soon as the detail's navigation facts exist, the world selects the body and plans the startup camera the detail already holds (`world-frame-queue.ts` `warm`). The plan is used only by the first request for that identical view while the world's presentation is unchanged, so the detail's connection commits it without planning again and the arrival's camera acknowledgement rides the same frame; any other request, a changed camera or a changed presentation plans as before. A change nobody owns yet (the caption's measurement) follows the committed frame with one more plan, as a refresh during a plan does. Both arrivals reveal at the proven fly-to boundary: activation has finished mounting and painting, and the destination camera publication has been acknowledged. The travel owner positions the cover during flight; attachment holds that image still until reveal. The cover does not subscribe to stage-coordinate camera publications. There is no extra router publication or second reveal gate. Readiness has no fixed delay. An empty stage shows the cold-start ring. When the photograph shows, the ring leaves and the header's progress line runs, the same line a fly-to shows, because the photograph looks like a scene but does not answer input yet. The line stops when the detail presents or the mount fails. It animates only its own transform; reduced motion makes it static. There is no startup coast, fade or second zoom. diff --git a/docs/site-architecture.md b/docs/site-architecture.md index 6b057efd18c..4f40e692c70 100644 --- a/docs/site-architecture.md +++ b/docs/site-architecture.md @@ -11,30 +11,30 @@ A folder imports itself or strictly lower layers. Sibling folders, including L0 | Tier | Folder | Purpose | Incoming moves | | ---: | --- | --- | --- | -| 0 | `browser/` | Browser input, DOM and serialized import queue | 2; `import-queue.mts` | +| 0 | `browser/` | Browser input, DOM and serialized import queue | 1; `import-queue.mts` | | 0 | `model/` | Object identities, routes and held addresses | 0 | -| 0 | `overview/` | Prepared spectral overview readers | 1 | +| 0 | `overview/` | Prepared spectral overview readers | 0 | | 0 | `prepared/` | Prepared transports and generated inputs | 23; `prepared-catalogue.d.mts`, `prepared-navigation-markers.d.mts`, `prepared-shell-icons.d.mts`, `prepared-shell-titles.d.mts` | | 0 | `source/` | Preserved input records and artwork | 0 | | 0 | `vendor/` | Preserved third-party notices | 0 | | 0 | `server-assets/` | Server and build prepared-asset origin | 0 | | 0 | `contracts/` | Shared page and shell interfaces | 0 | -| 1 | `directory/` | Startup reads and object catalogue directory | 9; `startup-world.mts`, `object-directory.mts`, `objects.mts`, `world-context-plan.mts` | +| 1 | `directory/` | Startup reads and object catalogue directory | 8; `startup-world.mts`, `object-directory.mts`, `objects.mts`, `world-context-plan.mts` | | 1 | `minimap/` | Surface-map measurements and view formatting | 0 | -| 2 | `world/` | Shared framing, visibility and camera context | 52; `world-objects.mts`, `world-system-views.mts`, `stellar-extents.mts`, `hosted-banks.mts` | -| 3 | `content/` | Card content, citations and metadata | 13; `exploration-catalog.mts`, `source-documentation.mts`, `seo.mts`, `seo-trail.mts` | -| 3 | `navigation/` | History, requests, flights and arrivals | 10; `prepared-arrival.mts`, `prepared-world-navigation.mts` | +| 2 | `world/` | Shared framing, visibility and camera context | 40; `world-objects.mts`, `world-system-views.mts`, `stellar-extents.mts`, `hosted-banks.mts` | +| 3 | `content/` | Card content, citations and metadata | 11; `exploration-catalog.mts`, `source-documentation.mts`, `seo.mts`, `seo-trail.mts` | +| 3 | `navigation/` | History, requests, flights and arrivals | 4; `prepared-world-navigation.mts` | | 4 | `search/` | Catalogue search and result presentation | 0 | | 4 | `selection/` | Committed selection and camera handovers | 8; `scene/scene-selection.mts`, `satellite-selection.mts`, `overview-selection.mts`, `showcase.mts` | | 5 | `shell/` | Retained shell controls and panels | 14; `object-browser.mts`, `feature-browser.mts`, `destination-browser.mts`, `selection-presentation.mts` | -| 6 | `server/` | SSR readers, responses and host middleware | 8; `object-entry.mts`, `world-places.mts`, `dot-catalogue-data.mts`, `social-images.mts` | -| 6 | `scene/` | Scene sessions, replacement and publication | 8; `object-adapter.mts`, `packaged-object-runtime.mts`, `startup-billboard.mts` | +| 6 | `server/` | SSR readers, responses and host middleware | 7; `object-entry.mts`, `world-places.mts`, `dot-catalogue-data.mts`, `social-images.mts` | +| 6 | `scene/` | Scene sessions, replacement and publication | 7; `object-adapter.mts`, `packaged-object-runtime.mts`, `startup-billboard.mts` | | 7 | `startup/` | Page boot helpers and router entry | 5; `shared-imports.mts`, `startup-boot.mts` | -| 7 | `build/` | Site preparation and packaging | 8; `prepare-body-moons.mts` | +| 7 | `build/` | Site preparation and packaging | 3; `prepare-body-moons.mts` | | 8 | `layouts/` | Shared page frame and its styles | 2; `components/ObjectSwatchStyles.astro`, `object-shell.css` | | 9 | `components/` | Reusable Astro markup and SSR composition | 0 | | 10 | `pages/` | Routes and object-page entries | 0 | -| 11 | `journeys/` | Cross-cutting journeys and support | 1 | +| 11 | `journeys/` | Cross-cutting journeys and support | 0 | | 11 | `test/` | Retired test folder; no final occupants | 0 | diff --git a/docs/site-architecture/moves.json b/docs/site-architecture/moves.json index 27efda59aa9..7b0878fe7d0 100644 --- a/docs/site-architecture/moves.json +++ b/docs/site-architecture/moves.json @@ -31,7 +31,6 @@ "site/object-adapter.mts": "site/scene/object-adapter.mts", "site/packaged-object-runtime.mts": "site/scene/packaged-object-runtime.mts", "site/startup-billboard.mts": "site/scene/startup-billboard.mts", - "site/prepared-arrival.mts": "site/navigation/prepared-arrival.mts", "site/prepared-world-navigation.mts": "site/navigation/prepared-world-navigation.mts", "site/import-queue.mts": "site/browser/import-queue.mts", "site/shared-imports.mts": "site/startup/shared-imports.mts", @@ -63,50 +62,24 @@ "site/navigation/evidence/star-click/one-click.jpg": "site/navigation/evidence/star-click/one-click.jpg", "site/test/application-world-frames.test.mts": "site/world/application-world-frames.test.mts", "site/test/application-world-visibility.test.mts": "site/world/application-world-visibility.test.mts", - "site/test/body-moons.test.mts": "site/build/prepare/body-moons.test.mts", - "site/test/category-frames.test.mts": "site/build/prepare/category-frames.test.mts", - "site/test/compact-spectrum.test.mts": "site/overview/compact-spectrum.test.mts", "site/test/destination-browser.test.mts": "site/shell/destination-browser.test.mts", "site/test/diagnostic-recorder.test.mts": "site/shell/diagnostic-recorder.test.mts", "site/test/hosted-banks.test.mts": "site/build/prepare/hosted-banks.test.mts", "site/test/import-queue.test.mts": "site/startup/import-queue.test.mts", - "site/test/moon-labels.test.mts": "site/world/moon-labels.test.mts", "site/test/navigation-history.test.mts": "site/navigation/navigation-history.test.mts", - "site/test/navigation-ontology.test.mts": "site/world/navigation-ontology.test.mts", - "site/test/navigation-preparation.test.mts": "site/world/navigation-preparation.test.mts", - "site/test/navigation-request.test.mts": "site/navigation/navigation-request.test.mts", - "site/test/navigation-router-context.mts": "site/scene/navigation-router-context.test-support.mts", "site/test/navigation-scope.test.mts": "site/world/navigation-scope.test.mts", - "site/test/navigation-test-values.mts": "site/navigation/navigation-test-values.test-support.mts", - "site/test/nebula-search.test.mts": "site/world/nebula-search.test.mts", "site/test/object-children.test.mts": "site/content/object-children.test.mts", "site/test/object-directory.test.mts": "site/directory/object-directory.test.mts", - "site/test/object-navigation.test.mts": "site/world/object-navigation.test.mts", - "site/test/object-package-contract.test.mts": "site/build/object-package-contract.test.mts", "site/test/object-systems.test.mts": "site/world/object-systems.test.mts", "site/test/overview-selection.test.mts": "site/selection/overview-selection.test.mts", - "site/test/prepared-arrival.test.mts": "site/navigation/prepared-arrival.test.mts", - "site/test/prepared-body-billboards.test.mts": "site/world/prepared-body-billboards.test.mts", - "site/test/prepared-icons.test.mts": "site/build/prepare/prepared-icons.test.mts", - "site/test/prepared-world-context.test.ts": "site/world/prepared-world-context.test.ts", "site/test/prepared-world-navigation.test.mts": "site/navigation/prepared-world-navigation.test.mts", - "site/test/runtime-package.test.mts": "site/world/runtime-package.test.mts", - "site/test/satellite-arrival-framing.test.mts": "site/navigation/satellite-arrival-framing.test.mts", "site/test/satellite-systems.test.mts": "site/world/satellite-systems.test.mts", - "site/test/scene-contract.test.mts": "site/world/scene-contract.test.mts", - "site/test/search-api.test.mts": "site/journeys/search-api.test.mts", - "site/test/search-response.test.mts": "site/server/search-response.test.mts", "site/test/seo.test.mts": "site/content/seo.test.mts", "site/test/showcase.test.mts": "site/selection/showcase.test.mts", "site/test/startup-billboard.test.mts": "site/scene/startup-billboard.test.mts", - "site/test/startup-cover.test.mts": "site/browser/startup-cover.test.mts", "site/test/stellar-extents.test.mts": "site/world/stellar-extents.test.mts", "site/test/system-framing.test.mts": "site/world/system-framing.test.mts", - "site/test/system-text.test.mts": "site/build/prepare/system-text.test.mts", - "site/test/system-view-file.mts": "site/world/system-view-file.test-support.mts", "site/test/view-readout.test.mts": "site/shell/view-readout.test.mts", - "site/test/world-stars.test.mts": "site/world/world-stars.test.mts", - "site/test/world-tables.test.mts": "site/world/world-tables.test.mts", "site/test/zoom-scope.test.mts": "site/world/zoom-scope.test.mts", "site/moon-labels.prepared.json": "site/prepared/moon-labels.prepared.json", "site/prepared-catalogue.mjs": "site/prepared/prepared-catalogue.mjs", @@ -151,7 +124,6 @@ "site/inside-view.characterization.test.mts": "site/world/inside-view.characterization.test.mts", "site/object-systems.characterization.test.mts": "site/world/object-systems.characterization.test.mts", "site/overview-selection.characterization.test.mts": "site/selection/overview-selection.characterization.test.mts", - "site/prepared-arrival.characterization.test.mts": "site/navigation/prepared-arrival.characterization.test.mts", "site/prepared-world-navigation.characterization.test.mts": "site/navigation/prepared-world-navigation.characterization.test.mts", "site/prepared-world-presentation.characterization.test.mts": "site/world/prepared-world-presentation.characterization.test.mts", "site/seo.characterization.test.mts": "site/content/seo.characterization.test.mts", @@ -164,8 +136,5 @@ "site/world-context-plan.characterization.test.mts": "site/directory/world-context-plan.characterization.test.mts", "site/world-places.characterization.test.mts": "site/server/world-places.characterization.test.mts", "site/world-system-views.characterization.test.mts": "site/world/world-system-views.characterization.test.mts", - "site/zoom-scope.characterization.test.mts": "site/world/zoom-scope.characterization.test.mts", - "site/object-entry-types.test.mts": "site/directory/object-entry-types.test.mts", - "site/moon-catalogue.mts": "site/content/moon-catalogue.mts", - "site/moon-catalogue.test.mts": "site/content/moon-catalogue.test.mts" + "site/zoom-scope.characterization.test.mts": "site/world/zoom-scope.characterization.test.mts" } diff --git a/docs/site-architecture/tiers.json b/docs/site-architecture/tiers.json index adb4087aff3..18291227d03 100644 --- a/docs/site-architecture/tiers.json +++ b/docs/site-architecture/tiers.json @@ -216,17 +216,17 @@ "site/journeys/astro-component-imports.test.mts", "site/build/fixtures/authored-object-fixture.mts", "site/build/prepare/body-additions.test.mts", - "site/test/body-moons.test.mts", + "site/build/prepare/body-moons.test.mts", "site/journeys/browser-node-imports.test.mts", "site/server/built-pages.test.mts", "site/scene/camera-handover.test.mts", "site/search/catalogue-window.test.mts", - "site/test/category-frames.test.mts", + "site/build/prepare/category-frames.test.mts", "site/shell/chart-pixel-alignment.test.mts", "site/build/charts/charts.test.mts", "site/build/prepare/check-preparation-inputs.test.mts", "site/journeys/cloudflare-worker.test.mts", - "site/test/compact-spectrum.test.mts", + "site/overview/compact-spectrum.test.mts", "site/journeys/context-lineage.test.mts", "site/shell/dataset-picker.test.mts", "site/server/dataset-response.test.mts", @@ -261,28 +261,28 @@ "site/search/list-distance.test.mts", "site/build/content/load-object-content.test-support.mts", "site/build/prepare/lonlat-slice-table.test.mts", - "site/test/moon-labels.test.mts", + "site/world/moon-labels.test.mts", "site/navigation/navigation-content.test.mts", "site/navigation/navigation-fragments.test.mts", "site/test/navigation-history.test.mts", "site/navigation/navigation-lifecycle.test.mts", - "site/test/navigation-ontology.test.mts", - "site/test/navigation-preparation.test.mts", + "site/world/navigation-ontology.test.mts", + "site/world/navigation-preparation.test.mts", "site/navigation/navigation-readiness.test.mts", - "site/test/navigation-request.test.mts", - "site/test/navigation-router-context.mts", + "site/navigation/navigation-request.test.mts", + "site/scene/navigation-router-context.test-support.mts", "site/test/navigation-scope.test.mts", "site/navigation/navigation-shell-content.test.mts", "site/navigation/navigation-styles.test.mts", - "site/test/navigation-test-values.mts", + "site/navigation/navigation-test-values.test-support.mts", "site/navigation/navigation-timing.test.mts", - "site/test/nebula-search.test.mts", + "site/world/nebula-search.test.mts", "site/journeys/neutral-catalogue-color.test.mts", "site/test/object-children.test.mts", "site/journeys/object-control-binding.test.mts", "site/test/object-directory.test.mts", - "site/test/object-navigation.test.mts", - "site/test/object-package-contract.test.mts", + "site/world/object-navigation.test.mts", + "site/build/object-package-contract.test.mts", "site/server/object-page-data.test.mts", "site/search/object-result.test.mts", "site/journeys/object-runtime-contract.test.mts", @@ -296,18 +296,18 @@ "site/build/prepare/prepare-object-json.test.mts", "site/build/prepare/prepare-spatial-context.test.mts", "site/build/prepare/prepare-text.test.mts", - "site/test/prepared-arrival.test.mts", - "site/test/prepared-body-billboards.test.mts", + "site/navigation/prepared-arrival.test.mts", + "site/world/prepared-body-billboards.test.mts", "site/build/content/prepared-dataset-facts.test.mts", "site/journeys/prepared-dataset-labels.test.mts", "site/build/content/prepared-dataset-legends.test.mts", "site/navigation/prepared-descriptor.test.mts", - "site/test/prepared-icons.test.mts", + "site/build/prepare/prepared-icons.test.mts", "site/build/prepared-motion-css.test.mts", "site/content/prepared-panel-content.test.mts", "site/contracts/prepared-presentation-bindings.test.mts", "site/journeys/prepared-presentation-contract.test.mts", - "site/test/prepared-world-context.test.ts", + "site/world/prepared-world-context.test.ts", "site/test/prepared-world-navigation.test.mts", "site/server/preview.test.mts", "site/journeys/production-diagnostics.test.mts", @@ -316,17 +316,17 @@ "site/journeys/rendered-page.test.mts", "site/build/restore-inputs.test.mts", "site/build/run-script-chain.test.mts", - "site/test/runtime-package.test.mts", + "site/world/runtime-package.test.mts", "site/browser/runtime-policy.test.mts", - "site/test/satellite-arrival-framing.test.mts", + "site/navigation/satellite-arrival-framing.test.mts", "site/test/satellite-systems.test.mts", - "site/test/scene-contract.test.mts", + "site/world/scene-contract.test.mts", "site/scene/scene-datasets.test.mts", "site/scene/scene-frame.test.mts", "site/scene/scene-publication.test.mts", "site/scene/scene-session.test.mts", - "site/test/search-api.test.mts", - "site/test/search-response.test.mts", + "site/journeys/search-api.test.mts", + "site/server/search-response.test.mts", "site/journeys/seo-discovery.test-support.mts", "site/journeys/seo-discovery.test.mts", "site/test/seo.test.mts", @@ -338,21 +338,21 @@ "site/overview/source-evidence-values.test-support.mts", "site/browser/source-link.test.mts", "site/test/startup-billboard.test.mts", - "site/test/startup-cover.test.mts", + "site/browser/startup-cover.test.mts", "site/directory/startup-requests.test.mts", "site/test/stellar-extents.test.mts", "site/journeys/surface-label-loop.test.mts", "site/minimap/surface-minimap.test.mts", "site/test/system-framing.test.mts", - "site/test/system-text.test.mts", - "site/test/system-view-file.mts", + "site/build/prepare/system-text.test.mts", + "site/world/system-view-file.test-support.mts", "site/test/view-readout.test.mts", "site/navigation/view-url-runtime.test.mts", "site/content/volume-presentation.test.mts", "site/browser/web-analytics.test.mts", "site/journeys/world-billboards.test.mts", - "site/test/world-stars.test.mts", - "site/test/world-tables.test.mts", + "site/world/world-stars.test.mts", + "site/world/world-tables.test.mts", "site/test/zoom-scope.test.mts", "site/navigation/view-url-runtime.characterization.test.mts" ], diff --git a/eslint.config.mts b/eslint.config.mts index de569c51545..97a0738e1cf 100644 --- a/eslint.config.mts +++ b/eslint.config.mts @@ -179,7 +179,7 @@ export default [ // Modules over the line limit that are not split yet. files: [ 'packages/renderer/src/universe/prepared-world-context.ts', - 'site/test/prepared-world-context.test.ts', + 'site/world/prepared-world-context.test.ts', 'packages/renderer/src/universe/world-context/world-context-planner.test.ts', 'packages/renderer/src/sky/prepared-sky-runtime.test.ts', 'packages/telescope-cli/src/archives/interferometry/alma-disc-selfcal.mts', diff --git a/package.json b/package.json index 7974263f0c6..9d6208e1bda 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "setup:asset-data": "node packages/bake/cli/setup-assets.mts", "setup:prepared": "node packages/bake/cli/setup-assets.mts --location=prepared", "test": "pnpm prepare:environment-images && pnpm prepare:nebulae && pnpm test:packages && pnpm test:site && pnpm test:lab", - "test:run": "node --import ./packages/core/src/node/register-vite-suffix.mts --import ./site/test/navigation-router-context.mts --experimental-test-module-mocks --test --test-concurrency=4 --test-timeout=180000", + "test:run": "node --import ./packages/core/src/node/register-vite-suffix.mts --import ./site/scene/navigation-router-context.test-support.mts --experimental-test-module-mocks --test --test-concurrency=4 --test-timeout=180000", "test:packages": "pnpm test:run \"packages/**/*.test.{ts,mts}\" \"integration/**/*.test.{ts,mts}\"", "test:site": "pnpm test:run \"site/**/!(rendered-page).test.{ts,mts}\" \"src/**/*.test.{ts,mts}\" \".github/**/*.test.mts\" \"labs/performance/*.test.mts\"", "typecheck": "node .github/scripts/ci/checkout/typecheck.mts", diff --git a/packages/renderer/AGENTS.md b/packages/renderer/AGENTS.md index 6861af42593..7e6f6b3b911 100644 --- a/packages/renderer/AGENTS.md +++ b/packages/renderer/AGENTS.md @@ -87,4 +87,4 @@ surface fly-to calibration belong to `@cssearth/engine`. Renderer extends the en ## Accepted test boundaries -Node tests beside `src/node/` verify private implementation details; `test/` holds package integration fixtures and helpers. Three explicit `./test/` exports expose only the fixture files imported through package entries. The sole consumer outside renderer is `site/test/runtime-package.test.mts`, which imports `@cssearth/renderer/test/object-runtime-package.mts`; the orbit and camera-orientation fixture exports serve renderer tests. +Node tests beside `src/node/` verify private implementation details; `test/` holds package integration fixtures and helpers. Three explicit `./test/` exports expose only the fixture files imported through package entries. The sole consumer outside renderer is `site/world/runtime-package.test.mts`, which imports `@cssearth/renderer/test/object-runtime-package.mts`; the orbit and camera-orientation fixture exports serve renderer tests. diff --git a/packages/renderer/src/node/test-exports.test.mts b/packages/renderer/src/node/test-exports.test.mts index c322e9f3939..d5ab0226294 100644 --- a/packages/renderer/src/node/test-exports.test.mts +++ b/packages/renderer/src/node/test-exports.test.mts @@ -21,7 +21,7 @@ test('renderer fixture exports are exactly the imported test entries', () => { } const exported = Object.keys(entries).filter(key => key.startsWith('./test/')); assert.deepEqual(exported.sort(), [...imports].sort()); - assert.deepEqual([...external], ['site/test/runtime-package.test.mts']); + assert.deepEqual([...external], ['site/world/runtime-package.test.mts']); for (const entry of exported) { assert.equal(requireString(entries[entry]), entry); assert.ok(import.meta.resolve(`@cssearth/renderer/${entry.slice(2)}`).endsWith(entry.slice(1))); diff --git a/site/application-world-context.mts b/site/application-world-context.mts index 189c9b23808..a08bc291396 100644 --- a/site/application-world-context.mts +++ b/site/application-world-context.mts @@ -15,7 +15,7 @@ import { mountCatalogueMoonLabels } from './catalogue-moon-labels.mts'; import { loadApplicationUniverse } from './application-world-resources.mts'; import { ancestorIds, knownAncestors } from './object-directory.mts'; import { CONTEXT_OBJECT_DESCRIPTORS } from './prepared-context-objects.mts'; -import { surroundingHosts } from './surrounded-body.mts'; +import { surroundingHosts } from './world/surrounded-body.mts'; /** The world's prepared data and planner worker, which `startup-boot.mts` starts while the first body still loads. */ export { loadApplicationUniverse }; diff --git a/site/test/startup-cover.test.mts b/site/browser/startup-cover.test.mts similarity index 100% rename from site/test/startup-cover.test.mts rename to site/browser/startup-cover.test.mts diff --git a/site/test/object-package-contract.test.mts b/site/build/object-package-contract.test.mts similarity index 96% rename from site/test/object-package-contract.test.mts rename to site/build/object-package-contract.test.mts index 685af199669..5a38f7016dd 100644 --- a/site/test/object-package-contract.test.mts +++ b/site/build/object-package-contract.test.mts @@ -6,16 +6,16 @@ import { mkdtemp, mkdir, writeFile, rm } from "node:fs/promises"; import { tmpdir } from "node:os"; import { dirname, resolve } from "node:path"; -import { required } from './navigation-test-values.mts'; +import { required } from '../navigation/navigation-test-values.test-support.mts'; import { SCENE_OBJECTS } from "../objects.mts"; -import { authoredObjectFixture } from "../build/fixtures/authored-object-fixture.mts"; +import { authoredObjectFixture } from "./fixtures/authored-object-fixture.mts"; import { objectInformationSource, validateObjectEditorial } from "@cssearth/bake/sources"; import { objectPackagePaths, validateObjectPackageFiles, validateObjectData, validateInventory, -} from "../build/object-package-contract.mts"; +} from "./object-package-contract.mts"; const implemented = SCENE_OBJECTS; diff --git a/site/test/body-moons.test.mts b/site/build/prepare/body-moons.test.mts similarity index 89% rename from site/test/body-moons.test.mts rename to site/build/prepare/body-moons.test.mts index 63b80a673b6..88d2a33d7f0 100644 --- a/site/test/body-moons.test.mts +++ b/site/build/prepare/body-moons.test.mts @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); -import catalogues from '../source/moon-catalogues.json' with { type: 'json' }; -import { parseMoonCatalogue, prepareBodyMoons } from '../prepare-body-moons.mts'; +import catalogues from '../../source/moon-catalogues.json' with { type: 'json' }; +import { parseMoonCatalogue, prepareBodyMoons } from '../../prepare-body-moons.mts'; const catalogue = catalogues.systems.find(system => system.id === 'saturn')!; test('Saturn lists every source moon and only links registered scene objects', () => { diff --git a/site/test/category-frames.test.mts b/site/build/prepare/category-frames.test.mts similarity index 95% rename from site/test/category-frames.test.mts rename to site/build/prepare/category-frames.test.mts index 2eed51bb114..ff8460fb217 100644 --- a/site/test/category-frames.test.mts +++ b/site/build/prepare/category-frames.test.mts @@ -2,9 +2,9 @@ import assert from 'node:assert/strict'; import { readFile } from 'node:fs/promises'; import { resolve } from 'node:path'; import { sourceTest } from '@cssearth/objects/node/source-test'; -import { notableBodies, prepareCategoryFrame, CATEGORY_FRAMED_SHARE } from '../build/prepare/prepare-world-presentation.mts'; -import { PREPARED_WORLD_PRESENTATION } from '../prepared-world-presentation.mts'; -import { CATEGORY_FRAMES, categoryZoomTarget } from '../system-framing.mts'; +import { notableBodies, prepareCategoryFrame, CATEGORY_FRAMED_SHARE } from './prepare-world-presentation.mts'; +import { PREPARED_WORLD_PRESENTATION } from '../../prepared-world-presentation.mts'; +import { CATEGORY_FRAMES, categoryZoomTarget } from '../../system-framing.mts'; const test = sourceTest(); test('a category frames the nearest members around their own centre, leaving the far outliers out', () => { diff --git a/site/test/prepared-icons.test.mts b/site/build/prepare/prepared-icons.test.mts similarity index 85% rename from site/test/prepared-icons.test.mts rename to site/build/prepare/prepared-icons.test.mts index e7329d411a5..2b25388a6f9 100644 --- a/site/test/prepared-icons.test.mts +++ b/site/build/prepare/prepared-icons.test.mts @@ -4,11 +4,11 @@ import { tmpdir } from "node:os"; import { resolve } from "node:path"; import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); -import { SourceEvidence } from "../overview/source-evidence-values.test-support.mts"; +import { SourceEvidence } from "../../overview/source-evidence-values.test-support.mts"; -import { prepareShellIcons } from "../build/prepare/prepare-shell-icons.mts"; -import { PREPARED_SHELL_ICONS } from "../prepared-shell-icons.mjs"; -import { SHELL_ICON_SOURCES } from "../source/icons/manifest.mts"; +import { prepareShellIcons } from "./prepare-shell-icons.mts"; +import { PREPARED_SHELL_ICONS } from "../../prepared-shell-icons.mjs"; +import { SHELL_ICON_SOURCES } from "../../source/icons/manifest.mts"; const projectRoot = resolve(import.meta.dirname, "../.."); diff --git a/site/test/system-text.test.mts b/site/build/prepare/system-text.test.mts similarity index 81% rename from site/test/system-text.test.mts rename to site/build/prepare/system-text.test.mts index 91c7ebd877a..7e9d38762af 100644 --- a/site/test/system-text.test.mts +++ b/site/build/prepare/system-text.test.mts @@ -1,16 +1,16 @@ import assert from 'node:assert/strict'; import { sourceTest } from '@cssearth/objects/node/source-test'; import { readSourceCatalog } from '@cssearth/bake/sources'; -import input from '../../src/navigation/system-text.json' with { type: 'json' }; -import { allSatelliteSystems } from '../satellite-systems.mts'; -import { requireObject } from '../objects.mts'; -import { systemObjectId } from '../model/system-address.mts'; -import { prepareSystemIntroductions } from '../build/prepare/system-text.mts'; -import { showsDefaultContextOrbit } from '../build/prepare/prepare-world-presentation.mts'; +import input from '../../../src/navigation/system-text.json' with { type: 'json' }; +import { allSatelliteSystems } from '../../satellite-systems.mts'; +import { requireObject } from '../../objects.mts'; +import { systemObjectId } from '../../model/system-address.mts'; +import { prepareSystemIntroductions } from './system-text.mts'; +import { showsDefaultContextOrbit } from './prepare-world-presentation.mts'; const test = sourceTest(); test('every satellite system has a cited introduction, which is its system object\'s description', async () => { - const catalogue = await readSourceCatalog(new URL('../../', import.meta.url).pathname); + const catalogue = await readSourceCatalog(new URL('../../../', import.meta.url).pathname); const hosts = allSatelliteSystems().map(system => system.hostId); const prepared = prepareSystemIntroductions(input, hosts, new Set(catalogue.records.map(record => record.id))); assert.deepEqual(prepared, Object.fromEntries(hosts.map(id => [id, requireObject(systemObjectId(id)).description]))); diff --git a/site/moon-catalogue.mts b/site/content/moon-catalogue.mts similarity index 94% rename from site/moon-catalogue.mts rename to site/content/moon-catalogue.mts index 907f53f12c2..eff6e9355c4 100644 --- a/site/moon-catalogue.mts +++ b/site/content/moon-catalogue.mts @@ -1,4 +1,4 @@ -import moonCatalogues from './source/moon-catalogues.json' with { type: 'json' }; +import moonCatalogues from '../source/moon-catalogues.json' with { type: 'json' }; import { sourceArray, sourceId, sourceObject, sourceText, sourceUnique } from '@cssearth/objects/sources'; /** Read names from the source catalogue without creating scene objects or invented positions. */ diff --git a/site/moon-catalogue.test.mts b/site/content/moon-catalogue.test.mts similarity index 89% rename from site/moon-catalogue.test.mts rename to site/content/moon-catalogue.test.mts index f6f41493ee6..d29c7b8706d 100644 --- a/site/moon-catalogue.test.mts +++ b/site/content/moon-catalogue.test.mts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; import test from 'node:test'; -import moonCatalogues from './source/moon-catalogues.json' with { type: 'json' }; +import moonCatalogues from '../source/moon-catalogues.json' with { type: 'json' }; import { sourceArray, sourceId, sourceObject, sourceText, sourceUnique } from '@cssearth/objects/sources'; import { catalogueMoons, parseMoonCatalogue, readMoonCatalogue } from './moon-catalogue.mts'; import ts from 'typescript'; @@ -54,11 +54,11 @@ function modulesNamedBy(file: URL): string[] { } test('production children read the shared reader and never name preparation; preparation has one reader', () => { - const children = modulesNamedBy(new URL('./object-children.mts', import.meta.url)); + const children = modulesNamedBy(new URL('../object-children.mts', import.meta.url)); const reader = new URL('./moon-catalogue.mts', import.meta.url).pathname; assert.ok(children.includes(reader), 'Children use the shared reader'); - assert.ok(!children.includes(new URL('./prepare-body-moons.mts', import.meta.url).pathname), 'Children never import preparation'); - const preparation = modulesNamedBy(new URL('./prepare-body-moons.mts', import.meta.url)); + assert.ok(!children.includes(new URL('../prepare-body-moons.mts', import.meta.url).pathname), 'Children never import preparation'); + const preparation = modulesNamedBy(new URL('../prepare-body-moons.mts', import.meta.url)); assert.ok(preparation.includes(reader), 'Preparation reads the shared catalogue'); assert.ok(!preparation.some(module => module.endsWith('/moon-catalogues.json') || module === '@cssearth/objects/sources'), 'Preparation must not re-parse a separate catalogue'); }); diff --git a/site/destination-browser.characterization.test.mts b/site/destination-browser.characterization.test.mts index 667b275fbc6..a72039f3ef0 100644 --- a/site/destination-browser.characterization.test.mts +++ b/site/destination-browser.characterization.test.mts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import { parseHTML } from 'linkedom'; import { createDestinationBrowser } from './destination-browser.mts'; -import { required } from './test/navigation-test-values.mts'; +import { required } from './navigation/navigation-test-values.test-support.mts'; test('destination panel publishes city fields, opens only once per selection and forwards reset', () => { const { document } = parseHTML(''); diff --git a/site/diagnostic-recorder.characterization.test.mts b/site/diagnostic-recorder.characterization.test.mts index 7ca0ff5984b..84808a0f4d2 100644 --- a/site/diagnostic-recorder.characterization.test.mts +++ b/site/diagnostic-recorder.characterization.test.mts @@ -4,7 +4,7 @@ import { parseHTML } from 'linkedom'; import { isRecord } from '@cssearth/core'; import { createDiagnosticRecorder, mountDiagnosticRecorder } from './diagnostic-recorder.mts'; import type { BrowserWindow } from './browser/browser-types.mts'; -import { required } from './test/navigation-test-values.mts'; +import { required } from './navigation/navigation-test-values.test-support.mts'; function fixture(markup = '') { const { document, window } = parseHTML(`${markup}`); diff --git a/site/object-entry-types.test.mts b/site/directory/object-entry-types.test.mts similarity index 84% rename from site/object-entry-types.test.mts rename to site/directory/object-entry-types.test.mts index 8d700a835d3..a3ec1b08c53 100644 --- a/site/object-entry-types.test.mts +++ b/site/directory/object-entry-types.test.mts @@ -21,10 +21,10 @@ function reachedModules(file: URL, tree: ts.SourceFile): string[] { } test('the directory imports erased aliases directly without depending on the registry', () => { - const file = new URL('./object-directory.mts', import.meta.url), directory = source(file); - const registry = new URL('./objects.mts', import.meta.url).pathname; + const file = new URL('../object-directory.mts', import.meta.url), directory = source(file); + const registry = new URL('../objects.mts', import.meta.url).pathname; assert.ok(!reachedModules(file, directory).some(module => module === registry || module === registry.replace(/\.mts$/u, '')), 'the directory must not name the registry in any import, re-export or import type'); - const typesPath = new URL('./directory/object-entry-types.mts', import.meta.url).pathname; + const typesPath = new URL('./object-entry-types.mts', import.meta.url).pathname; const imports = directory.statements.filter(ts.isImportDeclaration); const entry = imports.find(node => ts.isStringLiteral(node.moduleSpecifier) && new URL(node.moduleSpecifier.text, file).pathname === typesPath); assert.ok(entry?.importClause?.isTypeOnly); @@ -34,10 +34,10 @@ test('the directory imports erased aliases directly without depending on the reg }); test('the registry preserves every extracted alias as an erased re-export', () => { - const registry = source(new URL('./objects.mts', import.meta.url)); - const typesPath = new URL('./directory/object-entry-types.mts', import.meta.url).pathname; + const registry = source(new URL('../objects.mts', import.meta.url)); + const typesPath = new URL('./object-entry-types.mts', import.meta.url).pathname; const exports = registry.statements.filter(ts.isExportDeclaration).filter(node => - node.moduleSpecifier && ts.isStringLiteral(node.moduleSpecifier) && new URL(node.moduleSpecifier.text, new URL('./objects.mts', import.meta.url)).pathname === typesPath); + node.moduleSpecifier && ts.isStringLiteral(node.moduleSpecifier) && new URL(node.moduleSpecifier.text, new URL('../objects.mts', import.meta.url)).pathname === typesPath); assert.equal(exports.length, 1); const entry = exports[0]!; assert.ok(entry.isTypeOnly); @@ -47,7 +47,7 @@ test('the registry preserves every extracted alias as an erased re-export', () = }); test('the alias owner contains only type imports and the three exported aliases', () => { - const file = new URL('./directory/object-entry-types.mts', import.meta.url), types = source(file); + const file = new URL('./object-entry-types.mts', import.meta.url), types = source(file); const imports = types.statements.filter(ts.isImportDeclaration); assert.equal(imports.length, 2); assert.ok(imports.every(node => node.importClause?.isTypeOnly)); diff --git a/site/feature-browser.characterization.test.mts b/site/feature-browser.characterization.test.mts index c81d7f9c508..db399812bc3 100644 --- a/site/feature-browser.characterization.test.mts +++ b/site/feature-browser.characterization.test.mts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import { parseHTML } from 'linkedom'; import { createFeatureBrowser, type FindResult } from './feature-browser.mts'; -import { required } from './test/navigation-test-values.mts'; +import { required } from './navigation/navigation-test-values.test-support.mts'; function fixture() { const { document, window } = parseHTML(`

${Array.from({ length: 2 }, () => '
').join('')}
`); diff --git a/site/journeys/manifest-entries.json b/site/journeys/manifest-entries.json index bdb87e48176..e833320d10e 100644 --- a/site/journeys/manifest-entries.json +++ b/site/journeys/manifest-entries.json @@ -2230,7 +2230,7 @@ { "id": "handler:site:prepared-arrival:createPreparedArrival:abort:1", "kind": "handler", - "source": "site/prepared-arrival.mts:27", + "source": "site/navigation/prepared-arrival.mts:27", "eventTypes": [ "abort" ], diff --git a/site/test/search-api.test.mts b/site/journeys/search-api.test.mts similarity index 100% rename from site/test/search-api.test.mts rename to site/journeys/search-api.test.mts diff --git a/site/test/navigation-request.test.mts b/site/navigation/navigation-request.test.mts similarity index 98% rename from site/test/navigation-request.test.mts rename to site/navigation/navigation-request.test.mts index 5282de0abb3..41e557fb1e1 100644 --- a/site/test/navigation-request.test.mts +++ b/site/navigation/navigation-request.test.mts @@ -3,7 +3,7 @@ import { test } from 'node:test'; import { requireObject } from '../objects.mts'; import { subjectView } from '../scene/scene-subject.mts'; import { WORLD_OBJECTS } from '../world-objects.mts'; -import { resolveNavigation } from '../navigation/navigation-request.mts'; +import { resolveNavigation } from './navigation-request.mts'; test('a body without a hosted system opens detail on the first click', () => { for (const id of ['venus', 'mercury']) { diff --git a/site/test/navigation-test-values.mts b/site/navigation/navigation-test-values.test-support.mts similarity index 100% rename from site/test/navigation-test-values.mts rename to site/navigation/navigation-test-values.test-support.mts diff --git a/site/navigation/navigation-types.test.mts b/site/navigation/navigation-types.test.mts index 0d066a1e8ba..18931936f35 100644 --- a/site/navigation/navigation-types.test.mts +++ b/site/navigation/navigation-types.test.mts @@ -33,7 +33,7 @@ test('production history transport depends on navigation contracts, never reques const declarations = source('./navigation-history.mts').statements.filter(ts.isImportDeclaration); assert.ok(declarations.every(item => !ts.isStringLiteral(item.moduleSpecifier) || !item.moduleSpecifier.text.includes('navigation-request'))); typeImport('./navigation-history.mts', './navigation-types.mts', ['NavigationHistory', 'NavigationIntent']); - typeImport('../prepared-arrival.mts', './navigation/navigation-types.mts', ['WorldHandoff']); + typeImport('./prepared-arrival.mts', './navigation-types.mts', ['WorldHandoff']); typeImport('./navigation-request.mts', './navigation-types.mts', ['NavigationHistory', 'NavigationIntent', 'SelectionTarget']); }); diff --git a/site/prepared-arrival.characterization.test.mts b/site/navigation/prepared-arrival.characterization.test.mts similarity index 98% rename from site/prepared-arrival.characterization.test.mts rename to site/navigation/prepared-arrival.characterization.test.mts index c52ef78d0b2..a16f51987e7 100644 --- a/site/prepared-arrival.characterization.test.mts +++ b/site/navigation/prepared-arrival.characterization.test.mts @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; import { parseHTML } from 'linkedom'; import { createPreparedArrival } from './prepared-arrival.mts'; -import type { SceneFactory } from './browser/browser-types.mts'; +import type { SceneFactory } from '../browser/browser-types.mts'; import type { ObjectPreparationView } from '@cssearth/renderer/runtime/prepared-object-navigation.ts'; import type { ObjectSceneLifecycle } from '@cssearth/renderer/runtime/object-scene.ts'; diff --git a/site/prepared-arrival.mts b/site/navigation/prepared-arrival.mts similarity index 93% rename from site/prepared-arrival.mts rename to site/navigation/prepared-arrival.mts index 58fbcdcae1d..9da87c01df6 100644 --- a/site/prepared-arrival.mts +++ b/site/navigation/prepared-arrival.mts @@ -1,9 +1,9 @@ -import type { SceneFactory, MountOptions } from './browser/browser-types.mts'; +import type { SceneFactory, MountOptions } from '../browser/browser-types.mts'; import type { ObjectSceneLifecycle } from '@cssearth/renderer/runtime/object-scene.ts'; import type { ObjectPreparationView } from '@cssearth/renderer/runtime/prepared-object-navigation.ts'; -import type { WorldHandoff } from './navigation/navigation-types.mts'; -import type { prepareArrivalBillboard } from './navigation/arrival-billboard.mts'; -import { createPreparedSceneOwnership } from './navigation/prepared-scene-ownership.mts'; +import type { WorldHandoff } from './navigation-types.mts'; +import type { prepareArrivalBillboard } from './arrival-billboard.mts'; +import { createPreparedSceneOwnership } from './prepared-scene-ownership.mts'; type Navigation = NonNullable; type Preparation = Parameters[0]; diff --git a/site/test/prepared-arrival.test.mts b/site/navigation/prepared-arrival.test.mts similarity index 97% rename from site/test/prepared-arrival.test.mts rename to site/navigation/prepared-arrival.test.mts index ff744e38498..4254034de1b 100644 --- a/site/test/prepared-arrival.test.mts +++ b/site/navigation/prepared-arrival.test.mts @@ -1,6 +1,6 @@ import assert from 'node:assert/strict'; import test from 'node:test'; -import { createPreparedArrival } from '../prepared-arrival.mts'; +import { createPreparedArrival } from './prepared-arrival.mts'; import type { SceneFactory } from '../browser/browser-types.mts'; import type { ObjectSceneLifecycle } from '@cssearth/renderer/runtime/object-scene.ts'; import type { ObjectPreparationView } from '@cssearth/renderer/runtime/prepared-object-navigation.ts'; diff --git a/site/test/satellite-arrival-framing.test.mts b/site/navigation/satellite-arrival-framing.test.mts similarity index 97% rename from site/test/satellite-arrival-framing.test.mts rename to site/navigation/satellite-arrival-framing.test.mts index 7f9bba56739..747823daa9f 100644 --- a/site/test/satellite-arrival-framing.test.mts +++ b/site/navigation/satellite-arrival-framing.test.mts @@ -1,5 +1,5 @@ import { parsePreparedObjectRuntime } from '@cssearth/objects'; -import { readSystemViewFile } from './system-view-file.mts'; +import { readSystemViewFile } from '../world/system-view-file.test-support.mts'; import assert from 'node:assert/strict'; import { readFile } from 'node:fs/promises'; @@ -13,7 +13,7 @@ import { allSatelliteSystems } from '../satellite-systems.mts'; import { satelliteSelectionAtCamera } from '../satellite-selection.mts'; import { createPreparedWorldNavigation } from '../prepared-world-navigation.mts'; import { loadSystemView } from '../system-framing.mts'; -import { navigationFixture, required, unusedSharedView } from './navigation-test-values.mts'; +import { navigationFixture, required, unusedSharedView } from './navigation-test-values.test-support.mts'; const test = sourceTest(); const source = required(SCENE_OBJECTS.find(object => object.id === 'earth')); diff --git a/site/navigation/view-url-runtime.characterization.test.mts b/site/navigation/view-url-runtime.characterization.test.mts index 744e8ddcdb3..b5ea00d18ea 100644 --- a/site/navigation/view-url-runtime.characterization.test.mts +++ b/site/navigation/view-url-runtime.characterization.test.mts @@ -3,7 +3,7 @@ import test from 'node:test'; import { parseSharedView } from '@cssearth/renderer/navigation'; import type { ObjectSharedView } from '@cssearth/renderer/runtime/object-scene.ts'; import { bindViewUrl } from './view-url-runtime.mts'; -import { required } from '../test/navigation-test-values.mts'; +import { required } from './navigation-test-values.test-support.mts'; const token = 'UcM-I2wcRENV2b3fvnbItDlXwOej1wo9cZ5BQsczQAAAAEAFN-vvz-Gyv9XjqHSKGu0AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAA'; function fixture(initial = 'http://example.test/venus/?other=keep#info') { diff --git a/site/object-children.mts b/site/object-children.mts index dd933e272ea..d9ce0fc3050 100644 --- a/site/object-children.mts +++ b/site/object-children.mts @@ -1,6 +1,6 @@ import { OBJECTS, ancestorsOf, type NavigableObject } from './objects.mts'; import { WORLD_HOST_ID } from './navigation/navigation-scope.mts'; -import { catalogueMoons } from './moon-catalogue.mts'; +import { catalogueMoons } from './content/moon-catalogue.mts'; import { APPLICATION_WORLD_CONTEXT, APPLICATION_WORLD_FILE_OF } from './world-context-plan.mts'; const PARSEC_M = 3.085677581491367e16; diff --git a/site/overview-selection.characterization.test.mts b/site/overview-selection.characterization.test.mts index 88e997427f2..0dcdc487771 100644 --- a/site/overview-selection.characterization.test.mts +++ b/site/overview-selection.characterization.test.mts @@ -3,7 +3,7 @@ import { test } from 'node:test'; import { selectionAtCamera, watchCameraSelection } from './overview-selection.mts'; import { systemById } from './object-systems.mts'; import { worldCameraFromCenteredPresentation } from '@cssearth/engine'; -import { objectFixture, navigationFixture, required } from './test/navigation-test-values.mts'; +import { objectFixture, navigationFixture, required } from './navigation/navigation-test-values.test-support.mts'; import type { PreparedWorldCameraFrame } from '@cssearth/objects'; import type { ObjectWorldNavigationListener } from '@cssearth/renderer/runtime/world-navigation-types.ts'; const au = 149597870700; diff --git a/site/test/compact-spectrum.test.mts b/site/overview/compact-spectrum.test.mts similarity index 85% rename from site/test/compact-spectrum.test.mts rename to site/overview/compact-spectrum.test.mts index c22608a1cba..5c75bd88994 100644 --- a/site/test/compact-spectrum.test.mts +++ b/site/overview/compact-spectrum.test.mts @@ -4,11 +4,11 @@ const test = sourceTest(); import { readFile } from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; import { SCENE_OBJECTS } from '../objects.mts'; -import { required } from './navigation-test-values.mts'; -import { SourceEvidence } from '../overview/source-evidence-values.test-support.mts'; +import { required } from '../navigation/navigation-test-values.test-support.mts'; +import { SourceEvidence } from './source-evidence-values.test-support.mts'; import { hasErrorCode } from '@cssearth/core'; -import { parseSpectrumRecipe, readSpectrumData } from '../overview/spectrum-data.mts'; -import { renderCompactSpectrum } from '../overview/compact-spectrum.mts'; +import { parseSpectrumRecipe, readSpectrumData } from './spectrum-data.mts'; +import { renderCompactSpectrum } from './compact-spectrum.mts'; test('compact charts retain every supplied spectrum sample across the registry', async () => { let charts = 0; diff --git a/site/packaged-object-runtime.characterization.test.mts b/site/packaged-object-runtime.characterization.test.mts index 23e7f194b46..24110fdad71 100644 --- a/site/packaged-object-runtime.characterization.test.mts +++ b/site/packaged-object-runtime.characterization.test.mts @@ -7,7 +7,7 @@ import { join } from 'node:path'; import * as renderer from '@cssearth/renderer'; import { parsePreparedObjectRuntime, type PreparedWorldCameraFrame } from '@cssearth/objects'; import { characterizationRuntime } from './scene/fixtures/characterization-runtime.mts'; -import { unusedMountOptions, required } from './test/navigation-test-values.mts'; +import { unusedMountOptions, required } from './navigation/navigation-test-values.test-support.mts'; import { DIAGNOSTICS_ENABLED } from './browser/diagnostics-policy.mts'; import * as runtimePolicy from './browser/runtime-policy.mts'; diff --git a/site/pages/objects/[id]/entry.json.ts b/site/pages/objects/[id]/entry.json.ts index 1bba5a1e42b..2651bff36cd 100644 --- a/site/pages/objects/[id]/entry.json.ts +++ b/site/pages/objects/[id]/entry.json.ts @@ -5,7 +5,7 @@ import { worldPlaceOf } from '../../../world-places.mts'; import { OBJECTS, ancestorsOf } from '../../../objects.mts'; import { APPLICATION_WORLD_CONTEXT } from '../../../world-context-plan.mts'; import { hostedBanksOf } from '../../../hosted-banks.mts'; -import { surroundedBody, surroundingHosts } from '../../../surrounded-body.mts'; +import { surroundedBody, surroundingHosts } from '../../../world/surrounded-body.mts'; import bankAssets from '../../../prepared-context-bank-assets.json' with { type: 'json' }; import { readFile } from 'node:fs/promises'; import { resolve } from 'node:path'; diff --git a/site/prepare-body-moons.characterization.test.mts b/site/prepare-body-moons.characterization.test.mts index e31d350aa53..bbfdb16274e 100644 --- a/site/prepare-body-moons.characterization.test.mts +++ b/site/prepare-body-moons.characterization.test.mts @@ -27,7 +27,7 @@ test('preparation preserves the old serialized results, ordering and named-label const { default: input } = await import('./source/moon-catalogues.json', { with: { type: 'json' } }); const { SEARCH_OBJECTS } = await import('./search/search-objects.mts'); const { systemObjectId } = await import('./model/system-address.mts'); - const { readMoonCatalogue } = await import('./moon-catalogue.mts'); + const { readMoonCatalogue } = await import('./content/moon-catalogue.mts'); for (const hostId of [...input.systems.map(system => system.id), ...new Set(SEARCH_OBJECTS.map(object => object.id)), 'not-a-host']) { const available = SEARCH_OBJECTS.filter(object => object.classification === 'satellite' && object.parent === systemObjectId(hostId)); const source = input.systems.find(system => system.id === hostId); diff --git a/site/prepare-body-moons.mts b/site/prepare-body-moons.mts index 6ccbab32de5..b823c06a9c8 100644 --- a/site/prepare-body-moons.mts +++ b/site/prepare-body-moons.mts @@ -1,8 +1,8 @@ import { SEARCH_OBJECTS } from './search/search-objects.mts'; import type { ObjectEntry } from './objects.mts'; import { systemObjectId } from './model/system-address.mts'; -import { readMoonCatalogue } from './moon-catalogue.mts'; -export { parseMoonCatalogue, catalogueMoons } from './moon-catalogue.mts'; +import { readMoonCatalogue } from './content/moon-catalogue.mts'; +export { parseMoonCatalogue, catalogueMoons } from './content/moon-catalogue.mts'; import { labelEligible } from '@cssearth/renderer/labels/universe-label-policy.ts'; export interface MoonListEntry { id: string; name: string; object?: ObjectEntry; } diff --git a/site/prepared-world-navigation.characterization.test.mts b/site/prepared-world-navigation.characterization.test.mts index 54103b94e96..d5c7c288e1c 100644 --- a/site/prepared-world-navigation.characterization.test.mts +++ b/site/prepared-world-navigation.characterization.test.mts @@ -3,7 +3,7 @@ import { test } from 'node:test'; import { setImmediate as nextTurn } from 'node:timers/promises'; import { createPreparedWorldNavigation } from './prepared-world-navigation.mts'; import { CATEGORY_FRAMES, DATASET_VOLUMES, volumeZoomTarget } from './system-framing.mts'; -import { navigationFixture, unusedSharedView, required } from './test/navigation-test-values.mts'; +import { navigationFixture, unusedSharedView, required } from './navigation/navigation-test-values.test-support.mts'; import { presentWorldCamera } from '@cssearth/renderer/navigation/world-camera.ts'; import { formatSharedView, savedWorldCamera } from '@cssearth/renderer/navigation'; import type { WorldCameraPose } from '@cssearth/engine'; diff --git a/site/prepared-world-navigation.mts b/site/prepared-world-navigation.mts index 6966d484fd7..13e41d84955 100644 --- a/site/prepared-world-navigation.mts +++ b/site/prepared-world-navigation.mts @@ -3,7 +3,7 @@ import { satelliteSystemByHost } from './satellite-systems.mts'; import { eyeDistanceM, sameEyePlace } from '@cssearth/engine'; import { createZoomCarry } from './world/zoom-carry.mts'; import { createPreparedSceneOwnership } from './navigation/prepared-scene-ownership.mts'; -import { createPreparedArrival } from './prepared-arrival.mts'; +import { createPreparedArrival } from './navigation/prepared-arrival.mts'; import { canUseArrivalBillboard, frameArrivalBillboard, prepareArrivalBillboard } from './navigation/arrival-billboard.mts'; import type { ObjectEntry } from './objects.mts'; import type { SceneFactory, ShellCamera, MountOptions } from './browser/browser-types.mts'; diff --git a/site/test/navigation-router-context.mts b/site/scene/navigation-router-context.test-support.mts similarity index 100% rename from site/test/navigation-router-context.mts rename to site/scene/navigation-router-context.test-support.mts diff --git a/site/scene/scene-publication.test.mts b/site/scene/scene-publication.test.mts index daee6a03ecc..3e986999b05 100644 --- a/site/scene/scene-publication.test.mts +++ b/site/scene/scene-publication.test.mts @@ -5,7 +5,7 @@ import { createScenePublication } from './scene-publication.mts'; import type { SceneSessionState } from './scene-session.mts'; import type { BrowserWindow } from '../browser/browser-types.mts'; import type { ObjectShell } from '../shell/object-shell-types.mts'; -import { unusedSharedView } from '../test/navigation-test-values.mts'; +import { unusedSharedView } from '../navigation/navigation-test-values.test-support.mts'; test('readiness stays observable without publishing body lifecycle classes', () => { const { document, window } = parseHTML('
'); diff --git a/site/scene/scene-session.test.mts b/site/scene/scene-session.test.mts index 6aedd694eeb..dd560aba9bd 100644 --- a/site/scene/scene-session.test.mts +++ b/site/scene/scene-session.test.mts @@ -5,7 +5,7 @@ import { createSceneSessions } from './scene-session.mts'; import { createPreparedSceneOwnership } from '../navigation/prepared-scene-ownership.mts'; import type { SceneFactory } from '../browser/browser-types.mts'; import type { ObjectSceneLifecycle } from '@cssearth/renderer/runtime/object-scene.ts'; -import { unusedSharedView, unusedMountOptions } from '../test/navigation-test-values.mts'; +import { unusedSharedView, unusedMountOptions } from '../navigation/navigation-test-values.test-support.mts'; function deferred() { let resolve!: (value: T) => void, reject!: (error: unknown) => void; diff --git a/site/test/search-response.test.mts b/site/server/search-response.test.mts similarity index 98% rename from site/test/search-response.test.mts rename to site/server/search-response.test.mts index 1239656d2ec..70f6cf5ba2f 100644 --- a/site/test/search-response.test.mts +++ b/site/server/search-response.test.mts @@ -2,12 +2,12 @@ import assert from 'node:assert/strict'; import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); import { parseHTML } from 'linkedom'; -import { handleSearchRequest, renderSearchResponse } from '../server/search-response.mts'; +import { handleSearchRequest, renderSearchResponse } from './search-response.mts'; import { createSelectionPresentation } from '../selection-presentation.mts'; -import searchRoute from '../server/search-route.mts'; +import searchRoute from './search-route.mts'; import { createFeatureBrowser } from '../feature-browser.mts'; -import { findObjects, handleFindRequest } from '../server/find.mts'; -import { readPublicFile, type SearchData } from '../server/search-data.mts'; +import { findObjects, handleFindRequest } from './find.mts'; +import { readPublicFile, type SearchData } from './search-data.mts'; import { parseFindResponse } from '../search/find-protocol.mts'; import type { CatalogueIndexEntry } from '../search/catalogue-index.mts'; diff --git a/site/shell/chart-pixel-alignment.test.mts b/site/shell/chart-pixel-alignment.test.mts index b65e859b762..1757a0df815 100644 --- a/site/shell/chart-pixel-alignment.test.mts +++ b/site/shell/chart-pixel-alignment.test.mts @@ -2,7 +2,7 @@ import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); import assert from 'node:assert/strict'; import type { BrowserWindow } from '../browser/browser-types.mts'; -import { required } from '../test/navigation-test-values.mts'; +import { required } from '../navigation/navigation-test-values.test-support.mts'; import { createChartPixelAlignmentController } from './chart-pixel-alignment.mts'; test('hidden charts schedule no work; visible charts batch reads, retain corrections, and retire cleanly', () => { diff --git a/site/shell/dataset-picker.characterization.test.mts b/site/shell/dataset-picker.characterization.test.mts index 90aee304ff8..131e43566a2 100644 --- a/site/shell/dataset-picker.characterization.test.mts +++ b/site/shell/dataset-picker.characterization.test.mts @@ -5,7 +5,7 @@ import { createSceneLifetime } from '@cssearth/engine'; import { sectionElements } from '@cssearth/renderer'; import { bindDatasetPicker, mountDatasetPickerLayout } from './dataset-picker.mts'; import type { BrowserWindow } from '../browser/browser-types.mts'; -import { required } from '../test/navigation-test-values.mts'; +import { required } from '../navigation/navigation-test-values.test-support.mts'; const markup = `
diff --git a/site/startup-billboard.characterization.test.mts b/site/startup-billboard.characterization.test.mts index d0146d5ce91..15ccd9f466e 100644 --- a/site/startup-billboard.characterization.test.mts +++ b/site/startup-billboard.characterization.test.mts @@ -10,7 +10,7 @@ let coverAvailable = true, prepareFails = false, initialFails = false; const cover = { publish(...args: unknown[]) { calls.push(['publish', ...args]); } }; const handoff = { mountOptions: { arriving: true } }; mock.module(new URL('./navigation/arrival-billboard.mts', import.meta.url).href, { namedExports: { async prepareArrivalBillboard(...args: unknown[]) { calls.push(['cover', ...args]); return coverAvailable ? cover : null; } } }); -mock.module(new URL('./prepared-arrival.mts', import.meta.url).href, { namedExports: { +mock.module(new URL('./navigation/prepared-arrival.mts', import.meta.url).href, { namedExports: { createPreparedArrival(signal: AbortSignal, value: unknown, reveal: () => void, input: unknown) { calls.push(['arrival', signal, value, input]); return { diff --git a/site/startup-billboard.mts b/site/startup-billboard.mts index 6ec9eb28b52..59508a87686 100644 --- a/site/startup-billboard.mts +++ b/site/startup-billboard.mts @@ -3,7 +3,7 @@ import { parseObjectDiscovery } from '@cssearth/objects'; import type { SceneFactory } from './browser/browser-types.mts'; import type { CameraViewport } from '@cssearth/renderer/navigation/camera-viewport.ts'; import { prepareArrivalBillboard } from './navigation/arrival-billboard.mts'; -import { createPreparedArrival } from './prepared-arrival.mts'; +import { createPreparedArrival } from './navigation/prepared-arrival.mts'; import { namesSystem } from './navigation/navigation-scope.mts'; import { MOBILE_VIEWPORT_QUERY } from './browser/runtime-policy.mts'; import { releaseStartup } from '@cssearth/renderer/rendering/startup-gate.ts'; diff --git a/site/system-framing.characterization.test.mts b/site/system-framing.characterization.test.mts index bd460bbad82..09cfa81852f 100644 --- a/site/system-framing.characterization.test.mts +++ b/site/system-framing.characterization.test.mts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; import { loadSystemView, systemViewLoaded, systemViewTarget, drawnGalaxiesZoomTarget, systemFramingRect } from './system-framing.mts'; -import { readSystemViewFile } from './test/system-view-file.mts'; +import { readSystemViewFile } from './world/system-view-file.test-support.mts'; import type { WorldCameraPose } from '@cssearth/engine'; const world: WorldCameraPose = { referenceFrame: 'test', epochJdTt: 1, pose: { positionM: [0, 0, 10], orientationXyzw: [0, 0, 0, 1] } }; diff --git a/site/test/diagnostic-recorder.test.mts b/site/test/diagnostic-recorder.test.mts index ec7427fd14f..d73b5b2db11 100644 --- a/site/test/diagnostic-recorder.test.mts +++ b/site/test/diagnostic-recorder.test.mts @@ -6,7 +6,7 @@ import { webcrypto } from 'node:crypto'; import { createDiagnosticRecorder } from '../diagnostic-recorder.mts'; import type { BrowserWindow } from '../browser/browser-types.mts'; import { isRecord } from '@cssearth/core'; -import { required } from './navigation-test-values.mts'; +import { required } from '../navigation/navigation-test-values.test-support.mts'; import { createNavigationTiming } from '../navigation/navigation-timing.mts'; function host() { diff --git a/site/test/overview-selection.test.mts b/site/test/overview-selection.test.mts index ad3b0ae78ff..97f8ce4b313 100644 --- a/site/test/overview-selection.test.mts +++ b/site/test/overview-selection.test.mts @@ -1,5 +1,5 @@ -import { testDistance } from './navigation-test-values.mts'; -import { readSystemViewFile } from './system-view-file.mts'; +import { testDistance } from '../navigation/navigation-test-values.test-support.mts'; +import { readSystemViewFile } from '../world/system-view-file.test-support.mts'; import assert from 'node:assert/strict'; import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); @@ -9,7 +9,7 @@ import { systemById } from '../object-systems.mts'; import { type PreparedWorldCameraFrame } from '@cssearth/objects'; import { worldCameraFromCenteredPresentation, type WorldCameraPose } from '@cssearth/engine'; -import { required, objectFixture, navigationFixture } from './navigation-test-values.mts'; +import { required, objectFixture, navigationFixture } from '../navigation/navigation-test-values.test-support.mts'; import type { ObjectWorldNavigationListener } from '@cssearth/renderer/runtime/world-navigation-types.ts'; import { SYSTEM_VIEW_HOSTS, loadSystemView } from '../system-framing.mts'; // System framing's candidates load after the first body mounts in the app; these tests need them loaded. diff --git a/site/test/prepared-world-navigation.test.mts b/site/test/prepared-world-navigation.test.mts index d0033ead2e8..e948e46c3a3 100644 --- a/site/test/prepared-world-navigation.test.mts +++ b/site/test/prepared-world-navigation.test.mts @@ -1,5 +1,5 @@ import { sourceTest } from '@cssearth/objects/node/source-test'; -import { readSystemViewFile } from './system-view-file.mts'; +import { readSystemViewFile } from '../world/system-view-file.test-support.mts'; const test = sourceTest(); import assert from 'node:assert/strict'; import { getEventListeners } from 'node:events'; @@ -10,7 +10,7 @@ import { createWorldSelectionTarget, formatSharedView, savedWorldCamera } from ' import { presentWorldCamera } from '@cssearth/renderer/navigation/world-camera.ts'; import { createPreparedWorldNavigation } from '../prepared-world-navigation.mts'; -import { required, position, navigationFixture, unusedSharedView } from './navigation-test-values.mts'; +import { required, position, navigationFixture, unusedSharedView } from '../navigation/navigation-test-values.test-support.mts'; import { type PreparedWorldCameraFrame, type PreparedArrivalView } from '@cssearth/objects'; import { type WorldCameraPose } from '@cssearth/engine'; import type { WorldCameraPresentation } from '@cssearth/renderer/navigation/world-camera.ts'; diff --git a/site/test/system-framing.test.mts b/site/test/system-framing.test.mts index ce4d23f33ae..9f454ae46a2 100644 --- a/site/test/system-framing.test.mts +++ b/site/test/system-framing.test.mts @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { readSystemViewFile } from './system-view-file.mts'; +import { readSystemViewFile } from '../world/system-view-file.test-support.mts'; import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); import { OBJECTS, SCENE_OBJECTS } from '../objects.mts'; @@ -16,7 +16,7 @@ import { presentWorldCamera } from '@cssearth/renderer/navigation/world-camera.t import { SYSTEM_FRAMING_ANGLES } from '../browser/runtime-policy.mts'; import { createSelectionFlight, sampleSelectionFlight } from '@cssearth/engine'; -import { required, position, quaternion, navigationFixture, unusedSharedView } from './navigation-test-values.mts'; +import { required, position, quaternion, navigationFixture, unusedSharedView } from '../navigation/navigation-test-values.test-support.mts'; import { parsePreparedWorldContext } from '@cssearth/objects'; import { type WorldCameraPose } from '@cssearth/engine'; import type { ObjectWorldNavigation } from '@cssearth/renderer/runtime/world-navigation-types.ts'; diff --git a/site/test/view-readout.test.mts b/site/test/view-readout.test.mts index e648b719b7e..7f697ec4e1a 100644 --- a/site/test/view-readout.test.mts +++ b/site/test/view-readout.test.mts @@ -2,7 +2,7 @@ import { sourceTest } from '@cssearth/objects/node/source-test'; import assert from 'node:assert/strict'; import type { WorldRotation } from '@cssearth/core'; import { type WorldCameraPose } from '@cssearth/engine'; -import { required } from './navigation-test-values.mts'; +import { required } from '../navigation/navigation-test-values.test-support.mts'; import { formatViewCoordinate, formatViewDate, formatViewDistance, viewScale } from '../minimap/view-format.mts'; import { measureExtendedSubjectView } from '../view-readout.mts'; import { measureView, pickUnitSphere } from '../minimap/view-measure.mts'; diff --git a/site/view-readout.characterization.test.mts b/site/view-readout.characterization.test.mts index 8636ab687d3..6c693cce4c9 100644 --- a/site/view-readout.characterization.test.mts +++ b/site/view-readout.characterization.test.mts @@ -3,7 +3,7 @@ import { test } from 'node:test'; import { parseHTML } from 'linkedom'; import { createViewReadout } from './view-readout.mts'; import type { BrowserWindow, ShellCamera } from './browser/browser-types.mts'; -import { navigationFixture, unusedSharedView } from './test/navigation-test-values.mts'; +import { navigationFixture, unusedSharedView } from './navigation/navigation-test-values.test-support.mts'; import type { ObjectWorldNavigation } from '@cssearth/renderer/runtime/world-navigation-types.ts'; import type { WorldCameraPose } from '@cssearth/engine'; diff --git a/site/world-system-views.characterization.test.mts b/site/world-system-views.characterization.test.mts index e9513622806..7baa794428b 100644 --- a/site/world-system-views.characterization.test.mts +++ b/site/world-system-views.characterization.test.mts @@ -1,7 +1,7 @@ import assert from 'node:assert/strict'; import { test } from 'node:test'; import { readApplicationSystemView } from './world-system-views.mts'; -import { readSystemViewFile } from './test/system-view-file.mts'; +import { readSystemViewFile } from './world/system-view-file.test-support.mts'; test('the default reader requests the host URL and preserves status and JSON failures', async t => { const requested: string[] = []; diff --git a/site/test/moon-labels.test.mts b/site/world/moon-labels.test.mts similarity index 100% rename from site/test/moon-labels.test.mts rename to site/world/moon-labels.test.mts diff --git a/site/test/navigation-ontology.test.mts b/site/world/navigation-ontology.test.mts similarity index 100% rename from site/test/navigation-ontology.test.mts rename to site/world/navigation-ontology.test.mts diff --git a/site/test/navigation-preparation.test.mts b/site/world/navigation-preparation.test.mts similarity index 100% rename from site/test/navigation-preparation.test.mts rename to site/world/navigation-preparation.test.mts diff --git a/site/test/nebula-search.test.mts b/site/world/nebula-search.test.mts similarity index 100% rename from site/test/nebula-search.test.mts rename to site/world/nebula-search.test.mts diff --git a/site/test/object-navigation.test.mts b/site/world/object-navigation.test.mts similarity index 100% rename from site/test/object-navigation.test.mts rename to site/world/object-navigation.test.mts diff --git a/site/test/prepared-body-billboards.test.mts b/site/world/prepared-body-billboards.test.mts similarity index 100% rename from site/test/prepared-body-billboards.test.mts rename to site/world/prepared-body-billboards.test.mts diff --git a/site/test/prepared-world-context.test.ts b/site/world/prepared-world-context.test.ts similarity index 99% rename from site/test/prepared-world-context.test.ts rename to site/world/prepared-world-context.test.ts index 9c7ce4bac5f..361e7771915 100644 --- a/site/test/prepared-world-context.test.ts +++ b/site/world/prepared-world-context.test.ts @@ -1,5 +1,5 @@ import type { OrientationXyzw, PhysicalCameraPose } from '@cssearth/engine'; -import { readSystemViewFile } from './system-view-file.mts'; +import { readSystemViewFile } from './system-view-file.test-support.mts'; import { decodeWorldOrbitBank, decodeWorldOrbits, orbitVertices, parseCompleteWorldContext, parsePreparedWorldContext, parsePreparedWorldContextSummary, worldContextGeometry, isPlacedClassification } from '@cssearth/objects'; import { type WorldCameraPose } from '@cssearth/engine'; import { required } from '@cssearth/objects/node/contract'; diff --git a/site/test/runtime-package.test.mts b/site/world/runtime-package.test.mts similarity index 99% rename from site/test/runtime-package.test.mts rename to site/world/runtime-package.test.mts index 20494a10395..a07eb019f34 100644 --- a/site/test/runtime-package.test.mts +++ b/site/world/runtime-package.test.mts @@ -13,7 +13,7 @@ import { requireArray, requireRecord, requireString } from '@cssearth/core'; import { isDeepStrictEqual } from 'node:util'; import { adoptPreparedDatasetTables } from '@cssearth/renderer'; -import { selectedObjectIds } from '../world/fixtures/anchor-table.mts'; +import { selectedObjectIds } from './fixtures/anchor-table.mts'; import { projectRoot } from '../directory/fixtures/objects.mts'; /** Whether two node lists hold the same nodes in the same order. A plain boolean: a failed deep comparison of thousands diff --git a/site/test/scene-contract.test.mts b/site/world/scene-contract.test.mts similarity index 100% rename from site/test/scene-contract.test.mts rename to site/world/scene-contract.test.mts diff --git a/site/surrounded-body.mts b/site/world/surrounded-body.mts similarity index 100% rename from site/surrounded-body.mts rename to site/world/surrounded-body.mts diff --git a/site/surrounded-body.test.mts b/site/world/surrounded-body.test.mts similarity index 100% rename from site/surrounded-body.test.mts rename to site/world/surrounded-body.test.mts diff --git a/site/test/system-view-file.mts b/site/world/system-view-file.test-support.mts similarity index 100% rename from site/test/system-view-file.mts rename to site/world/system-view-file.test-support.mts diff --git a/site/test/world-stars.test.mts b/site/world/world-stars.test.mts similarity index 100% rename from site/test/world-stars.test.mts rename to site/world/world-stars.test.mts diff --git a/site/test/world-tables.test.mts b/site/world/world-tables.test.mts similarity index 100% rename from site/test/world-tables.test.mts rename to site/world/world-tables.test.mts diff --git a/src/objects/README.md b/src/objects/README.md index 7f3d2345a94..26b43b6969a 100644 --- a/src/objects/README.md +++ b/src/objects/README.md @@ -112,7 +112,7 @@ Read the current `package.json` and runner arguments before using commands: | Prepare one authored package | `pnpm prepare:objects -- --object=` | | Update the source/mission catalogues | `node site/build/prepare/prepare-facilities.mts --catalog-only` | | Bind new inputs to catalogue records | `node site/build/prepare/author-source-records.mts ` | -| Check shared body runtime behavior | `node --test site/test/runtime-package.test.mts`; run affected scientific tests beside their owning modules too | +| Check shared body runtime behavior | `node --test site/world/runtime-package.test.mts`; run affected scientific tests beside their owning modules too | | Run the full package, renderer, native, preparation and lab sequence | `pnpm test`; choose its individual suites for focused work | | Check source identities and bindings | `node --test "src/sources/*.test.mts" "packages/bake/src/objects/sources/*.test.mts"`, or select the affected files | | Create the oracle environment and regenerate oracle fixtures | `node packages/core/src/node/oracle/setup.mts`, `node packages/core/src/node/oracle/run.mts`; see `packages/core/src/node/oracle/README.md` | diff --git a/src/objects/observable-universe-cmb/README.md b/src/objects/observable-universe-cmb/README.md index b846941e47f..9d30e073f49 100644 --- a/src/objects/observable-universe-cmb/README.md +++ b/src/objects/observable-universe-cmb/README.md @@ -74,7 +74,7 @@ the page draws it from the same map, limb law and opacities same camera. An earlier capture, from before the cutaway, shows the whole sphere from outside seamless across its 450 patches. - The registry tests check that the object tree is whole and that zooming out from the Sun walks the objects it is - inside in their order (`site/test/navigation-ontology.test.mts`, `site/test/zoom-scope.test.mts`). + inside in their order (`site/world/navigation-ontology.test.mts`, `site/test/zoom-scope.test.mts`). - The [context lineage test](../../../site/journeys/context-lineage.test.mts) checks that its products read only its source records. ## Known problems