Stage 17 round 6 (#18, PR D): admin Messages moderation section #25

Merged
developer merged 1 commits from feature/admin-messages into development 2026-06-08 18:28:30 +00:00
Owner

Round-6 review backlog, final part D (#18).

A new /_gm/messages admin console page lists posted chat messages (nudges excluded) newest-first: time · source · sender · IP · message · game. Source is the sender's account kind — guest / robot / its oldest identity kind (e.g. email, telegram). The sender links to the user card and the game to the game card; the list is searchable by sender name / external-id glob masks and pinnable to one game (?game=) or sender (?user=), reachable from a top-level Messages nav entry and from the game and user cards.

Server-rendered (adminconsole MessagesView + messages.gohtml, 50/page via the shared pager; {{.Body}} auto-escaped). The list query lives in social (raw SQL, kind='message', source via a SQL CASE), reusing the now-exported account.LikePattern glob helper.

Owner decisions: messages only (no nudges); separate name/ext masks (matching the Users section); a top-level nav entry plus the card deep-links.

Tests: adminconsole render case; backend integration AdminListMessages (real Postgres, green) — nudge exclusion, game/sender pins, glob masks, source label. gofmt/vet/build clean; full backend unit green.

Branched independently off development (not stacked on the C-chain), so the code diff is admin-only and self-contained. The only shared file with the C-stack is PLAN.md's round-6 list (both append a bullet) — expect a trivial "keep both bullets" merge; everything else is conflict-free (different doc sections).

Round-6 review backlog, final part D (#18). A new **`/_gm/messages`** admin console page lists posted chat messages (**nudges excluded**) newest-first: **time · source · sender · IP · message · game**. *Source* is the sender's account kind — `guest` / `robot` / its oldest identity kind (e.g. `email`, `telegram`). The sender links to the user card and the game to the game card; the list is **searchable** by sender name / external-id glob masks and **pinnable** to one game (`?game=`) or sender (`?user=`), reachable from a top-level **Messages** nav entry and from the **game** and **user** cards. Server-rendered (`adminconsole` `MessagesView` + `messages.gohtml`, 50/page via the shared pager; `{{.Body}}` auto-escaped). The list query lives in `social` (raw SQL, `kind='message'`, source via a SQL `CASE`), reusing the now-exported `account.LikePattern` glob helper. **Owner decisions:** messages only (no nudges); separate name/ext masks (matching the Users section); a top-level nav entry plus the card deep-links. **Tests:** `adminconsole` render case; backend integration `AdminListMessages` (real Postgres, green) — nudge exclusion, game/sender pins, glob masks, source label. gofmt/vet/build clean; full backend unit green. _Branched independently off `development` (not stacked on the C-chain), so the **code** diff is admin-only and self-contained. The only shared file with the C-stack is `PLAN.md`'s round-6 list (both append a bullet) — expect a trivial "keep both bullets" merge; everything else is conflict-free (different doc sections)._
developer added 5 commits 2026-06-08 18:11:25 +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.
Stage 17 round 6 (#18, PR D): admin Messages moderation section
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 9s
CI / integration (pull_request) Successful in 11s
CI / ui (pull_request) Successful in 32s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m14s
356f490546
A new /_gm/messages console page lists posted chat messages (nudges
excluded) newest-first — time, source (guest/robot/oldest identity kind),
sender (linked to the user card), IP, body, game (linked to the game card)
— searchable by sender name / external-id glob masks and pinnable to one
game (?game=) or sender (?user=), linked from the game and user cards.

The list query lives in social (raw SQL, kind='message', source via a SQL
CASE), reusing the now-exported account.LikePattern. Server-rendered
adminconsole MessagesView + messages.gohtml, 50/page via the shared pager.

Tests: adminconsole render case; backend integration AdminListMessages
(real Postgres) — nudge exclusion, game/sender pins, glob masks, source.
Docs: ARCHITECTURE section 8 chat moderation, PLAN round-6.
developer force-pushed feature/admin-messages from e01faae28a to 356f490546 2026-06-08 18:11:25 +00:00 Compare
owner approved these changes 2026-06-08 18:25:59 +00:00
developer merged commit f95a6cb9c8 into development 2026-06-08 18:28:30 +00:00
developer deleted branch feature/admin-messages 2026-06-08 18:28:30 +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#25