Skip to content

0007: The shell is a web app shown by Firefox inside a Wolf app

  • Status: Superseded by 0009/0013 (owner, 2026-11-14): the shell runs on the TV's Gamescope and asks our runner for apps, so the Wolf app, the lobby model and Wolf's socket left the shell (0010 had already replaced Firefox).
  • Date: 2026-11-13

Context

M3 needs a controller-driven home screen, later a store and Bluetooth pairing. Upstream has none of the last two: Wolf UI (Godot 4 with C#) lists a profile's apps and lobbies, wolf-den is a mouse-and-keyboard admin page, and nothing in Games on Whales talks to Bluetooth (checked 2026-11-13). Options: extend Wolf UI upstream, write our own Godot or SDL shell, or write a web UI shown by a kiosk browser.

Decision

The shell is a small Python backend (standard library only) plus an HTML/JS page. Both run in a Wolf app container built from the stock Games on Whales Firefox image, pinned by digest, with our files mounted and our own launch script (as ES-DE does, ADR 0005). Firefox runs in kiosk mode under Gamescope and talks only to the backend on 127.0.0.1. The backend is the only part that talks to Wolf's API socket. It launches apps the way Wolf UI does: it creates a lobby for the app and joins it with the session's WOLF_SESSION_ID. Unlike Wolf UI, the lobby is shared and stays when everyone leaves, so the handheld can join the TV's game and a restarted TV stream comes back to it. Wolf's socket is root-only, so the backend starts as root from the image's start hook; Firefox runs as the image's normal user. The shell is an app in Wolf's Moonlight profile, next to Wolf UI, so TV_APP picks one or the other.

Consequences

  • The page can be developed and tested in any browser, and the backend with a fake Wolf socket. The real Gamepad API path under Gamescope can only be checked on the TV.
  • Firefox costs more memory than a Godot app (capped per container, SHELL_MEM_LIMIT).
  • A started app keeps running (and holding its memory cap) until it is stopped from the shell (Options, Stop), or Wolf restarts.
  • Store and pairing are later pages on the same backend. Generic fixes (Wolf API bugs, a catalogue index) still go upstream (docs/upstream.md).
  • Wolf UI stays installed, so going back is one .env line.