feat(game): race exit warnings in the turn report (#12) #82
Reference in New Issue
Block a user
Delete Branch "feature/game-race-exit-warnings"
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?
What
Implements the inactivity-removal warnings the rules promise
(
game/rules.txt, "Выход из игры") but the engine never surfaced.for inactivity sees its own turns-remaining countdown in every report.
for all participants.
Race.TTLat report time equals turns-until-removal (reports aregenerated before the end-of-turn decrement; extinct races are wiped at
turn start). Voluntary quit and idle timeout share the TTL countdown and
are intentionally not distinguished (agreed scope).
Changes
pkg/model/report):Report.PersonalExitWarning+RacesLeavingSoon []RaceExitNotice.pkg/schema/fbs/report.fbs+ regenerated Go/TS):RaceExitNoticetable,Report.personal_exit_warning/races_leaving_soon.game/internal/controller/report.go):ReportExitWarnings— personal TTL 1..5; public list of other non-extinct races TTL 1..3,
recipient excluded.
(hidden when empty), wired into the report view, EN/RU i18n.
rules.txtreport-section list,docs/FUNCTIONAL.md§6.4 +docs/FUNCTIONAL_ru.mdmirror.Tests
go build/go vet/gofmtclean;TestReportExitWarnings(engine) + transcoder roundtrip pass.
pnpm check0 errors;pnpm test888 pass (new component test forthe banner + section); Playwright report-sections spec extended.
Notes
The FlatBuffers TS regeneration was scoped to the
reportschema only.The locally-installed flatc (23.5.26) differs from the version that
produced the committed bindings — it drops a vestigial eslint-disable
header and, more importantly, changes nullable-scalar defaults
(
addFieldInt64(.., null)→BigInt(0)), which would silently alter thewire defaults of unrelated tables (local-fleet / local-group /
other-group). A full
make fbs-tstherefore churns 130+ unrelatedgenerated files; those were reverted, and the eslint header was kept on
the touched report files to match the existing convention. A deliberate
toolchain-version bump can regenerate the whole tree later as its own
task.