Stage 17 #4: enrich the out-of-app your-turn push + add game-over
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 12s
CI / ui (pull_request) Successful in 34s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m20s
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Successful in 8s
CI / integration (pull_request) Successful in 12s
CI / ui (pull_request) Successful in 34s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 1m20s
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.
This commit is contained in:
@@ -23,6 +23,7 @@ export { FriendList } from './scrabblefb/friend-list.js';
|
||||
export { FriendRespondRequest } from './scrabblefb/friend-respond-request.js';
|
||||
export { GameActionRequest } from './scrabblefb/game-action-request.js';
|
||||
export { GameList } from './scrabblefb/game-list.js';
|
||||
export { GameOverEvent } from './scrabblefb/game-over-event.js';
|
||||
export { GameView } from './scrabblefb/game-view.js';
|
||||
export { GcgExport } from './scrabblefb/gcg-export.js';
|
||||
export { GuestLoginRequest } from './scrabblefb/guest-login-request.js';
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
import * as flatbuffers from 'flatbuffers';
|
||||
|
||||
export class GameOverEvent {
|
||||
bb: flatbuffers.ByteBuffer|null = null;
|
||||
bb_pos = 0;
|
||||
__init(i:number, bb:flatbuffers.ByteBuffer):GameOverEvent {
|
||||
this.bb_pos = i;
|
||||
this.bb = bb;
|
||||
return this;
|
||||
}
|
||||
|
||||
static getRootAsGameOverEvent(bb:flatbuffers.ByteBuffer, obj?:GameOverEvent):GameOverEvent {
|
||||
return (obj || new GameOverEvent()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
static getSizePrefixedRootAsGameOverEvent(bb:flatbuffers.ByteBuffer, obj?:GameOverEvent):GameOverEvent {
|
||||
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
||||
return (obj || new GameOverEvent()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
||||
}
|
||||
|
||||
gameId():string|null
|
||||
gameId(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
gameId(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 4);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
result():string|null
|
||||
result(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
result(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 6);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
scoreLine():string|null
|
||||
scoreLine(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
scoreLine(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
static startGameOverEvent(builder:flatbuffers.Builder) {
|
||||
builder.startObject(3);
|
||||
}
|
||||
|
||||
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(0, gameIdOffset, 0);
|
||||
}
|
||||
|
||||
static addResult(builder:flatbuffers.Builder, resultOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(1, resultOffset, 0);
|
||||
}
|
||||
|
||||
static addScoreLine(builder:flatbuffers.Builder, scoreLineOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(2, scoreLineOffset, 0);
|
||||
}
|
||||
|
||||
static endGameOverEvent(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createGameOverEvent(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, resultOffset:flatbuffers.Offset, scoreLineOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||
GameOverEvent.startGameOverEvent(builder);
|
||||
GameOverEvent.addGameId(builder, gameIdOffset);
|
||||
GameOverEvent.addResult(builder, resultOffset);
|
||||
GameOverEvent.addScoreLine(builder, scoreLineOffset);
|
||||
return GameOverEvent.endGameOverEvent(builder);
|
||||
}
|
||||
}
|
||||
@@ -32,8 +32,36 @@ deadlineUnix():bigint {
|
||||
return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0');
|
||||
}
|
||||
|
||||
opponentName():string|null
|
||||
opponentName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
opponentName(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 8);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
lastAction():string|null
|
||||
lastAction(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
lastAction(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 10);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
lastWord():string|null
|
||||
lastWord(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
lastWord(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 12);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
scoreLine():string|null
|
||||
scoreLine(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null
|
||||
scoreLine(optionalEncoding?:any):string|Uint8Array|null {
|
||||
const offset = this.bb!.__offset(this.bb_pos, 14);
|
||||
return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null;
|
||||
}
|
||||
|
||||
static startYourTurnEvent(builder:flatbuffers.Builder) {
|
||||
builder.startObject(2);
|
||||
builder.startObject(6);
|
||||
}
|
||||
|
||||
static addGameId(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset) {
|
||||
@@ -44,15 +72,35 @@ static addDeadlineUnix(builder:flatbuffers.Builder, deadlineUnix:bigint) {
|
||||
builder.addFieldInt64(1, deadlineUnix, BigInt('0'));
|
||||
}
|
||||
|
||||
static addOpponentName(builder:flatbuffers.Builder, opponentNameOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(2, opponentNameOffset, 0);
|
||||
}
|
||||
|
||||
static addLastAction(builder:flatbuffers.Builder, lastActionOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(3, lastActionOffset, 0);
|
||||
}
|
||||
|
||||
static addLastWord(builder:flatbuffers.Builder, lastWordOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(4, lastWordOffset, 0);
|
||||
}
|
||||
|
||||
static addScoreLine(builder:flatbuffers.Builder, scoreLineOffset:flatbuffers.Offset) {
|
||||
builder.addFieldOffset(5, scoreLineOffset, 0);
|
||||
}
|
||||
|
||||
static endYourTurnEvent(builder:flatbuffers.Builder):flatbuffers.Offset {
|
||||
const offset = builder.endObject();
|
||||
return offset;
|
||||
}
|
||||
|
||||
static createYourTurnEvent(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, deadlineUnix:bigint):flatbuffers.Offset {
|
||||
static createYourTurnEvent(builder:flatbuffers.Builder, gameIdOffset:flatbuffers.Offset, deadlineUnix:bigint, opponentNameOffset:flatbuffers.Offset, lastActionOffset:flatbuffers.Offset, lastWordOffset:flatbuffers.Offset, scoreLineOffset:flatbuffers.Offset):flatbuffers.Offset {
|
||||
YourTurnEvent.startYourTurnEvent(builder);
|
||||
YourTurnEvent.addGameId(builder, gameIdOffset);
|
||||
YourTurnEvent.addDeadlineUnix(builder, deadlineUnix);
|
||||
YourTurnEvent.addOpponentName(builder, opponentNameOffset);
|
||||
YourTurnEvent.addLastAction(builder, lastActionOffset);
|
||||
YourTurnEvent.addLastWord(builder, lastWordOffset);
|
||||
YourTurnEvent.addScoreLine(builder, scoreLineOffset);
|
||||
return YourTurnEvent.endYourTurnEvent(builder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user