Stage 17 round 6 (#16/#17, PR C): lobby sort + server-derived in-game friend state #24

Merged
developer merged 1 commits from feature/lobby-friends into development 2026-06-08 18:28:26 +00:00
Owner

Round-6 review backlog, part C (#16 + #17).

#17 Lobby sort. The my-games list now groups into your turn / opponent's turn / finished (empty sections hidden), ordered by last activity — your-turn oldest-first (longest-waiting on top), the other two newest-first — rendered as a compact, line-separated list (the owner's density pick). gameDTO + FB GameView gain last_activity_unix; a pure lib/lobbysort.ts holds the grouping/ordering.

#16 In-game friend state. The in-game add to friends item is now server-derived via a new GET /user/friends/outgoing (+ friends.outgoing op), returning addressees with a pending or declined request (both read as request sent), so it is correct across reloads and shows a disabled ✓ in friends once accepted. It live-updates when the opponent answers: RespondFriendRequest publishes friend_added (accept) / friend_declined (new notify sub-kind, decline) to the original requester, whose open game re-derives its state. friend_declined is in-app only (the Telegram connector skips it).

Owner decisions: declined stays request sent (non-revealing); accepted reads ✓ in friends; rack-tile reorder while tiles are placed stays disabled by design.

Tests: lobbysort unit; gateway outgoing + last_activity transcode; backend integration ListOutgoingRequests + respond-publishes (real Postgres, green); e2e updated for the new section labels + a non-friend active opponent (60 e2e green). gofmt/vet/build clean; svelte-check 0; 115 unit.

Stacked on feature/game-ux (#23) → feature/landing-v2 (#22); the diff collapses to just C's changes once those merge. Linear stack — merge in order #22#23 → C, applies cleanly.

Round-6 review backlog, part C (#16 + #17). **#17 Lobby sort.** The my-games list now groups into **your turn / opponent's turn / finished** (empty sections hidden), ordered by last activity — your-turn oldest-first (longest-waiting on top), the other two newest-first — rendered as a compact, line-separated list (the owner's density pick). `gameDTO` + FB `GameView` gain `last_activity_unix`; a pure `lib/lobbysort.ts` holds the grouping/ordering. **#16 In-game friend state.** The in-game **add to friends** item is now server-derived via a new `GET /user/friends/outgoing` (+ `friends.outgoing` op), returning addressees with a pending **or** declined request (both read as *request sent*), so it is correct across reloads and shows a disabled **✓ in friends** once accepted. It live-updates when the opponent answers: `RespondFriendRequest` publishes `friend_added` (accept) / `friend_declined` (new notify sub-kind, decline) to the original requester, whose open game re-derives its state. `friend_declined` is in-app only (the Telegram connector skips it). **Owner decisions:** declined stays *request sent* (non-revealing); accepted reads *✓ in friends*; rack-tile reorder while tiles are placed stays disabled by design. **Tests:** lobbysort unit; gateway outgoing + last_activity transcode; backend integration `ListOutgoingRequests` + respond-publishes (real Postgres, green); e2e updated for the new section labels + a non-friend active opponent (60 e2e green). gofmt/vet/build clean; svelte-check 0; 115 unit. _Stacked on `feature/game-ux` (#23) → `feature/landing-v2` (#22); the diff collapses to just C's changes once those merge. Linear stack — merge in order #22 → #23 → C, applies cleanly._
developer added 4 commits 2026-06-08 17:24:13 +00:00
Landing v2: icon switchers, ephemeral theme, channel link, drop browser CTA
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 7s
CI / integration (pull_request) Successful in 10s
CI / ui (pull_request) Successful in 32s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m6s
3fd279cf8c
Owner review-pass rework of the landing page:
- Rename the per-language Telegram link build var
  VITE_TELEGRAM_LINK_EN/_RU -> VITE_TELEGRAM_GAME_CHANNEL_NAME_EN/_RU
  (it carries a channel username; the landing builds https://t.me/<name> --
  the same channels the connector posts to via TELEGRAM_GAME_CHANNEL_ID_*).
- Language switcher -> a globe icon dropdown (flags + names), saved + synced
  to the app prefs.
- Theme switcher -> a sun/moon icon toggle, ephemeral (follows the system
  scheme, no auto, never persisted) -- galaxy-game style.
- Drop the "Play in browser" CTA (no standalone-web onboarding yet).

Docs: FUNCTIONAL(+ru), PLAN, deploy + ui READMEs.
Game/Telegram review polish: USSR flag, touch drag ghost, TG fullscreen header
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Successful in 31s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 55s
34385240b9
Backlog item 2 of ~4 (owner review pass):
- USSR flag emblem redrawn (canonical hammer & sickle, scaled down 1.5x
  below the star).
- Touch drag-and-drop: enlarge the drag ghost 1.5x on touch only (the finger
  hides the tile); suppress the iOS tap-highlight that lingered on a rack tile
  sliding into a dragged tile's slot.
- Telegram fullscreen: its native nav no longer hides our header -- the header
  drops below the content-safe-area top inset and the menu (hamburger) lifts
  into the nav band, centred (--tg-content-top from the SDK inset + a
  tg-fullscreen class; new telegram.ts helper + app wiring).

Tests: UI check/test:unit/build + full e2e (60) green. The iOS tap-highlight
fix and the TG-fullscreen layout want on-device verification on the deploy.
Review fixes #2: bigger flag star, TG header below nav, board-tile relocation
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Successful in 31s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m7s
b720907db2
Addressing the review on #23:
- Flag star scaled up ~25% (the hammer&sickle emblem unchanged, kept clear of it).
- TG fullscreen header: drop the WHOLE header below the content-safe-area top
  inset (the hamburger stays to the right of the title), instead of pinning the
  hamburger to the physical top edge.
- DnD: a placed (pending) tile can now be relocated by dragging it to another
  board cell (board->board); it lifts off its source cell while dragged; and it
  can be grabbed even on the zoomed board (touch-action:none on the pending
  cell, so the drag wins over the board pan). The manual-selection blue frame
  now clears on recall.
Stage 17 round 6 (#16/#17, PR C): lobby sort + server-derived in-game friend state
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Successful in 31s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m19s
6b6baf5710
Lobby: group the my-games list into your-turn / opponent-turn / finished
(empty sections hidden), ordered by last activity (your-turn oldest-first,
the other two newest-first), as a compact line-separated list. gameDTO and
FB GameView gain last_activity_unix (turn start while active, finish time
once finished); a pure lib/lobbysort.ts holds the grouping/ordering.

Friends: the in-game 'add to friends' item is now server-derived via a new
GET /user/friends/outgoing (+ friends.outgoing op), returning addressees with
a pending OR declined request (both read as 'request sent'), so it is correct
across reloads; it shows a disabled '✓ in friends' once accepted. It
live-updates when the opponent answers: RespondFriendRequest now publishes
friend_added (accept) / friend_declined (new notify sub-kind, decline) to the
original requester, whose open game re-derives its friend state.

Tests: lobbysort unit test; gateway outgoing + last_activity transcode tests;
backend integration ListOutgoingRequests + respond-publishes-to-requester;
e2e updated for the new lobby section labels + a non-friend active opponent.
Docs: ARCHITECTURE notify catalog, FUNCTIONAL(+ru) lobby/friends, PLAN.
owner approved these changes 2026-06-08 18:25:44 +00:00
developer merged commit 5d677cb282 into development 2026-06-08 18:28:26 +00:00
developer deleted branch feature/lobby-friends 2026-06-08 18:28:26 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/scrabble-game#24