Files
galaxy-game/ui/docs
Ilia Denisov 6fbab5417f
Tests · UI / test (push) Waiting to run
Tests · UI / test (pull_request) Successful in 2m45s
fix(ui): F8-04b lobby — auto-expand first available games sub + hide empty invitations
Two follow-up nits on the F8-04b sidebar:

1. The bare-`lobby` resolver (lobby-screen.svelte) redirected to
   `games-recruitment` unconditionally on mount. With games already
   in the player's roster the sidebar then highlighted the wrong
   sub-page. The resolver now awaits the lobby fan-out + account
   fetch, then hands off to the same `firstVisibleGamesScreen` helper
   the sidebar uses — so a fresh entry with games lands on
   `active-past`, the canonical-order fallback stays `recruitment`.

2. `games-invitations` was unconditionally visible in the sidebar.
   Now it follows the `active-past` rule: hidden until the
   pending-invites list reports >=1. The lobby shell's auto-kick
   effect treats it symmetrically — accepting / declining the last
   invite moves the player to the next visible sub-page once the
   fan-out has resolved.

Acceptance order in games-invitations-screen.acceptInvite was also
swapped to setMyGames-before-removeInvitation: both mutations land
in the same microtask, so the new auto-kick sees the freshly added
game in `myGames` when invitations drop to zero and routes the
player to `active-past` instead of bouncing through `recruitment`.

The visibility predicates and canonical order live in the new
`src/lib/lobby-nav.ts` pure helper, shared between the sidebar and
the resolver so they cannot disagree. Unit tests cover every
combination of (hasMyGames, hasInvitations, isPaidOrDev).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 10:17:57 +02:00
..
2026-05-07 07:18:55 +02:00

UI client — topic docs

Deeper, topic-based documentation for the Galaxy web/cross-platform UI client, beyond what fits in ../README.md. Each file describes how one area works (current state); the staged build history lives in ../PLAN.md, the active web finalization in ../PLAN-finalize.md, and deferred work in ../ROADMAP.md.

Foundation & platform

  • design-system.md — the design tokens (colour / spacing / typography), the light/dark theming mechanism, and the component migration conventions.
  • a11y.md — the WCAG 2.2 AA approach: axe + keyboard test gates, the shared a11y primitives, coverage by area, and the map-canvas alternative.
  • error-state-ux.md — the central error surface (taxonomy → translated/actionable messages), the shared ViewState placeholder, the selected-planet ring, and bottom-sheet dismissal.
  • navigation.md — routes, the sidebar tabs, and the state-preservation rules across view/tab switches.
  • storage.md — the KeyStore and Cache abstractions and their web (IndexedDB) implementations.
  • game-state.md — decoding the FlatBuffers report into GameReport and the GameState / rendered-report stores.
  • sync-protocol.md — order-draft sync, turn cutoff, conflict handling, and auto-pause.
  • events.md — the signed push channel and event handling.
  • calc-bridge.md — the pkg/calc → WASM → TypeScript bridge, with the live function surface and parity rules.
  • wasm-toolchain.md — building ui/core to core.wasm with TinyGo.
  • pwa-strategy.md — the installable/offline PWA: the native service worker, manifest, icons, and the Playwright PWA gate.
  • testing.md — the UI test layers (Vitest + Playwright).

Auth & lobby

  • auth-flow.md — device keypair, email-code login, and request signing on the client.
  • lobby.md — the lobby/game-list UI and membership flows.

Map & active views

Tools & inspectors

Combat & comms

Localisation

  • i18n.md — the localisation mechanism and translation bundles.