feat: AI-game & resign UX cleanup (lobby drop, board reveal, GCG share fix, hide AI export) #80
Reference in New Issue
Block a user
Delete Branch "feature/lobby-drop-left-ai-games"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A batch of AI-game / resign UX changes (agreed with the owner to land together; one test-contour deploy).
1 — Drop left honest-AI games from the lobby finished list (backend)
A finished
vs_aigame the player left — resign or 7-day inactivity timeout (end_reasonresign/timeout) — no longer appears in that player's lobby finished list. Newgame.Service.ListForLobbyfiltersListForAccountfor the lobby handler only; admin console and account-merge keep the full set; nothing is deleted from the DB. Keys on the game's end reason, not the seat.abortedis intentionally not matched. Test:TestListForLobbyDropsLeftAIGames.2 — Reveal the full board on resign (UI)
After confirming a resign,
Game.sveltecloses the move-history drawer (portrait) and zooms the board out, so the resigned game shows its full final board. Test:game.spec.ts› "resigning reveals the full board".3 — Don't strand the Mini App on a cancelled GCG share (UI bug fix)
Reported, reproducible iOS bug: resign → open history → Export GCG → the iOS share sheet appears → tap outside to cancel → the app is replaced by the raw GCG text in the WKWebView, unrecoverable (force-quit only). Root cause: cancelling Web Share fell through to the Blob
<a download>fallback, and iOS ignores thedownloadattribute, so the anchor click navigates the webview to the blob: URL. Fix: the share path no longer falls back to a download (Web Share is available there; a cancel/fail is a no-op, the user can retry). The download stays the desktop-only path. Test:share.test.ts› cancelled share never downloads.4 — Hide GCG export in AI games (UI)
A
vs_aigame is throwaway practice, so its finished history header no longer offers the 📤 export. Test:quickmatch.spec.ts› "no GCG export offered after it ends".Verification
Backend:
gofmt/vet/unit/integration green. UI: svelte-check (0), unit (274), e2e (144, Chromium + WebKit), build — all green locally. No migration / wire / gateway change; no contour wipe needed. Docs updated:FUNCTIONAL.md(+_ru),ARCHITECTURE.md,UI_DESIGN.md, Go Doc.feat(lobby): drop left honest-AI games from the finished listto feat: drop left AI games from the lobby list; reveal full board on resignA vs_ai game is throwaway practice, so its finished history header no longer offers the 📤 GCG export (an empty slot keeps the comms icon pinned right). Docs note the AI exclusion; UI_DESIGN also records that confirming a resign reveals the full board (closes the history drawer, zooms out).feat: drop left AI games from the lobby list; reveal full board on resignto feat: AI-game & resign UX cleanup (lobby drop, board reveal, GCG share fix, hide AI export)