Stage 17 round 6 (#16/#17, PR C): lobby sort + server-derived in-game friend state #24
Reference in New Issue
Block a user
Delete Branch "feature/lobby-friends"
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?
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+ FBGameViewgainlast_activity_unix; a purelib/lobbysort.tsholds 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.outgoingop), 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:RespondFriendRequestpublishesfriend_added(accept) /friend_declined(new notify sub-kind, decline) to the original requester, whose open game re-derives its state.friend_declinedis 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.