Skip to content

[macos][openworlds] Make OpenWorlds the visible app shell #113

Description

@100yenadmin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttier-1Tier 1: Claude Code plugin

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions