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
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
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.
This commit is contained in:
@@ -519,7 +519,13 @@ in either direction (the enqueue excludes the caller's `BlockedWith` set);
|
||||
expires after **30 days** and may be re-sent), or **decline** — a decline is
|
||||
remembered (`status='declined'`) and blocks further requests from that sender,
|
||||
unless they hand them a code, which overrides it. The requester's own cancel still
|
||||
deletes the row. (Discovery by friend list or platform deep-link is future work.)
|
||||
deletes the row. A request sent in-game to an **auto-match opponent who is secretly a
|
||||
pooled robot** is recorded instead in a separate **`robot_friend_requests`** table, keyed on
|
||||
the requester + game + seat with the seen name snapshotted (`RequestInGame`): the shared robot
|
||||
account is never put in `friendships` (so it is not befriended/awaited under its other per-game
|
||||
names and the in-game 🤝 stays pinned to that seat as *sent*), the robot never accepts, the row
|
||||
is not surfaced in Settings → Friends, and a background reaper deletes it once its game has been
|
||||
finished for **7 days**. (Discovery by friend list or platform deep-link is future work.)
|
||||
- **Block**: two independent **global** account toggles (`block_chat`,
|
||||
`block_friend_requests`) **plus** a **per-user block list**. A per-user block is
|
||||
**asymmetric and non-destructive**: the blocker stops receiving everything **from** the
|
||||
|
||||
+4
-1
@@ -207,7 +207,10 @@ Blocking an **auto-match opponent who is secretly a robot** behaves the same in
|
||||
(struck name, hidden composer) and lists the blocked opponent under the name you saw, but is
|
||||
recorded only against that game — the disguise holds, the shared robot is never globally
|
||||
blocked, and the matchmaker keeps pairing you with robots (so you can never block yourself out
|
||||
of opponents). Per-game chat is for quick reactions: messages are short
|
||||
of opponents). Sending the 🤝 to such a **disguised robot** likewise records the request only
|
||||
against that game (pinned to the seat, so it stays *sent* there without touching that robot in
|
||||
your other games); the robot **ignores it**, the request never appears in **Settings → Friends**,
|
||||
and it drops automatically about a week after the game ends. Per-game chat is for quick reactions: messages are short
|
||||
(up to 60 characters) and may not contain links, email addresses or phone numbers,
|
||||
even disguised. You may send **one message per turn, on your own turn**; once it is sent
|
||||
the field gives way to a short caption until your next turn. Nudge the player whose turn
|
||||
|
||||
@@ -212,7 +212,11 @@ nudge) приходят от бота **этой партии** — по язы
|
||||
(зачёркнутое имя, скрытый «подвал») и в списке заблокированных показывается под тем именем,
|
||||
которое ты видел, но записывается только для этой партии — маскировка сохраняется, общий
|
||||
аккаунт робота глобально не блокируется, и матчмейкер продолжает давать роботов (так что
|
||||
заблокировать себя без соперников нельзя). Чат
|
||||
заблокировать себя без соперников нельзя). Отправка 🤝 такому **замаскированному роботу** так же
|
||||
записывает заявку только для этой партии (привязанной к месту, поэтому она читается как
|
||||
*отправленная* здесь, не затрагивая этого робота в твоих других играх); робот её **игнорирует**,
|
||||
заявка не показывается в **Настройки → Друзья** и автоматически удаляется примерно через неделю
|
||||
после завершения партии. Чат
|
||||
партии — для быстрых реакций: сообщения короткие (до 60 символов) и не должны
|
||||
содержать ссылок, email и телефонов, даже завуалированных. В свой ход можно отправить
|
||||
**одно сообщение за ход**; после отправки поле сменяется короткой подписью до следующего
|
||||
|
||||
+9
-5
@@ -237,7 +237,11 @@ and a long message does not scroll.
|
||||
|
||||
Lobby rows show two lines (opponents, then result + score) with a large place-based emoji
|
||||
on the right: Victory 🏆 / Defeat 🥈 / Draw 🏅, and for 3–4-player games II 🥈 / III 🥉 /
|
||||
IV 🏅; active games show Your move 🟢 / Opponent's move ⏳; invitations use 💌. When a listed
|
||||
IV 🏅; active games show Your move 🟢 / Opponent's move ⏳; invitations use 💌. The score line
|
||||
lists seats in **seat-number order** (matching the over-the-board scoreboard); on an
|
||||
**in-progress** game the viewer's **own** number is tinted `--ok` when leading or tied and
|
||||
`--danger` when trailing (other numbers stay muted; no bold), a quick "am I ahead" read that
|
||||
finished games leave to the place emoji. When a listed
|
||||
game **becomes your turn or finishes** while the lobby is open, that status emoji **blinks
|
||||
twice** (a two-cycle opacity fade, ~2 s; suppressed under reduce-motion) to draw the eye — the
|
||||
opponent's-turn change is silent. Each card's blink is keyed by game id, so overlapping
|
||||
@@ -294,11 +298,11 @@ enabled on the first, uncached load) and flip in place when an event refreshes t
|
||||
pure numbers, no charts; hint-share is a one-decimal percentage in the active locale's
|
||||
notation (e.g. "4.8%" / "4,8%") — followed by a **full-width "best move" card** that
|
||||
breaks the best move
|
||||
down per variant: one row per played variant (catalogue order, empty variants
|
||||
omitted) with the variant name on the left, the **word drawn as game tiles**
|
||||
down per variant: two lines per played variant (catalogue order, empty variants
|
||||
omitted) — the variant name on its own line, then below it the score (right-aligned
|
||||
in a shared column so the scores align) and the **word drawn as game tiles**
|
||||
(`components/WordTiles.svelte`, the board's placed-tile look at a small fixed size;
|
||||
a wildcard shows its letter but no value) right-aligned to a shared edge, and the
|
||||
score right-aligned in its own column.
|
||||
a wildcard shows its letter but no value) left-aligned, so long words get the full width.
|
||||
- **Profile editing** (`screens/Profile.svelte`): an inline form — display name, a
|
||||
**UTC-offset** timezone dropdown (defaulting to the browser's offset), the away
|
||||
window as hour + 10-minute dropdowns (24-hour, ≤ 12 h), and block toggles — plus an
|
||||
|
||||
Reference in New Issue
Block a user