Stage 17 #4: enrich the out-of-app your-turn push + add game-over #28
Reference in New Issue
Block a user
Delete Branch "feature/push-enrichment"
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?
Enriches the out-of-app (Telegram) notifications.
Your turn now names the opponent and recaps their last move, voiced as the opponent:
«Аня: мой ход — «СТОЛ». Счёт 120:95»for a scoring play, or a short«Аня: меняю фишки, ваш ход»/«…: пропускаю ход…»otherwise.Game over is a new notification on any finish (closing play, all-pass, resign, timeout):
«Игра окончена — вы выиграли! Счёт 120:95»(won / lost / draw, from the recipient's perspective).Scores are recipient-first (the reader leads), 2-4 players (
120:95:80), as agreed.Surface:
YourTurnEventgainsopponent_name/last_action/last_word/score_line(appended → backward-compatible); newGameOverEvent{result, score_line}. Both emit per-recipient from the game commit (emitMove) — your_turn to the next mover, game_over to every seat — join the out-of-app whitelist, and render per language (en/ru) in the connector. Go + UI FlatBuffers bindings regenerated.Tests: notify round-trip, emit (enriched fields + per-seat game_over), connector render en/ru, routing; integration replay (play → your_turn with a real name; resign → game_over) green. Docs: ARCHITECTURE catalog + out-of-app set, FUNCTIONAL (+ _ru), PLAN tracker.
Note: game_over is emitted to all seats; online players take it from the in-app refresh (the UI ignores the in-app game_over kind), offline players get the Telegram push.
The Telegram 'your turn' notification now names the opponent and recaps their last move (voiced as the opponent: «{name}: my move — «WORD». Score 120:95» for a scoring play; a short 'swapped / passed, your turn' otherwise), and a new game-over notification reports the result + final score when a game ends by any path (closing play, all-pass, resign, timeout). Scores are recipient-first (the reader's score leads), 2-4 players (120:95:80). - schema: YourTurnEvent gains opponent_name/last_action/last_word/score_line (appended, backward-compatible); new GameOverEvent{result, score_line}. Go + UI bindings regenerated (flatc 23.5.26 + pnpm codegen). - backend: notify.YourTurn enriched + notify.GameOver; emitMove resolves the mover's name and emits per-recipient (your_turn to the next mover, game_over to every seat), with recipient-first score lines built in one place. - gateway: game_over joins the out-of-app whitelist (routing.go). - connector: render builds the enriched your_turn + game_over text per language (en/ru). - tests: notify round-trip (enriched + game_over), emit (enriched fields + game_over to all seats / per-seat result), connector render (en/ru), routing; integration replay (play → your_turn with real name; resign → game_over) green. - docs: ARCHITECTURE push catalog + out-of-app set, FUNCTIONAL (+ _ru), PLAN tracker.