Support wiki sandbox storage and environment loading with explicit readiness hints
The registered wiki component widget runs with an opaque origin and CSP connect-src 'self' data:, img-src data: https:. The canonical Babylon9 viewer initialization assumes capabilities not available there.
Observed in an isolated Chromium harness using the actual wiki response CSP and the canonical installed bundle:
- Camera initialization threw SecurityError when accessing localStorage. The widget now supplies ephemeral document-local storage only when the real storage accessor throws; persistent storage is untouched when available.
- SceneBuilder's default environment creates a blob URL for its embedded .env texture. The widget CSP does not permit blob fetches. It also creates a default skybox using an external DDS. A screenshot initially retained the Loading overlay. Later rendering showed the chip over a black background. Model-loaded and resource-disposal counters alone did not establish a correctly painted preview.
The widget's private GLB transport is handled separately: component-owned, authenticated iframe navigation transfers verified bytes to the widget, which passes Uint8Array directly to Babylon. No sandbox or wiki visibility policy was relaxed.
Requested shared-viewer support:
- Optional injected environment bytes / texture and skybox texture, without requiring a blob URL or external fetch. Preserve the canonical studio lighting when running under the wiki CSP.
- Safe ephemeral preference storage when browser storage is denied.
- An explicit ready/error result including environment loading, camera readiness and loading-overlay state. Report actionable AI hints instead of leaving consumers to interpret scene counters.
- A bounded integration test in an opaque iframe under the actual wiki CSP, requiring a rendered chip and visible loading-overlay dismissal, then repeated destroy/recreate checks.
Source inspected: canonical adom-3d-viewer-babylon9 distribution, chunk-IERganv1.js (SceneBuilder.init and Viewer initialization). This report is about sandbox integration, not a request to weaken the wiki sandbox. Public wiki bundle revision may differ and requires the same check.