feat(ui): lobby site-style sidebar + profile screen (#47) #60

Merged
developer merged 2 commits from feature/issue-47-lobby-site-style into development 2026-05-26 20:53:15 +00:00
Owner

Summary

  • Wrap lobby and profile in a shared site-style chrome — left page-list sidebar (Overview/Profile) + top "Player-xxxx" identity strip — using var(--font-mono) to mirror the project site (VitePress).
  • Strip the legacy "you are logged in" / device-session-id <code> / "hello, X" header from the lobby; the identity strip both names the caller and opens the profile editor.
  • Add a top-level profile AppScreen with a three-field form (display_name, preferred_language, time_zone) backed by a new src/api/account.ts wrapper around user.account.get, user.profile.update, and user.settings.update. When the saved preferred_language matches a locale the UI ships translations for, the active i18n locale switches in-place.
  • Adapt the existing e2e specs to the new lobby-account-name testid (and wait for the loaded identity so the webkit revocation test does not race the SubscribeEvents issue). Add profile-screen.spec.ts covering navigation, edit-save, and cancel.
  • Sync ui/docs/lobby.md + ui/docs/navigation.md to the new layout. No backend or wire-contract changes.

Closes #47

Test plan

  • pnpm test (Vitest) — 777 tests pass
  • pnpm exec svelte-check — 0 errors / 0 warnings
  • pnpm build — production build clean
  • pnpm exec playwright test — 245 passed (full suite)
  • pnpm test:pwa — 3 passed
  • Manual visual QA on desktop + mobile breakpoint on dev-deploy
## Summary - Wrap lobby and profile in a shared site-style chrome — left page-list sidebar (Overview/Profile) + top "Player-xxxx" identity strip — using `var(--font-mono)` to mirror the project site (VitePress). - Strip the legacy "you are logged in" / device-session-id `<code>` / "hello, X" header from the lobby; the identity strip both names the caller and opens the profile editor. - Add a top-level `profile` AppScreen with a three-field form (`display_name`, `preferred_language`, `time_zone`) backed by a new `src/api/account.ts` wrapper around `user.account.get`, `user.profile.update`, and `user.settings.update`. When the saved `preferred_language` matches a locale the UI ships translations for, the active i18n locale switches in-place. - Adapt the existing e2e specs to the new `lobby-account-name` testid (and wait for the loaded identity so the webkit revocation test does not race the `SubscribeEvents` issue). Add `profile-screen.spec.ts` covering navigation, edit-save, and cancel. - Sync `ui/docs/lobby.md` + `ui/docs/navigation.md` to the new layout. No backend or wire-contract changes. Closes #47 ## Test plan - [x] `pnpm test` (Vitest) — 777 tests pass - [x] `pnpm exec svelte-check` — 0 errors / 0 warnings - [x] `pnpm build` — production build clean - [x] `pnpm exec playwright test` — 245 passed (full suite) - [x] `pnpm test:pwa` — 3 passed - [ ] Manual visual QA on desktop + mobile breakpoint on dev-deploy
developer requested review from owner 2026-05-26 11:42:49 +00:00
developer added 2 commits 2026-05-26 20:38:26 +00:00
- Wrap lobby and profile in a shared `lobby-shell.svelte` chrome:
  page-list sidebar (Overview/Profile) and a top "Player-xxxx"
  identity strip mirroring the project site's monospace look.
- Strip the legacy `lobby.title`, device-session-id `<code>`, and
  `lobby.greeting` paragraph; the identity strip both names the user
  and opens the profile editor.
- Add a top-level `profile` AppScreen with a three-field form
  (`display_name`, `preferred_language`, `time_zone`) backed by a new
  `src/api/account.ts` wrapper around `user.account.get`,
  `user.profile.update`, and `user.settings.update`. Saving switches
  the active i18n locale in-place when the new preferred language is
  one the UI ships translations for.
- Update e2e fixture + auth-flow / lobby-flow specs to use the new
  `lobby-account-name` testid and wait for the loaded identity before
  releasing pending `SubscribeEvents` (webkit revocation race). New
  `profile-screen.spec.ts` covers navigation, edit-save, and cancel.
- Sync `ui/docs/lobby.md` and `ui/docs/navigation.md` to the new
  layout.

Closes #47
fix(ui): F8-04 profile polish — IANA timezone picker, save-stay, shared identity cache
Tests · UI / test (push) Has been cancelled
Tests · Go / test (push) Successful in 2m30s
Tests · UI / test (pull_request) Successful in 2m49s
a679d9cdcb
PR-feedback round on #60:

- Time-zone field is now a continent-grouped <select> populated from
  `Intl.supportedValuesOf("timeZone")`, with the browser-detected
  zone pre-selected when no value is stored. A stored zone the
  runtime no longer advertises is preserved as an "Other" entry.
- Saving the profile no longer kicks the user back to the lobby:
  the form stays put and shows a transient `saved` notice, cleared
  on the next edit. Only `cancel` returns to the lobby.
- New `lib/account-store.svelte.ts` caches `user.account.get` for
  the session; lobby + profile share it through `account.ensure()`,
  so navigating Overview ⇄ Profile no longer flashes the
  "loading account…" placeholder or fires a second gateway call.
  Profile save writes through to the store so the shell identity
  strip picks up the new display name without refetching. Cleared
  on logout to prevent identity bleed between accounts.
- e2e: existing 4 cases adjusted for save-stay; added two new ones
  for the timezone dropdown and identity-strip stability across
  navigation.
- Docs: `ui/docs/lobby.md` updated to describe the shared cache,
  the new timezone picker shape, and the save-stay behaviour.
developer force-pushed feature/issue-47-lobby-site-style from 5271f2b1ec to a679d9cdcb 2026-05-26 20:38:26 +00:00 Compare
owner approved these changes 2026-05-26 20:50:27 +00:00
developer merged commit 98d1fe6cae into development 2026-05-26 20:53:15 +00:00
developer deleted branch feature/issue-47-lobby-site-style 2026-05-26 20:53:15 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/galaxy-game#60