docs: update documentation to OKF v0.1 format
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
---
|
||||
type: guide
|
||||
title: Scoreboard Page
|
||||
description: How a signed-in player navigates /scoreboard, uses the four tabs, distinguishes up to ten visible players by collision-resolved colors, and watches live solve updates.
|
||||
description: How a signed-in player navigates /scoreboard, uses the four tabs, distinguishes up to ten visible players by collision-resolved colors, watches live solve updates, and sees safe empty output for invalid event windows.
|
||||
tags: [guide, scoreboard, sse, live, ranking, matrix, event-log, score-graph, tester]
|
||||
timestamp: 2026-07-23T06:01:38Z
|
||||
timestamp: 2026-07-23T06:39:17Z
|
||||
---
|
||||
|
||||
# Overview
|
||||
@@ -144,6 +144,25 @@ points for the **top 10 players** over the configured event window
|
||||
| `countdown` | `Not started` | `score-graph-not-started` |
|
||||
| `running` / `stopped` with empty series | `No solves yet` | `score-graph-empty` |
|
||||
|
||||
* The graph validates that `endUtc` is strictly after `startUtc` and that both timestamps are finite. If the event window is missing, reversed, equal, or otherwise invalid, no SVG polyline coordinates are emitted and the graph remains empty rather than rendering off-canvas or non-finite points.
|
||||
* Individual invalid solve timestamps are projected at the left edge of the plot; all generated coordinates remain finite and within the SVG plot bounds.
|
||||
|
||||
# Technical wiring
|
||||
|
||||
| File | Responsibility |
|
||||
|---|---|
|
||||
| `frontend/src/app/features/scoreboard/score-graph.component.ts` | Renders the graph state, legend, axes, and SVG polylines; suppresses series rendering when the event window is invalid. |
|
||||
| `frontend/src/app/features/scoreboard/scoreboard.pure.ts` | Defines graph view types, validates event windows, projects timestamps and values into bounded SVG coordinates, and applies live solve updates. |
|
||||
| `frontend/src/app/features/scoreboard/scoreboard.store.ts` | Loads REST projections, assigns collision-free colors, consumes authenticated `solve` SSE frames, and updates the graph signal. |
|
||||
| `tests/frontend/score-graph-projection.spec.ts` | Covers reversed, equal, missing, and malformed event windows plus finite/in-bounds graph coordinates. |
|
||||
|
||||
# Examples
|
||||
|
||||
## Invalid event-window behavior
|
||||
|
||||
1. Configure an event with `endUtc` before or equal to `startUtc`, or provide malformed timestamps.
|
||||
2. Open `/scoreboard` and select **Score Graph**.
|
||||
3. Verify that no off-canvas polyline is drawn. The graph displays `No solves yet` when the state is otherwise active, or `Awaiting event configuration` when the event is unconfigured.
|
||||
# Live updates
|
||||
|
||||
On `ngOnInit`, `ScoreboardPage` calls `store.loadAll()` (which fans
|
||||
|
||||
Reference in New Issue
Block a user