From 669ed83fb6253ee35509d80bf9f7ad1896fcf826 Mon Sep 17 00:00:00 2001 From: Juan Cruz Fortunatti Date: Mon, 5 Oct 2026 13:58:27 +0200 Subject: [PATCH 1/3] refactor(model): move the held address reader out of navigation history --- site/model/navigation-href.mts | 9 +++++++++ site/navigation/navigation-history.mts | 10 ++-------- 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 site/model/navigation-href.mts diff --git a/site/model/navigation-href.mts b/site/model/navigation-href.mts new file mode 100644 index 00000000000..c0f7d57c594 --- /dev/null +++ b/site/model/navigation-href.mts @@ -0,0 +1,9 @@ +/** The history owner of each window, so scene code reads the URL a deferred write will publish (`navigationHref`). */ +const owners = new WeakMap(); + +/** The page's URL as the app knows it: a history write deferred while the camera moves is already this URL. */ +export function navigationHref(windowTarget: Window) { + return owners.get(windowTarget)?.href() ?? windowTarget.location.href; +} + +export { owners }; diff --git a/site/navigation/navigation-history.mts b/site/navigation/navigation-history.mts index ef4d748512b..116a3b98baa 100644 --- a/site/navigation/navigation-history.mts +++ b/site/navigation/navigation-history.mts @@ -2,6 +2,8 @@ import type { BrowserWindow } from '../browser/browser-types.mts'; import { isRecord } from '@cssearth/core'; import { objectIdAtPath } from '../model/root-object.mts'; import type { NavigationHistory, NavigationIntent } from './navigation-types.mts'; +import { navigationHref, owners } from '../model/navigation-href.mts'; +export { navigationHref } from '../model/navigation-href.mts'; type Navigate = (id: string, intent: NavigationIntent) => unknown; interface NavigationAnchor { href: string; target?: string; hasAttribute(name: string): boolean; getAttribute(name: string): string | null; } function closestAnchor(target: EventTarget | null): NavigationAnchor | null { @@ -13,14 +15,6 @@ function closestAnchor(target: EventTarget | null): NavigationAnchor | null { const navigationId = (event: Event): unknown => 'detail' in event && isRecord(event.detail) ? event.detail.objectId : undefined; const navigationFeature = (event: Event): string | undefined => 'detail' in event && isRecord(event.detail) && typeof event.detail.feature === 'string' && /^(?:city-)?[0-9]+$/u.test(event.detail.feature) ? event.detail.feature : undefined; -/** The history owner of each window, so scene code reads the URL a deferred write will publish (`navigationHref`). */ -const owners = new WeakMap(); - -/** The page's URL as the app knows it: a history write deferred while the camera moves is already this URL. */ -export function navigationHref(windowTarget: Window) { - return owners.get(windowTarget)?.href() ?? windowTarget.location.href; -} - // On the iPad every URL change through the History API is followed by slow frames that are not our code: with no inspector // attached, `replaceState` returned in 0 to 12 ms, yet the frame of the write took 29 to 42 ms and another of 26 to 34 ms // came 0.2 s later (2026-10-04). Written a second after the camera rested, as they were, the two met the next gesture of From b69faa6b3c52e6557a0a886cba1dfc6f5b1c225e Mon Sep 17 00:00:00 2001 From: Juan Cruz Fortunatti Date: Mon, 5 Oct 2026 13:58:27 +0200 Subject: [PATCH 2/3] refactor(navigation): register held addresses with the shared reader and read it from world resources --- site/application-world-resources.mts | 2 +- site/model/navigation-href.mts | 6 ++++- site/model/navigation-href.test.mts | 34 ++++++++++++++++++++++++++ site/navigation/navigation-history.mts | 6 ++--- site/test/navigation-history.test.mts | 29 ++++++++++++++++++++++ 5 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 site/model/navigation-href.test.mts diff --git a/site/application-world-resources.mts b/site/application-world-resources.mts index 1ebb964ff36..862cd649d79 100644 --- a/site/application-world-resources.mts +++ b/site/application-world-resources.mts @@ -15,7 +15,7 @@ import { loadCatalogueDots } from './world/dot-catalogues.mts'; import { annotationsForBodies, worldVisibilityPolicy } from './application-world-visibility.mts'; import { STELLAR_EXTENTS } from './stellar-extents.mts'; import { CONTEXT_DATASETS } from './world/context-datasets.mts'; -import { navigationHref } from './navigation/navigation-history.mts'; +import { navigationHref } from './model/navigation-href.mts'; import { onObjectEntry } from './directory/object-entries.mts'; /** The view an image mesh package is drawn in: the view of the dataset the mounted object shows of it (context-datasets.mts), diff --git a/site/model/navigation-href.mts b/site/model/navigation-href.mts index c0f7d57c594..d687bff8649 100644 --- a/site/model/navigation-href.mts +++ b/site/model/navigation-href.mts @@ -6,4 +6,8 @@ export function navigationHref(windowTarget: Window) { return owners.get(windowTarget)?.href() ?? windowTarget.location.href; } -export { owners }; +/** Register a live address reader; disposal only removes this registration. */ +export function registerNavigationHref(windowTarget: Window, owner: { href(): string }) { + owners.set(windowTarget, owner); + return () => { if (owners.get(windowTarget) === owner) owners.delete(windowTarget); }; +} diff --git a/site/model/navigation-href.test.mts b/site/model/navigation-href.test.mts new file mode 100644 index 00000000000..b1da0ddf0d7 --- /dev/null +++ b/site/model/navigation-href.test.mts @@ -0,0 +1,34 @@ +import assert from 'node:assert/strict'; +import { readFileSync } from 'node:fs'; +import { test } from 'node:test'; +import { navigationHref, registerNavigationHref } from './navigation-href.mts'; + +test('registration defers reads until the getter runs and disposal restores the browser address', () => { + const windowTarget = { location: { href: 'https://css.earth/earth/' } } as Window; + let href = 'https://css.earth/mars/', reads = 0; + const dispose = registerNavigationHref(windowTarget, { href() { reads++; return href; } }); + assert.equal(reads, 0); + assert.equal(navigationHref(windowTarget), href); + href = 'https://css.earth/moon/'; + assert.equal(navigationHref(windowTarget), href); + assert.equal(reads, 2); + dispose(); + assert.equal(navigationHref(windowTarget), windowTarget.location.href); + assert.equal(reads, 2, 'disposed readers are never evaluated'); +}); + +test('disposing a replaced registration preserves the current reader', () => { + const windowTarget = { location: { href: 'https://css.earth/earth/' } } as Window; + const disposeFirst = registerNavigationHref(windowTarget, { href: () => 'https://css.earth/mars/' }); + const disposeSecond = registerNavigationHref(windowTarget, { href: () => 'https://css.earth/moon/' }); + disposeFirst(); + assert.equal(navigationHref(windowTarget), 'https://css.earth/moon/'); + disposeSecond(); + assert.equal(navigationHref(windowTarget), windowTarget.location.href); +}); + +test('world resources import the lower held-address reader without depending on history', () => { + const world = readFileSync(new URL('../application-world-resources.mts', import.meta.url), 'utf8'); + assert.match(world, /import \{ navigationHref \} from '\.\/model\/navigation-href\.mts';/u); + assert.doesNotMatch(world, /from '\.\/navigation\/navigation-history\.mts'/u); +}); diff --git a/site/navigation/navigation-history.mts b/site/navigation/navigation-history.mts index 116a3b98baa..259d7c646fa 100644 --- a/site/navigation/navigation-history.mts +++ b/site/navigation/navigation-history.mts @@ -2,7 +2,7 @@ import type { BrowserWindow } from '../browser/browser-types.mts'; import { isRecord } from '@cssearth/core'; import { objectIdAtPath } from '../model/root-object.mts'; import type { NavigationHistory, NavigationIntent } from './navigation-types.mts'; -import { navigationHref, owners } from '../model/navigation-href.mts'; +import { navigationHref, registerNavigationHref } from '../model/navigation-href.mts'; export { navigationHref } from '../model/navigation-href.mts'; type Navigate = (id: string, intent: NavigationIntent) => unknown; interface NavigationAnchor { href: string; target?: string; hasAttribute(name: string): boolean; getAttribute(name: string): string | null; } @@ -189,10 +189,10 @@ export function createNavigationHistory({ windowTarget, capture, navigate, navig destroy() { if (disposed) return; flush(); disposed = true; listening.abort(); - if (owners.get(windowTarget) === owner) owners.delete(windowTarget); + unregisterHref(); }, }); - owners.set(windowTarget, owner); + const unregisterHref = registerNavigationHref(windowTarget, owner); return owner; } diff --git a/site/test/navigation-history.test.mts b/site/test/navigation-history.test.mts index c589f64ebd5..d460e274b71 100644 --- a/site/test/navigation-history.test.mts +++ b/site/test/navigation-history.test.mts @@ -2,6 +2,7 @@ import assert from 'node:assert/strict'; import { sourceTest } from '@cssearth/objects/node/source-test'; const test = sourceTest(); import { createNavigationHistory, navigationHref } from '../navigation/navigation-history.mts'; +import { navigationHref as heldHref } from '../model/navigation-href.mts'; import { ROOT_OBJECT_ID } from '../model/root-object.mts'; test('Back to the front page returns to the body it shows, not nowhere', () => { @@ -231,3 +232,31 @@ test('a view kept for the entry is the one Back returns to after the next push', listeners.get('popstate')!({ state: earth } as PopStateEvent); assert.equal(calls.at(-1)?.[1].url, 'https://css.earth/earth/?v=near'); }); + +test('history registers its live held reader in the model and disposes it', () => { + assert.equal(navigationHref, heldHref, 'history re-exports the same getter'); + const { windowTarget, motion } = readerWindow('https://css.earth/earth/'); + const history = createNavigationHistory({ windowTarget, capture: () => '/earth/', navigate: () => {} }); + motion(true); + history.commit('/mars/'); + assert.equal(windowTarget.location.href, 'https://css.earth/earth/'); + assert.equal(heldHref(windowTarget), 'https://css.earth/mars/'); + history.commit('/moon/'); + assert.equal(heldHref(windowTarget), 'https://css.earth/moon/', 'reads the latest held write'); + history.destroy(); + // After disposal, reads follow subsequent browser address changes. + windowTarget.history.replaceState(null, '', '/venus/'); + assert.equal(heldHref(windowTarget), 'https://css.earth/venus/'); +}); + +test('a superseded history that is destroyed leaves the live history reader registered', () => { + const { windowTarget, motion } = readerWindow('https://css.earth/earth/'); + const first = createNavigationHistory({ windowTarget, capture: () => '/earth/', navigate: () => {} }); + const second = createNavigationHistory({ windowTarget, capture: () => '/earth/', navigate: () => {} }); + motion(true); + second.commit('/mars/'); + assert.equal(heldHref(windowTarget), 'https://css.earth/mars/'); + first.destroy(); + assert.equal(heldHref(windowTarget), 'https://css.earth/mars/', 'only the registration a history still owns is removed'); + second.destroy(); +}); From 2f0faca0fd20f36a800c177488f1133af754a310 Mon Sep 17 00:00:00 2001 From: Juan Cruz Fortunatti Date: Mon, 5 Oct 2026 20:34:46 +0200 Subject: [PATCH 3/3] docs(site): declare the held address move and retire its plan group --- .github/site-refactor.json | 198 +----------------------------- docs/site-architecture.md | 1 - docs/site-architecture/edits.json | 36 ------ 3 files changed, 5 insertions(+), 230 deletions(-) diff --git a/.github/site-refactor.json b/.github/site-refactor.json index a7b6be98f8b..30981bb6cc3 100644 --- a/.github/site-refactor.json +++ b/.github/site-refactor.json @@ -1,195 +1,7 @@ { - "mode": "pure-move", - "moves": { - "site/runtime-policy.mts": "site/browser/runtime-policy.mts", - "site/diagnostics-policy.mts": "site/browser/diagnostics-policy.mts", - "site/in-flight-loader.mts": "site/browser/in-flight-loader.mts", - "site/next-frame.mts": "site/browser/next-frame.mts", - "site/narrow-layout.mts": "site/browser/narrow-layout.mts", - "site/object-shell-types.ts": "site/contracts/object-shell-types.ts", - "site/object-page-contract.mts": "site/contracts/object-page-contract.mts", - "site/navigation/system-address.mts": "site/model/system-address.mts", - "site/root-object.mts": "site/model/root-object.mts", - "site/orbit-root.mts": "site/model/orbit-root.mts", - "site/planetary-system-members.mts": "site/model/planetary-system-members.mts", - "site/object-classification-label.mts": "site/model/object-classification-label.mts", - "site/dataset-url.mts": "site/model/dataset-url.mts", - "site/startup-requests.mts": "site/directory/startup-requests.mts", - "site/object-entries.mts": "site/directory/object-entries.mts", - "site/context-availability.mts": "site/world/context-availability.mts", - "site/context-datasets.mts": "site/world/context-datasets.mts", - "site/dot-catalogues.mts": "site/world/dot-catalogues.mts", - "site/world-camera.mts": "site/world/world-camera.mts", - "site/world-viewport.mts": "site/world/world-viewport.mts", - "site/world-preferences.mts": "site/world/world-preferences.mts", - "site/moon-orbit-policy.mts": "site/world/moon-orbit-policy.mts", - "site/system-framing-radii.mts": "site/world/system-framing-radii.mts", - "site/zoom-carry.mts": "site/world/zoom-carry.mts", - "site/initial-scene.mts": "site/scene/initial-scene.mts", - "site/prepared-scene-ownership.mts": "site/navigation/prepared-scene-ownership.mts", - "site/arrival-billboard.mts": "site/navigation/arrival-billboard.mts", - "site/view-url-runtime.mts": "site/navigation/view-url-runtime.mts", - "site/prepared-descriptor.mts": "site/navigation/prepared-descriptor.mts", - "site/information-card.mts": "site/shell/information-card.mts", - "site/chart-pixel-alignment.mts": "site/shell/chart-pixel-alignment.mts", - "site/dataset-picker.mts": "site/shell/dataset-picker.mts", - "site/tab-panels.mts": "site/shell/tab-panels.mts", - "site/layout-sections.mts": "site/shell/layout-sections.mts", - "site/native-view-forms.mts": "site/shell/native-view-forms.mts", - "site/source-link.mts": "site/browser/source-link.mts", - "site/dataset-content.mts": "site/content/dataset-content.mts", - "site/dataset-context.mts": "site/content/dataset-context.mts", - "site/object-text.mts": "site/content/object-text.mts", - "site/prepared-panel-content.mts": "site/content/prepared-panel-content.mts", - "site/volume-presentation.mts": "site/content/volume-presentation.mts", - "site/source-icons.mts": "site/content/source-icons.mts", - "site/sidebar-thumbnails.mts": "site/content/sidebar-thumbnails.mts", - "site/learn-more.mts": "site/content/learn-more.mts", - "site/native-input.mts": "site/browser/native-input.mts", - "site/startup-cover.mts": "site/startup/startup-cover.mts", - "site/initial-shell-context.mts": "site/startup/initial-shell-context.mts", - "site/error-report.mts": "site/startup/error-report.mts", - "site/web-analytics.mts": "site/startup/web-analytics.mts", - "site/asset-origin.mts": "site/server-assets/asset-origin.mts", - "site/object-page-data.mts": "site/server/object-page-data.mts", - "site/first-view-transport.mts": "site/server/first-view-transport.mts", - "site/dataset-response.mts": "site/server/dataset-response.mts", - "site/built-pages.mts": "site/server/built-pages.mts", - "site/default-width-share.mts": "site/world/default-width-share.mts", - "site/prepared-object-path.mts": "site/prepared/prepared-object-path.mts", - "site/prepared-panel-content.shared-readers.test.mts": "site/content/prepared-panel-content.shared-readers.test.mts", - "site/test/arrival-billboard.test.mts": "site/navigation/arrival-billboard.test.mts", - "site/test/arrival-discovery.test.mts": "site/build/prepare/arrival-discovery.test.mts", - "site/test/asset-origin.test.mts": "site/server/asset-origin.test.mts", - "site/test/astro-component-imports.test.mts": "site/journeys/astro-component-imports.test.mts", - "site/test/authored-object-fixture.mts": "site/build/fixtures/authored-object-fixture.mts", - "site/test/body-additions.test.mts": "site/build/prepare/body-additions.test.mts", - "site/test/browser-node-imports.test.mts": "site/journeys/browser-node-imports.test.mts", - "site/test/built-pages.test.mts": "site/server/built-pages.test.mts", - "site/test/camera-handover.test.mts": "site/scene/camera-handover.test.mts", - "site/test/catalogue-window.test.mts": "site/search/catalogue-window.test.mts", - "site/test/chart-pixel-alignment.test.mts": "site/shell/chart-pixel-alignment.test.mts", - "site/test/charts.test.ts": "site/build/charts/charts.test.mts", - "site/test/check-preparation-inputs.test.mts": "site/build/prepare/check-preparation-inputs.test.mts", - "site/test/cloudflare-worker.test.mts": "site/journeys/cloudflare-worker.test.mts", - "site/test/context-lineage.test.mts": "site/journeys/context-lineage.test.mts", - "site/test/dataset-picker.test.mts": "site/shell/dataset-picker.test.mts", - "site/test/dataset-response.test.mts": "site/server/dataset-response.test.mts", - "site/test/dataset-url.test.mts": "site/model/dataset-url.test.mts", - "site/test/descriptor-roundtrip.test.mts": "site/build/prepare/descriptor-roundtrip.test.mts", - "site/test/diagnostic-accessor.test.mts": "site/journeys/diagnostic-accessor.test.mts", - "site/test/error-report.test.mts": "site/browser/error-report.test.mts", - "site/test/evidence/passive-minimaps/browser.json": "site/minimap/evidence/passive-minimaps/browser.json", - "site/test/evidence/passive-minimaps/earth.png": "site/minimap/evidence/passive-minimaps/earth.png", - "site/test/evidence/passive-minimaps/jupiter-sequence.png": "site/minimap/evidence/passive-minimaps/jupiter-sequence.png", - "site/test/first-view-transport.test.mts": "site/server/first-view-transport.test.mts", - "site/test/fixtures/anchor-table.mts": "site/world/fixtures/anchor-table.mts", - "site/test/fixtures/context-package.mts": "site/build/fixtures/context-package.mts", - "site/test/fixtures/galaxies/captures.json": "site/world/fixtures/galaxies/captures.json", - "site/test/fixtures/object-content-fixture.mts": "site/build/fixtures/object-content-fixture.mts", - "site/test/fixtures/objects.mts": "site/directory/fixtures/objects.mts", - "site/test/fixtures/prepared-schemas.mts": "site/world/fixtures/prepared-schemas.mts", - "site/test/fixtures/saturn-prepared.mts": "site/world/fixtures/saturn-prepared.mts", - "site/test/folded-transit.test.mts": "site/build/charts/folded-transit.test.mts", - "site/test/galactic-focus.test.mts": "site/search/galactic-focus.test.mts", - "site/test/in-flight-loader.test.mts": "site/browser/in-flight-loader.test.mts", - "site/test/information-card-sections.test.mts": "site/shell/information-card-sections.test.mts", - "site/test/information-tab-styles.test.mts": "site/server/information-tab-styles.test.mts", - "site/test/initial-shell-context.test.mts": "site/browser/initial-shell-context.test.mts", - "site/test/inline-page-stylesheet.test.mts": "site/build/inline-page-stylesheet.test.mts", - "site/test/kept-load.test.mts": "site/server/kept-load.test.mts", - "site/test/list-distance.test.mts": "site/search/list-distance.test.mts", - "site/test/load-object-content.mts": "site/build/content/load-object-content.test-support.mts", - "site/test/lonlat-slice-table.test.mts": "site/build/prepare/lonlat-slice-table.test.mts", - "site/test/navigation-content.test.mts": "site/navigation/navigation-content.test.mts", - "site/test/navigation-fragments.test.mts": "site/navigation/navigation-fragments.test.mts", - "site/test/navigation-lifecycle.test.mts": "site/navigation/navigation-lifecycle.test.mts", - "site/test/navigation-readiness.test.mts": "site/navigation/navigation-readiness.test.mts", - "site/test/navigation-shell-content.test.mts": "site/navigation/navigation-shell-content.test.mts", - "site/test/navigation-styles.test.mts": "site/navigation/navigation-styles.test.mts", - "site/test/navigation-timing.test.mts": "site/navigation/navigation-timing.test.mts", - "site/test/neutral-catalogue-color.test.mts": "site/journeys/neutral-catalogue-color.test.mts", - "site/test/object-control-binding.test.mts": "site/journeys/object-control-binding.test.mts", - "site/test/object-page-data.test.mts": "site/server/object-page-data.test.mts", - "site/test/object-result.test.mts": "site/search/object-result.test.mts", - "site/test/object-runtime-contract.test.mts": "site/journeys/object-runtime-contract.test.mts", - "site/test/object-search-rank.test.mts": "site/search/object-search-rank.test.mts", - "site/test/object-text.test.mts": "site/content/object-text.test.mts", - "site/test/preparation-boundary.test.mts": "site/journeys/preparation-boundary.test.mts", - "site/test/prepare-authored.test.mts": "site/build/prepare/prepare-authored.test.mts", - "site/test/prepare-context-availability.test.mts": "site/build/prepare/prepare-context-availability.test.mts", - "site/test/prepare-object-json.test.mts": "site/build/prepare/prepare-object-json.test.mts", - "site/test/prepare-spatial-context.test.mts": "site/build/prepare/prepare-spatial-context.test.mts", - "site/test/prepare-text.test.mts": "site/build/prepare/prepare-text.test.mts", - "site/test/prepared-dataset-facts.test.mts": "site/build/content/prepared-dataset-facts.test.mts", - "site/test/prepared-dataset-labels.test.mts": "site/journeys/prepared-dataset-labels.test.mts", - "site/test/prepared-dataset-legends.test.mts": "site/build/content/prepared-dataset-legends.test.mts", - "site/test/prepared-descriptor.test.mts": "site/navigation/prepared-descriptor.test.mts", - "site/test/prepared-motion-css.test.mts": "site/build/prepared-motion-css.test.mts", - "site/test/prepared-panel-content.test.mts": "site/content/prepared-panel-content.test.mts", - "site/test/prepared-presentation-bindings.test.mts": "site/contracts/prepared-presentation-bindings.test.mts", - "site/test/prepared-presentation-contract.test.mts": "site/journeys/prepared-presentation-contract.test.mts", - "site/test/preview.test.mts": "site/server/preview.test.mts", - "site/test/production-diagnostics.test.mts": "site/journeys/production-diagnostics.test.mts", - "site/test/recovery-commands.test.mts": "site/journeys/recovery-commands.test.mts", - "site/test/refresh-charts.test.mts": "site/build/prepare/refresh-charts.test.mts", - "site/test/rendered-page.test.mts": "site/journeys/rendered-page.test.mts", - "site/test/restore-inputs.test.mts": "site/build/restore-inputs.test.mts", - "site/test/run-script-chain.test.mts": "site/build/run-script-chain.test.mts", - "site/test/runtime-policy.test.mts": "site/browser/runtime-policy.test.mts", - "site/test/scene-datasets.test.mts": "site/scene/scene-datasets.test.mts", - "site/test/scene-frame.test.mts": "site/scene/scene-frame.test.mts", - "site/test/scene-publication.test.mts": "site/scene/scene-publication.test.mts", - "site/test/scene-session.test.mts": "site/scene/scene-session.test.mts", - "site/test/seo-discovery.mts": "site/journeys/seo-discovery.test-support.mts", - "site/test/seo-discovery.test.mts": "site/journeys/seo-discovery.test.mts", - "site/test/setup-assets.test.mts": "site/build/prepare/setup-assets.test.mts", - "site/test/shell-selectors.test.mts": "site/search/shell-selectors.test.mts", - "site/test/shell-settings.test.mts": "site/shell/shell-settings.test.mts", - "site/test/shell-sheet.test.mts": "site/shell/shell-sheet.test.mts", - "site/test/source-evidence-values.mts": "site/overview/source-evidence-values.test-support.mts", - "site/test/source-link.test.mts": "site/browser/source-link.test.mts", - "site/test/startup-requests.test.mts": "site/directory/startup-requests.test.mts", - "site/test/surface-label-loop.test.mts": "site/journeys/surface-label-loop.test.mts", - "site/test/surface-minimap.test.mts": "site/minimap/surface-minimap.test.mts", - "site/test/view-url-runtime.test.mts": "site/navigation/view-url-runtime.test.mts", - "site/test/volume-presentation.test.mts": "site/content/volume-presentation.test.mts", - "site/test/web-analytics.test.mts": "site/browser/web-analytics.test.mts", - "site/test/world-billboards.test.mts": "site/journeys/world-billboards.test.mts", - "site/site.css": "site/layouts/site.css", - "site/wordmark.css": "site/layouts/wordmark.css", - "site/object-navigation-marker.css": "site/layouts/object-navigation-marker.css", - "site/asset-origin.characterization.test.mts": "site/server-assets/asset-origin.characterization.test.mts", - "site/dataset-picker.characterization.test.mts": "site/shell/dataset-picker.characterization.test.mts", - "site/dataset-response.characterization.test.mts": "site/server/dataset-response.characterization.test.mts", - "site/object-page-data.characterization.test.mts": "site/server/object-page-data.characterization.test.mts", - "site/startup-requests.characterization.test.mts": "site/directory/startup-requests.characterization.test.mts", - "site/view-url-runtime.characterization.test.mts": "site/navigation/view-url-runtime.characterization.test.mts", - "site/test/fixtures/characterization-runtime.mts": "site/scene/fixtures/characterization-runtime.mts", - "site/context-availability.characterization.test.mts": "site/world/context-availability.characterization.test.mts", - "site/dataset-context.characterization.test.mts": "site/content/dataset-context.characterization.test.mts", - "site/default-width-share.characterization.test.mts": "site/world/default-width-share.characterization.test.mts", - "site/dot-catalogues.characterization.test.mts": "site/world/dot-catalogues.characterization.test.mts", - "site/first-view-transport.characterization.test.mts": "site/server/first-view-transport.characterization.test.mts", - "site/information-card.characterization.test.mts": "site/shell/information-card.characterization.test.mts", - "site/initial-scene.characterization.test.mts": "site/scene/initial-scene.characterization.test.mts", - "site/layout-sections.characterization.test.mts": "site/shell/layout-sections.characterization.test.mts", - "site/learn-more.characterization.test.mts": "site/content/learn-more.characterization.test.mts", - "site/moon-orbit-policy.characterization.test.mts": "site/world/moon-orbit-policy.characterization.test.mts", - "site/native-view-forms.characterization.test.mts": "site/shell/native-view-forms.characterization.test.mts", - "site/next-frame.characterization.test.mts": "site/browser/next-frame.characterization.test.mts", - "site/object-classification-label.characterization.test.mts": "site/model/object-classification-label.characterization.test.mts", - "site/object-entries.characterization.test.mts": "site/directory/object-entries.characterization.test.mts", - "site/object-text.characterization.test.mts": "site/content/object-text.characterization.test.mts", - "site/prepared-panel-content.characterization.test.mts": "site/content/prepared-panel-content.characterization.test.mts", - "site/sidebar-thumbnails.characterization.test.mts": "site/content/sidebar-thumbnails.characterization.test.mts", - "site/source-icons.characterization.test.mts": "site/content/source-icons.characterization.test.mts", - "site/startup-cover.characterization.test.mts": "site/startup/startup-cover.characterization.test.mts", - "site/tab-panels.characterization.test.mts": "site/shell/tab-panels.characterization.test.mts", - "site/world-preferences.characterization.test.mts": "site/world/world-preferences.characterization.test.mts", - "site/world-viewport.characterization.test.mts": "site/world/world-viewport.characterization.test.mts", - "site/zoom-carry.characterization.test.mts": "site/world/zoom-carry.characterization.test.mts", - "site/object-entry-types.mts": "site/directory/object-entry-types.mts" - }, - "change": "S4-1 move the dependency-closed set of site files no pending S3 change touches into their owner folders" + "mode": "semantic", + "moves": {}, + "outputs": [], + "layout": "changes", + "change": "S3-1 held address" } diff --git a/docs/site-architecture.md b/docs/site-architecture.md index cac29d80b23..6b057efd18c 100644 --- a/docs/site-architecture.md +++ b/docs/site-architecture.md @@ -59,7 +59,6 @@ The changes array partitions stable edit ids into atomic groups. All seven group | Tier | Change / PR | Edit ids | Required code change | | ---: | --- | --- | --- | -| 0 | Extract held address reader | add-file-navigation-href, add-import-navigation-history-navigation-href, retarget-application-world-resources-navigation-href | Move navigationHref AND its owners WeakMap. Export a registration function for history; preserve deferred URL semantics. History registers and unregisters its held address reader in the same WeakMap; re-export the getter for existing navigation callers. Only lower world caller uses navigationHref; other callers retain history behavior. | | 0 | Relocate queued loader owners | add-file-scene-imports, add-file-world-imports, remove-queue-runtime, remove-shared-registry, remove-shared-world, retarget-adapter-scene-imports, retarget-router-world-imports, add-router-scene-imports, remove-directory-queue, retarget-boot-scene-imports, add-boot-world-imports | Decided by the owner: loader modules hold only import() calls through the existing queue. Own registry and packaged-runtime functions in scene; move the single last chain to lower browser/import-queue. Prove one queue chain, registration before the first scene call, the same entry-chunk modules and bytes, identical L1/L2/L3, L7 no worse and the real-iPad startup journey. Own the queued application-world import in world; no initializer inside the thunk. Move the runtime function out of the import-free browser queue implementation. Leave only importSceneRouter in startup/shared-imports. Move the world function to its owner. Adapter directly uses the same queued runtime function; preserve the frozen default adapter. Split router loader imports; preserve module-evaluation autostart. Import registry/runtime functions and register only the directory runtime loader using the existing object-directory import before first scene call. Directory accepts a typed runtime-loader registration; read the slot at scene invocation, not metadata construction. Missing registration fails explicitly. Body prestart and registry prestart reuse scene-owned promises. View prestart reuses the world-owned promise. | diff --git a/docs/site-architecture/edits.json b/docs/site-architecture/edits.json index 6f58fe01ebc..043d62612a5 100644 --- a/docs/site-architecture/edits.json +++ b/docs/site-architecture/edits.json @@ -1,33 +1,5 @@ { "edits": [ - { - "op": "add-file", - "path": "site/model/navigation-href.mts", - "imports": [], - "change": "Extract held address reader", - "note": "Move navigationHref AND its owners WeakMap. Export a registration function for history; preserve deferred URL semantics.", - "id": "add-file-navigation-href" - }, - { - "op": "add-import", - "from": "site/navigation/navigation-history.mts", - "to": "site/model/navigation-href.mts", - "kind": "value", - "change": "Extract held address reader", - "note": "History registers and unregisters its held address reader in the same WeakMap; re-export the getter for existing navigation callers.", - "id": "add-import-navigation-history-navigation-href" - }, - { - "op": "retarget", - "from": "site/world/application-world-resources.mts", - "to": "site/navigation/navigation-history.mts", - "newTo": "site/model/navigation-href.mts", - "kind": "value", - "change": "Extract held address reader", - "note": "Only lower world caller uses navigationHref; other callers retain history behavior.", - "id": "retarget-application-world-resources-navigation-href", - "line": 18 - }, { "id": "add-file-scene-imports", "op": "add-file", @@ -155,14 +127,6 @@ } ], "changes": [ - { - "id": "extract-held-address-reader", - "edits": [ - "add-file-navigation-href", - "add-import-navigation-history-navigation-href", - "retarget-application-world-resources-navigation-href" - ] - }, { "id": "relocate-queued-loader-owners", "edits": [