Modern UI: the live ticker replays the last kickoff's matches

ModernSession::read_live answers the ticker's fixture and frame queries with
the engine's recording of the last session.advance: the matches of human
managers with their owners, frames in minute order (kickoff, every event,
half time, the end) with score, chances, cards and players on the pitch, the
event lines, and the day's other matches as the conference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-27 09:37:37 +01:00
1 parent 1400848387
commit fda4b72967
6 files changed
+213

No files matched your search

+6
View File
@@ -834,6 +834,9 @@ public:
// The almanac screen (index, calendar, day, match; docs/new_engine/ui-anbindung.md). Read-only.
cli::Json read_almanac(const cli::Json& request) const { return query_almanac(g_, request); }
// The statistics screen for the manager at the desk (docs/new_engine/ui-anbindung.md). Read-only.
// The live ticker (DataSource::read_live): {kind: "fixture"} the recorded matches of the last
// session.advance, {kind: "frame", sequence} one of its frames; revision/fixture_id as in the demo.
cli::Json read_live(const cli::Json& request) const;
// Sections 1 (transfer history) and 2 (the six curves) come from the original's own records.
cli::Json read_statistics_screen(const cli::Json& request) const;
// The read queries of the new interface (docs/new_engine/ui-abfragen.md): status, leagues,
@@ -1001,6 +1004,9 @@ private:
// ui_command: answers by requestId (the command as JSON, the answer) for repeated commands,
// the last 64 in this process; after a restart expectedRevision prevents a second booking.
std::map<std::string, std::pair<std::string, cli::Json>> ui_answers_;
// the day counters around the last session.advance and the revision after it (read_live)
std::optional<std::pair<uint32_t, uint32_t>> ui_last_advance_;
uint64_t ui_last_advance_revision_ = 0;
std::vector<std::string> ui_answer_order_;
std::filesystem::path data_directory_;