๐ŸŒ‰ Bridge

Lifecycle: CURRENT (typed vocabulary index)
Canonical TypeScript unions live in frontend/src/lib/games/bridge.svelte.ts.
Host routing for many gameโ†’host messages: frontend/src/lib/games/gameViewport/messageHandlers.ts.
This page is an overview โ€” not a payload schema dump.

Games talk to the host through namespaced postMessage bridge events instead of importing platform internals.

Host โ†’ Game (HostToGameMessage)

funday:handshake, funday:theme-inject (not theme-set), funday:locale-inject, funday:session-inject, funday:pause, funday:resume, funday:action, funday:match-state, funday:match-error, funday:match-joined, funday:match-start, funday:match-settings, funday:match-left, funday:storage-response, funday:navigate.

Game โ†’ Host (GameToHostMessage)

game:ready, game:error, game:close, game:fullscreen, funday:ack, funday:navigate, funday:nav:set, funday:dock:set, funday:drawer:set, funday:lobby-state, funday:request-match, funday:request-session, funday:lobby-practice, funday:send-match-state, funday:score-submitted, funday:analytics-event, funday:track-activity, funday:storage-write|read|list|delete, funday:game-role, funday:chat-msg, funday:haptic, funday:sound, funday:state:meeting.

Direction notes

  • funday:lobby-state is primarily game โ†’ host in the typed union / messageHandlers; the shell also publishes lobby snapshots into games through hostโ†’game match/session paths โ€” do not assume one exclusive direction for all lobby UX.
  • Dock wiring: games emit funday:dock:set; handlers install action callbacks; GameDock renders them and posts funday:action back. See Game dock.
ClaimProof
Typed host/game unions + payloadsfrontend/src/lib/games/bridge.svelte.ts (HostToGameMessage, GameToHostMessage)
Gameโ†’host routerfrontend/src/lib/games/gameViewport/messageHandlers.ts
Theme inject (not theme-set)bridge.svelte.ts theme-inject helpers
Dock action render vs postMessage splitGame dock + messageHandlers.ts
Codex vocabularyfunday-codex.yml bridge.host_to_game uses funday:theme-inject (synced SD24)

Ask Docs

AI assistant to help answer questions about the documentation. Answers are read-only and cite docs/source.

Hi! How can I help you with the documentation today? Answers are read-only and cite docs/source.

Ctrl+Enter to send