feat: surface live Godot bridge state in runtime host#3
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe changes add Godot bridge snapshot tracking to the upstream runtime system. A new state interface stores bridge metadata (entryState, multiplayerState, lastUpdate, updatedAt). UI display added for summary. Polling mechanism syncs snapshot from iframe window every 500ms. Checkpoint restoration and lifecycle management updated to preserve and initialize bridge state. Changes
Sequence DiagramsequenceDiagram
participant Host as Runtime Host
participant Iframe as IFrame Window
participant Poll as Polling Loop
participant State as State Manager
Host->>Iframe: Load iframe src
Iframe-->>Host: iframe load event
Host->>Poll: startGodotBridgePoll()
activate Poll
loop Every 500ms
Poll->>Iframe: Read __FORKORFRY_GODOT_BRIDGE__
Poll->>Iframe: Read __FORKORFRY_GODOT_LAST_UPDATE__
Iframe-->>Poll: Return snapshot values
Poll->>Poll: Check if changed vs current state
alt Values changed
Poll->>State: Update godotBridgeSnapshot
State-->>Poll: State updated
end
end
Host->>Poll: clearGodotBridgePoll() (on pause/shutdown)
deactivate Poll
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary by CodeRabbit
Release Notes
New Features
Tests