Files
saphidandClaude Opus 5.5 d4486a7681 Frame Control: Mac app, web UI, Android and Steam tooling
Package the Frame Control web UI as an installable Electron Mac app and
bring in the tooling built alongside it.

- app/: Electron wrapper that starts ui/server.py on a free loopback port,
  hardened window (sandbox, no navigation, runAsNode fuse off), login-shell
  PATH so Homebrew tools work from Finder, first-run offer to run
  connect.sh, ad-hoc signed DMG/zip via electron-builder.
- ui/: headset view (OpenVR screenshots), device status, library, Steam
  "Get games" (owned games, install, store search), Android apps as
  persistent Lepton instances with a rated F-Droid catalogue and a private
  compatibility database, Android display controls over ADB, file and
  clipboard transfer, Flatpaks, remote and power actions.
- apk-catalog/, compat-db/, frame/: catalogue build pipeline, Lakebed
  capsule for compatibility reports, Frame-side launchers.
- tests/ and CI: server guard and validation tests plus Steam helper tests,
  run on Python 3.9 with script and app syntax checks.
- Docs: README leads with the Mac app; new Android, panels, Steam games and
  field-notes docs; security notes on LAN-exposed ADB ports.

Screenshot values for the headset's IP and Wi-Fi name are placeholders.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 22:21:20 +10:00

47 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env zsh
# Mac-side: start Frame Control (ui/server.py) and open it in its own window.
#
# Needs scripts/connect.sh to have been run once. Ctrl-C stops the server.
#
# Usage: scripts/frame-ui.sh [--no-open]
# Env: PORT (default 47810), FRAME_ALIAS (default frame).
set -euo pipefail
PORT=${PORT:-47810}
here=${0:A:h}
url="http://127.0.0.1:$PORT/"
open_window=1
[[ "${1:-}" == "--no-open" ]] && open_window=0
[[ "${1:-}" == -h || "${1:-}" == --help ]] && { sed -n '2,8p' "$0"; exit 0; }
show() {
(( open_window )) || return 0
# A Chrome app window looks like a native app; fall back to the default browser.
if [[ -d "/Applications/Google Chrome.app" ]]; then
open -na "Google Chrome" --args --app="$url" --window-size=1400,950
else
open "$url"
fi
}
# The Server header tells our server apart from anything else on the port.
ours() { curl -fsS -D - -o /dev/null "$url" 2>/dev/null | grep -qi '^server: FrameControl'; }
if ours; then
print "Frame Control is already running at $url"
show
exit 0
fi
python3 "$here/../ui/server.py" --port "$PORT" &
server=$!
trap 'kill $server 2>/dev/null' EXIT INT TERM
for i in {1..50}; do
ours && break
kill -0 $server 2>/dev/null || { print -u2 "Server exited (port $PORT in use? try PORT=... $0)"; exit 1; }
(( i == 50 )) && { print -u2 "Server didn't start"; exit 1; }
sleep 0.1
done
show
wait $server