feat(social): per-game friend request to disguised robots + lobby/stats/tile cosmetics #88

Merged
developer merged 3 commits from feature/robot-friend-request into development 2026-06-19 20:06:20 +00:00
Owner

Functional — friend request to a disguised robot

Tapping the in-game add-friend 🤝 on an auto-match opponent who is secretly a pooled robot used to insert a real friendships pending row against the shared robot account (the same bug PR #83 fixed for blocking). It now records the request per (game, seat) in a new robot_friend_requests table, mirroring robot_blocks:

  • the shared robot account never enters friendships;
  • the 🤝 "requested" state is pinned to the seat (keyed by requestedRobotSeats), so it does not leak across the player's other games with that robot;
  • the robot ignores the request (never becomes a friendship);
  • a background reaper deletes the row 7 days after its game finishes (no games purge to cascade from);
  • the outgoing-requests list carries these per-game rows so the seat control stays disabled across reloads.

Per owner decision there is no withdraw button / outgoing section in Profile → Friends.

Cosmetics

  • Lobby: an in-progress game tints the viewer's own score number green when leading or tied, red when trailing (reusing --ok/--danger, no bold); scores render in seat-number order, matching the over-the-board scoreboard. Finished games keep the muted look + place emoji.
  • Stats: the per-variant best move is laid out on two lines — the variant label, then the score (right-aligned in its column) and the word tiles (left-aligned) below.
  • Dark theme: the played-tile background is a touch darker (--tile-bg) so a player-placed tile reads with more contrast; light theme unchanged.

Tests / docs

  • New integration test TestRobotFriendRequestIsPerGameAndReaped; gateway transcode round-trip extended with the robots vector; UI unit tests for scoreStanding/orderedSeats + updated decodeOutgoingList.
  • Full local suite green: gofmt/vet, backend+gateway unit, integration, UI check/unit(295)/build/bundle-gate/e2e(150, Chromium+WebKit).
  • Docs: ARCHITECTURE, FUNCTIONAL (+ _ru), backend README, UI_DESIGN.

⚠️ Schema change (new migration) — the test contour needs a DROP SCHEMA backend CASCADE + backend restart after deploy.

## Functional — friend request to a disguised robot Tapping the in-game add-friend 🤝 on an auto-match opponent who is secretly a pooled robot used to insert a real `friendships` pending row against the **shared** robot account (the same bug PR #83 fixed for blocking). It now records the request per **(game, seat)** in a new `robot_friend_requests` table, mirroring `robot_blocks`: - the shared robot account never enters `friendships`; - the 🤝 "requested" state is pinned to the seat (keyed by `requestedRobotSeats`), so it does not leak across the player's other games with that robot; - the robot ignores the request (never becomes a friendship); - a background reaper deletes the row **7 days** after its game finishes (no games purge to cascade from); - the outgoing-requests list carries these per-game rows so the seat control stays disabled across reloads. Per owner decision there is **no withdraw button / outgoing section** in Profile → Friends. ## Cosmetics - **Lobby**: an in-progress game tints the viewer's **own** score number green when leading or tied, red when trailing (reusing `--ok`/`--danger`, no bold); scores render in **seat-number order**, matching the over-the-board scoreboard. Finished games keep the muted look + place emoji. - **Stats**: the per-variant best move is laid out on **two lines** — the variant label, then the score (right-aligned in its column) and the word tiles (left-aligned) below. - **Dark theme**: the played-tile background is a touch darker (`--tile-bg`) so a player-placed tile reads with more contrast; light theme unchanged. ## Tests / docs - New integration test `TestRobotFriendRequestIsPerGameAndReaped`; gateway transcode round-trip extended with the robots vector; UI unit tests for `scoreStanding`/`orderedSeats` + updated `decodeOutgoingList`. - Full local suite green: gofmt/vet, backend+gateway unit, integration, UI check/unit(295)/build/bundle-gate/e2e(150, Chromium+WebKit). - Docs: ARCHITECTURE, FUNCTIONAL (+ `_ru`), backend README, UI_DESIGN. > ⚠️ Schema change (new migration) — the test contour needs a `DROP SCHEMA backend CASCADE` + backend restart after deploy.
developer added 1 commit 2026-06-19 19:39:49 +00:00
feat(social): per-game friend request to disguised robots + lobby/stats/tile cosmetics
CI / changes (pull_request) Successful in 1s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 13s
CI / ui (pull_request) Successful in 54s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m25s
c127bc9f0e
Functional: the in-game add-friend handshake aimed at an auto-match opponent who is
secretly a pooled robot now records the request per (game, seat) in a new
robot_friend_requests table -- never against the shared robot account -- mirroring the
robot_blocks pattern. The shared account stays out of friendships, the "requested" state
is pinned to the seat (not leaked across the player's other games), the robot ignores it,
and a background reaper drops the row 7 days after its game finishes. The outgoing-requests
list carries these per-game rows so the seat control stays disabled across reloads. No
withdraw UI, per owner decision.

Cosmetics:
- Lobby: an in-progress game tints the viewer's own score number green when leading or
  tied, red when trailing (reusing --ok/--danger); scores now render in seat-number order,
  matching the over-the-board scoreboard.
- Stats: the per-variant best move is laid out on two lines -- the variant label, then the
  score (right-aligned in its column) and the word tiles (left-aligned) below it.
- Dark theme: the played-tile background is a touch darker so a player-placed tile reads
  with more contrast (light theme unchanged).

Docs (ARCHITECTURE, FUNCTIONAL + _ru mirror, backend README, UI_DESIGN) updated in the
same change.
developer added 1 commit 2026-06-19 19:51:57 +00:00
style(lobby): bold the score line, a touch smaller
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 10s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 53s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m13s
9644bd6e5e
Per owner follow-up: the whole lobby score line is now bold (font-weight 700,
matching the over-the-board score plaques) and a hair smaller (0.8rem) to offset
the heavier weight. The viewer's own number keeps its green/red standing tint.
developer added 1 commit 2026-06-19 19:56:13 +00:00
fix(lobby): keep the spaces around the score separator
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 14s
CI / ui (pull_request) Successful in 53s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m12s
c9a5ca3ed7
Svelte trims leading/trailing whitespace inside an element, so the literal
`<span class="sep"> : </span>` rendered as a bare ":" ("123:123"). Emit the
separator as a string expression `{' : '}`, which Svelte preserves, restoring
"123 : 123".
owner approved these changes 2026-06-19 20:05:58 +00:00
developer merged commit 76d4610e6f into development 2026-06-19 20:06:20 +00:00
developer deleted branch feature/robot-friend-request 2026-06-19 20:06:20 +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#88