Commit Graph
7 Commits
Author SHA1 Message Date
dingo c19cf651de build(web): ensure export presets exist in image and precreate .godot/editor for headless export 2026-02-28 03:37:25 +00:00
dingo 505c0b59fa build(web): force compatibility renderer + import pass; export and copy index.html 2026-02-28 03:25:00 +00:00
dingo 1252486c3c ci: build Godot web export inside Dockerfile to avoid dind workspace mount issue 2026-02-28 03:20:50 +00:00
dingo 0383dd431b Add Godot web client build pipeline, image packaging, and Argo webclient deployment manifests 2026-02-28 02:47:41 +00:00
2d6b20f3cb Godot client: version check + content sync + caching architecture
Client flow after auth is now:
  LoginScreen → auth_success → InitScreen → MainScreen

autoloads/ContentCache.gd
  - Cursor-based incremental sync via content.sync (PageSize=200)
  - Merges definition DTOs in-memory (id → Dictionary)
  - Persists to user://content/defs.json on sync completion
  - Incremental on repeat launches: 0 round trips when nothing changed
  - Signals: sync_progress(fetched_total), sync_complete(total), sync_failed(error)

scenes/init/InitScreen.tscn + init_screen.gd
  - Step 1: version.check (clientVersion="0.1.0", platform="web")
      UpdateRequired  → show "please refresh" panel, block
      UpdateAvailable → soft banner, continue
      Ok              → continue
      DISCONNECTED    → wait for Network.connected (one-shot), retry
      other error     → warn + proceed (don't block player on non-critical check)
  - Step 2: ContentCache.start_sync()
      Shows running card count while pages arrive
      On sync_complete: transition to MainScreen
      On sync_failed: show error + Retry button

scenes/login/login_screen.gd
  - _go_to_main() now routes to InitScreen instead of MainScreen directly

project.godot
  - ContentCache registered as autoload (loads before Auth)
  - pointing/emulate_touch_from_mouse=true for desktop browser testing

Caching architecture decision (see plan):
  - Layer 1 (definitions/text): always sync all eagerly — no privacy concern
  - Layer 2 (2D art): lazy by definition ID, CDN fetch on demand
  - Layer 3 (3D models/animations): set-bundle granularity + server-injected
    noise during match pre-warm to prevent cache oracle attack
    (Layer 2/3 implementation is future work)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-27 21:31:47 -05:00
3aaabe75e3 Godot client networking + auth + login/main screens; fix admin hamburger
Server:
- ConnectionLoop: accept auth.login and auth.register as valid first messages
  (not just auth.hello); all ack payloads now include sessionToken for client
  persistence
- IGatewayAuthValidator: add LoginAsync and RegisterAsync
- GatewayAuthValidator: implement both via auth gRPC; fetch displayName from
  ValidateAsync after login/register succeeds
- Admin hamburger: custom .sor-admin-hamburger CSS (hardcoded white, no Bootstrap
  btn-link theme fighting); topbar z-index 1050 with position:sticky

Client (Godot 4.5, GDScript):
- autoloads/Network.gd: WebSocketPeer state machine (CONNECTING / CONNECTED /
  RECONNECTING), exponential backoff (1→30s), app-level keepalive ping every
  30s of idle, 30s ping timeout → reconnect, request/reply correlation by
  sequence number, debug_log_packets export flag for full packet dumps
- autoloads/Auth.gd: drives auth.hello / auth.login / auth.register as first
  WS message; persists sessionToken + userId + displayName to user://auth.cfg;
  auto-resumes saved session on reconnect; auth_success / auth_failed signals
- scenes/login/LoginScreen.tscn + login_screen.gd: Login + Register tabs,
  touch-friendly inputs (44px height), status label, Enter key submits, handles
  reconnect/resume states
- scenes/main/MainScreen.tscn + main_screen.gd: top bar with live connection
  dot, welcome label, placeholder nav buttons, sign-out, redirects to login on
  session expiry
- project.godot: Network and Auth autoloads registered; LoginScreen as main scene

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-27 20:48:53 -05:00
dingo 3bdbfc8c57 Initial commit 2026-02-21 17:47:52 -05:00