Summary
Make the exported OpenWorlds experience the visible macOS app shell. This issue
replaces the earlier SwiftUI token-port/repaint approach. PR #123 proved the wrong
path: a hand SwiftUI approximation loses the design fidelity and still feels like a
technical launcher.
The correct path is exact-first: preserve the OpenWorlds HTML/CSS/JS shell in
WKWebView, then wire native process supervision and ClawDnD data into it.
Required Behavior
- The main app window loads
/openworlds/ full-window.
- The old SwiftUI sidebar/control bar/status strip is not visible in normal play.
- The app never opens Safari as the normal play path.
- OpenWorlds keeps its own window frame, nav rail, parchment surface, typography,
spacing, hover/active states, and screen routing.
- Swift is still present as supervisor and native bridge.
Code Architecture
RootView.swift should become or delegate to an OpenWorldsHostView.
WebView.swift should support the native message bridge without owning game state.
AppProcessService.swift should launch the viewer and expose status/logs.
viewer/openworlds/* remains the visible app UI source.
/dashboard stays as fallback/debug.
Display-State Labels
Every OpenWorlds screen must indicate one of:
Wired
Read-only
Display-only
Provider required
Unavailable
Current state:
- Wired/partial: Chronicles, Table, Combat, Atlas.
- Native bridge needed: Settings, Providers, Logs, Start Game, Stop, diagnostics.
- Display-only: Relations, Inventory, Forge, Merchant, Acts, Bestiary, Character,
Create, Seed, advanced Settings, Dialogue choices.
Acceptance Criteria
- App screenshot shows OpenWorlds inside
ClawDnDApp, not Safari.
- Normal app launch has no old SwiftUI sidebar/control bar.
- Relative OpenWorlds assets load in WKWebView.
- Visual route preserves OpenWorlds fidelity before data binding expands.
- No engine/rules/voice/story content changes.
Validation
python3 -m unittest viewer.tests.test_openworlds_static -q
python3 -m py_compile viewer/server.py
swift build --package-path macos/ClawDnDApp
./script/build_and_run.sh --verify
python3 scripts/license_check.py
git diff --check
Original-Agent Handoff
Inspect first:
macos/ClawDnDApp/Sources/ClawDnDApp/Views/RootView.swift
macos/ClawDnDApp/Sources/ClawDnDApp/Views/WebView.swift
viewer/openworlds/app.jsx
viewer/openworlds/styles.css
viewer/openworlds/chrome.jsx
Summary
Make the exported OpenWorlds experience the visible macOS app shell. This issue
replaces the earlier SwiftUI token-port/repaint approach. PR #123 proved the wrong
path: a hand SwiftUI approximation loses the design fidelity and still feels like a
technical launcher.
The correct path is exact-first: preserve the OpenWorlds HTML/CSS/JS shell in
WKWebView, then wire native process supervision and ClawDnD data into it.
Required Behavior
/openworlds/full-window.spacing, hover/active states, and screen routing.
Code Architecture
RootView.swiftshould become or delegate to anOpenWorldsHostView.WebView.swiftshould support the native message bridge without owning game state.AppProcessService.swiftshould launch the viewer and expose status/logs.viewer/openworlds/*remains the visible app UI source./dashboardstays as fallback/debug.Display-State Labels
Every OpenWorlds screen must indicate one of:
WiredRead-onlyDisplay-onlyProvider requiredUnavailableCurrent state:
Create, Seed, advanced Settings, Dialogue choices.
Acceptance Criteria
ClawDnDApp, not Safari.Validation
Original-Agent Handoff
Inspect first:
macos/ClawDnDApp/Sources/ClawDnDApp/Views/RootView.swiftmacos/ClawDnDApp/Sources/ClawDnDApp/Views/WebView.swiftviewer/openworlds/app.jsxviewer/openworlds/styles.cssviewer/openworlds/chrome.jsx