Repository navigation
Description
Parent boundary: SceneTech/AppScene#124
Blocked product bootstrap: #252
Picker prerequisite: #247 (completed)
Problem
Unchanged VS Code OSS reuses its browser window after Open Folder... by assigning the generated workspace URL to window.location.href. WebScene currently exposes location as an ordinary object whose href is a writable data property. Assignment changes the JavaScript string but emits no navigation request, runs no beforeunload/pagehide decision, and creates no replacement document. AppScene therefore has no target to admit and reload.
The completed #247 trace retained the exact input:
vscode-remote://127.0.0.1:64170/private/tmp/webscene-247-fixture/beta
forceNewWindow=false forceReuseWindow=false addMode=false
VS Code WorkspaceProvider.open(..., { reuse: true }) converts that to the same-origin target /?folder=/private/tmp/webscene-247-fixture/beta and executes mainWindow.location.href = targetHref.
Reduced root cause
set_context_location in webscene_v8_runtime_document.inc installs href, protocol, host, pathname, search, and hash as ordinary object properties. Only location.reload() has an active operation: it emits WEBSCENE_HOST_REQUEST_WINDOW_RELOAD_V1. There is no setter or assign/replace implementation for top-level URL navigation and no typed same-window navigation request carrying the resolved target.
Scope
- Implement browser-shaped top-level
Location.hrefassignment plusLocation.assign()andLocation.replace()URL resolution. - Apply the same-origin/scheme and byte-size admission policy before enqueueing a bounded typed request. Keep fragment-only navigation separately observable without replacing the document.
- Run cancellable
beforeunload; only an allowed transition reaches the host. Dispatchpagehideexactly once when the host accepts and loads the replacement document. - Add an additive typed native ABI request containing the byte-exact resolved URL and replace/history decision.
- In AppScene#124, validate the request against the owned loopback origin, record the decision, update the owned document URL, and reload the existing engine/window through
load_url_with_viewport. - Preserve profile/storage, companion ownership, viewport, diagnostics, and document-start scripts. Reject malformed, cross-origin, oversized, stale, duplicate, and queue-saturated requests without mutating the live URL.
Acceptance
- Browser oracle:
href=,assign(), andreplace()resolve relative/query URLs byte-exactly; veto, malformed URL, cross-origin, and fragment cases have matching observable results. - Direct WebScene native tests retain the typed target/decision, enforce queue and URL bounds, run
beforeunloadonce, and prove no document generation occurs until the host calls the load API. - Direct AppScene tests accept only the owned same-origin loopback target, preserve the existing window/companion, and reject unsupported or stale targets.
- Two successful A → B → A transitions create fresh realms/documents, emit one
pagehideper retired document, and leave no old timers, workers, ports, sockets, host requests, scenes, or queued callbacks. - Unchanged VS Code acceptance correlates the Qualify VS Code remote file and folder picker interaction #247 selected URI with target URL, native decision, replacement-document generation, workspace context URI, provider registration, root stat/readdir, Explorer children/rows, and first watcher events.
- Record cold/warm p50/p95 for request-to-decision, decision-to-new-document, root enumeration, and first Explorer row. Bound typed-request depth, DOM/scene publication, worker/socket/watch counts, CPU, and retained memory across repeated A → B → A cycles.
Do not include window.open/secondary-window behavior; SceneTech/AppScene#41 owns that path. File edit/save/recovery remains #269.
Activity
wieslawsoltes commentedon Sep 17, 2026
Implemented by #274 at
7c19a3c7.Exact packaged Code OSS evidence retained from the local AppScene dependency candidate:
vscode-remote://127.0.0.1:50910/private/tmp/webscene-247-fixture/betahttp://127.0.0.1:50910/?folder=%2Fprivate%2Ftmp%2Fwebscene-247-fixture%2Fbeta&scene-navigation-generation=1Direct gate: href/assign/replace, same-origin and 8 KiB admission, FIFO ordering, queue high-water 1,000, and 10,000 requests in 0.015s.
wieslawsoltes commentedon Sep 18, 2026
Reopened for the existing native IndexedDB contract integration failure in main NuGet run 35320520086.
Both Linux and macOS fail immediately at
indexeddb-test-origin.js:1withWebScene rejected the same-window navigation request. The fixture'sconfigure_indexeddb_test_origin()assignslocation.protocol,hostname,origin, and finallylocation.hrefsolely to synthesize an origin. Since #270,location.href=correctly enters the typed same-window navigation boundary; this storage fixture provides no host admission callback, so rejection is expected and the IndexedDB body never runs.This is not caused by current
1cf8bc52: closest completed predecessorbea90e8e, run 35288000024, has the byte-identical error on Linux and macOS, while348ea440..1cf8bc52changes only macOS SDK audit/package files. Ownership stays here because the stale test-origin setup must use an admitted initial document URL or an explicit #270 host-navigation fixture rather than bypassing active Location semantics. No duplicate regression issue was opened.wieslawsoltes commentedon Sep 18, 2026
Reopened CI ownership is retained in the native hierarchy: this issue is now a sub-issue of its AppScene #124 host-boundary parent, which remains under the AppScene #122 file/workspace epic and WebScene #227 release graph. It carries
vscode-oss/plannedwhile the same-window navigation fixture is requalified.wieslawsoltes commentedon Sep 18, 2026
Requalification completed on current main and merged via #352 at
cc18b9337374ea6aadc570280d503547f3621497.The production contract from #274 remains correct:
Location.href,assign(), andreplace()resolve same-origin targets, emit bounded typedWINDOW_NAVIGATErequests, retain replace-history intent, and do not mutate the document before native admission. The reopened failure was the IndexedDB test fixture assigninglocation.hrefwithout installing a native host admission boundary. #352 now loads that fixture throughwebscene_engine_load_urland asserts the exact initial URL plus absence of a script-originated host request.Current evidence:
location.hrefandlocation.replacereached their target documents.No production WebScene behavior changed. The broad desktop-host filter still has a separate post-navigation V8 fatal on current main; the #270 Location assertions execute before that unrelated failure and the focused navigation/lifecycle filters are green.