feat(social): asymmetric per-user block, in-game block control, admin lists #83

Merged
owner merged 2 commits from feature/in-game-block-and-friend-ux into development 2026-06-19 06:15:15 +00:00
Owner

What

In-game block control + asymmetric, non-destructive per-user block semantics, plus admin social lists.

A per-user block is now one-directional and silent: the blocker stops receiving everything from the blocked user (chat, nudge, friend requests, invitations) and the matchmaker never pairs them, while the blocked user notices nothing — their sends still persist by the normal rules but are never delivered or surfaced to the blocker (born-read). A block overrides but no longer deletes the friendship (an unblock restores it), and instant-reads any unread the blocked user had left.

Highlights

  • Backend (social, lobby): a directional blockExists guard across chat / nudge / friends / invitations — store-but-hide for the blocked→blocker direction, refuse for blocker→blocked; matchmaker excludes a block-related pair (both directions) from auto-match; user_blocked / user_unblocked notifications to the blocker only (in-app only).
  • UI: opponent score card gains a block ✖️ mirroring add-friend 🤝 (red "Block?" confirm, mutual-hide while confirming, struck name + hidden chat composer once blocked); optimistic apply + event confirm + rollback for both controls.
  • Admin: the user card gains cross-linked blocks / blocked-by / friends lists (full truth, dates).
  • Docs: FUNCTIONAL (+ru), ARCHITECTURE §10 + decision record, UI_DESIGN, PRERELEASE.

Tests

Backend unit + full integration (new block_test.go, updated invitation/block/admin tests), matchmaker unit, adminconsole render; UI svelte-check + unit + build + full Playwright e2e (146 passed, incl. a new block-flow test). All green locally.

Notes

No DB migration and no FlatBuffers/proto change (reuses NotificationEvent.account), so the test contour needs no schema wipe.

## What In-game **block** control + **asymmetric, non-destructive** per-user block semantics, plus admin social lists. A per-user block is now **one-directional and silent**: the blocker stops receiving everything **from** the blocked user (chat, nudge, friend requests, invitations) and the matchmaker never pairs them, while the blocked user **notices nothing** — their sends still persist by the normal rules but are never delivered or surfaced to the blocker (born-read). A block **overrides but no longer deletes** the friendship (an unblock restores it), and instant-reads any unread the blocked user had left. ## Highlights - **Backend** (`social`, `lobby`): a directional `blockExists` guard across chat / nudge / friends / invitations — *store-but-hide* for the blocked→blocker direction, *refuse* for blocker→blocked; matchmaker excludes a block-related pair (both directions) from auto-match; `user_blocked` / `user_unblocked` notifications to the blocker only (in-app only). - **UI**: opponent score card gains a block ✖️ mirroring add-friend 🤝 (red "Block?" confirm, mutual-hide while confirming, struck name + hidden chat composer once blocked); optimistic apply + event confirm + rollback for both controls. - **Admin**: the user card gains cross-linked **blocks / blocked-by / friends** lists (full truth, dates). - **Docs**: FUNCTIONAL (+ru), ARCHITECTURE §10 + decision record, UI_DESIGN, PRERELEASE. ## Tests Backend unit + full integration (new `block_test.go`, updated invitation/block/admin tests), matchmaker unit, adminconsole render; UI svelte-check + unit + build + full Playwright e2e (146 passed, incl. a new block-flow test). All green locally. ## Notes No DB migration and no FlatBuffers/proto change (reuses `NotificationEvent.account`), so the test contour needs no schema wipe.
developer added 1 commit 2026-06-18 09:51:00 +00:00
feat(social): asymmetric per-user block, in-game block control, admin lists
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 15s
CI / ui (pull_request) Successful in 51s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m19s
81b9e1529e
Make a per-user block one-directional and non-destructive: the blocker stops
receiving everything from the blocked user (chat, nudge, friend requests,
invitations) and the matchmaker never pairs them, while the blocked user
notices nothing — their sends still persist by the normal rules but are never
delivered or surfaced (born-read). A block no longer deletes the friendship
(an unblock cleanly restores it) and instant-reads any unread the blocked user
had left for the blocker.

- backend: a directional blockExists guard across chat/nudge/friends/invitations
  (store-but-hide for the blocked->blocker direction, refuse blocker->blocked);
  the matchmaker excludes a block-related pair (both directions) from auto-match;
  user_blocked/user_unblocked notifications to the blocker only (in-app only).
- ui: the opponent score card gains a block ✖️ control mirroring add-friend
  (red "Block?" confirm, mutual-hide while confirming, struck name, hidden chat
  composer when blocked); optimistic apply + event confirm + rollback for both.
- admin: the user card gains cross-linked blocks / blocked-by / friends lists.
- docs: FUNCTIONAL(+ru), ARCHITECTURE §10 + decision record, UI_DESIGN, PRERELEASE.
developer added 1 commit 2026-06-18 11:12:25 +00:00
fix(social): robot blocks
CI / changes (pull_request) Successful in 3s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 17s
CI / ui (pull_request) Successful in 52s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m21s
64be0572b3
Blocking an auto-match opponent who is secretly a pooled robot is recorded  instead in a separate `robot_blocks` table.

Now blocking behaves the same in that game (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).

- the shared robot account is never put in `blocks`
- the matchmaker keeps it free and it is not blocked under its other per-game names
- the blocked list and the in-game card still show it by joining that table; an unblock deletes the row
owner approved these changes 2026-06-19 06:14:59 +00:00
owner merged commit 1c87313a78 into development 2026-06-19 06:15:15 +00:00
owner deleted branch feature/in-game-block-and-friend-ux 2026-06-19 06:15:16 +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#83