LearnNewsExamplesServices
Frontmatter
id18840
titleWorkstation's topology window opens a page that cannot boot in dist builds
stateClosed
labels
bugai
assigneesneo-opus-ada
createdAtSep 18, 2026, 12:33 PM
updatedAtSep 18, 2026, 12:53 PM
githubUrlhttps://github.com/neomjs/neo/issues/18840
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtSep 18, 2026, 12:53 PM

Workstation's topology window opens a page that cannot boot in dist builds

neo-opus-ada
neo-opus-ada commented on Sep 18, 2026, 12:33 PM

Context

Found while root-causing #18833, then measured at runtime on 2026-09-18. The witness was the in-app browser against a dev server on :57310 serving /Users/Shared/github/neomjs/neo, with dist/production freshly built by build-all at 11:29.

URL loaded neo-config.json request result
what the bundle opens: dist/production/bdd9a773197b1416ba97.html?workspace=probe&theme=neo-theme-neo-dark /dist/production/neo-config.json → 404 /src/MicroLoader.mjs (the SOURCE loader) → 200, then Failed to fetch dynamically imported module …/dist/production/neo-config.json; nothing boots
the real app page: dist/production/apps/workstation/index.html?… /dist/production/apps/workstation/neo-config.json → 200 main.js 200, .neo-viewport renders

The Problem

apps/workstation/view/WorkspaceController.mjs openTopologyWorkspace() builds the window URL as new URL('../index.html', import.meta.url) (since #18375). webpack treats that pattern as an asset reference. It copies the source apps/workstation/index.html to dist/<env>/<hash>.html and rewrites the call to point there: new URL("../../bdd9a773197b1416ba97.html", import.meta.url) in dist/production/chunks/app/*.js.

The copy keeps the source's <script src="../../src/MicroLoader.mjs">. From dist/production/ that resolves to the source loader, which imports ./neo-config.json relative to the document (src/MicroLoader.mjs). No neo-config.json exists at dist/production/ or dist/development/, so the window's boot aborts.

  • Affected: dist/production, and dist/development, which emits the same kind of asset (dist/development/c2dbf450d3b9188847b7.html, with no dist/development/neo-config.json).
  • Unaffected: source, and dist/esm, which keeps the call unbundled, so import.meta.url is the module's own URL and ../index.html is the real page.

No test observes it. test/playwright/unit/apps/workstation/WorkspaceController.spec.mjs never inspects the URL handed to windowOpen, and the e2e navigates to /apps/workstation/index.html?workspace=… directly.

The Architectural Reality

  • The same app's pop-out path already uses the environment-agnostic form. apps/workstation/view/VesselWorkspace.mjs passes url: './index.html?popout=…&theme=…', which Neo.Main.windowOpen (src/Main.mjs) resolves against the opener document with new URL(url, window.location.href). The opener is <env>/apps/workstation/index.html in every environment.
  • A side effect of the fix: this call is the app worker graph's only HTML asset, the one that tripped the webpack 5.111 / minimizer mismatch in #18833. With it gone, the app worker emits no HTML asset.

The Fix

openTopologyWorkspace() builds ./index.html? plus URLSearchParams({workspace, theme}) and passes that relative URL to Neo.Main.windowOpen, matching VesselWorkspace. import.meta.url is no longer used there.

Acceptance Criteria

  • openTopologyWorkspace() hands Neo.Main.windowOpen a relative ./index.html?workspace=…&theme=…. A unit arm resolves it against a dist/production/apps/workstation/index.html opener URL to that environment's app page. The arm is red on the pre-fix line, whose absolute URL ignores the opener.
  • build-threads for dev and prod no longer emits a <hash>.html asset, and the app worker chunks carry no new URL("…html", import.meta.url).
  • Runtime: the URL the fixed build resolves for a dist/production opener boots (neo-config.json 200, .neo-viewport).

Out of Scope

  • An e2e of the full topology-window flow in dist builds: the e2e suite runs against source.
  • Any change to Neo.Main.windowOpen.

Avoided Traps

  • /* webpackIgnore: true */ on the new URL(): in a bundle, import.meta.url is the chunk's URL (dist/production/chunks/app/x.js), so ../index.html would still miss (dist/production/chunks/index.html).
  • Building the URL from Neo.config basePath / environment: that is apps/colors' older shape, and it needs per-environment branching the relative URL gets for free.

Related

  • #18375 (introduced it) · #18833 (where it surfaced) · #18824 (the vessel route whose shape this adopts)

Live latest-open sweep: checked the latest 20 open issues at 2026-09-18T10:31:30Z; no equivalent, and an all-states search for workstation topology window dist is empty. A2A in-flight sweep: no claim on Workstation or dist. Memory Core sweep: no prior decision. Own-assigned sweep: #18376 is Workstation but a different defect (SharedWorker renderer).

Origin Session ID: 6ed6621f-e2e4-4b9d-9a95-744679cb3c59

tobiu referenced in commit 5de7329 - "fix(workstation): a topology window opens the page its opener is on, in every build (#18840) (#18841) on Sep 18, 2026, 12:53 PM
tobiu closed this issue on Sep 18, 2026, 12:53 PM