> ## Documentation Index
> Fetch the complete documentation index at: https://playbook.smedleygroup.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Race Control

> The official race control message log: flags, DRS notices and other messages, newest first.

## Overview

The Race Control widget (registry id `racecontrol`, built by `RaceControlFeed`) is a scrolling log of official race control messages, newest first. Reach for it to see exactly when a flag was thrown, a safety car deployed, or DRS enabled, alongside the message text race control issued.

> [!NOTE]
>
> The flag word itself is never printed as text. It is carried entirely by the coloured pennant icons, so the same convention colours used elsewhere in the app (the stint flag overlay, the transport bar) apply here too.

***

## What It Shows

![Race Control messages during a race (Madrid 2026)](https://mintcdn.com/smedley_group/zwm6wmhxgH8zyABx/images/watchparty/race-control.png?fit=max\&auto=format\&n=zwm6wmhxgH8zyABx\&q=85\&s=94f8cdfb9f7e4b107c5a55774c5bab64)

Each row is one message.

| Element | Encoding |
| - | - |
| Clock | Mono `HH:MM:SS` in circuit-local time, from the row's own timestamp; a dash when the row carries no parseable timestamp |
| Category badge | **Flag**, **DRS**, or **Other** for anything that is not literally one of those two categories |
| Pennants | Shown only on Flag-category rows, in the flag's convention colour: one pennant for most flags, two for double yellow, none for an unrecognised flag word |
| Message | The race control message text |

Recognised flags and their colours: green, yellow, double yellow, blue, red, chequered, black and white, safety car (SC) and virtual safety car (VSC). An unrecognised flag word, or a missing one, renders no pennant at all rather than a guessed colour.

Rows display in the order the store received them, reversed so the newest message is on top; this is append order, not a re-sort by timestamp.

***

## Data Behind It

Race Control is entirely client-derived, with no insight metric or `model_id`/`model_version` behind it.

* **WS channel**: `race_control`, part of the Section 5 envelope family (`vpw:v1:{session_key}:race_control`) defined in `libs/vpw-contracts`.
* **REST hydration**: `GET /v1/sessions/{session_key}/race_control`, an offset-paged row endpoint. `SessionController.enter` reads it in parallel with the other row endpoints on session entry, and re-reads it on a WS reconnect or a `seek`.
* The `raceControlAsOf` selector filters the store's rows to those whose `ts` is at or before the playhead cutoff, in the order the store received them; `RaceControlFeed` reverses a copy of that for display.
* The clock renders the session's own circuit-local time from its `gmt_offset`, falling back to the browser's local time only when the session carries no usable offset.
* Live and replay envelopes are wire-identical; the widget never branches on envelope `source`.

***

## States

| State | Behaviour |
| - | - |
| No messages yet | "No race control messages" empty state |
| Live vs replay | Identical rendering |
| Session-type gating | None: shown in every session type |
| Row with no parseable timestamp | Dash clock; the row still appears in its original append-order position |
| Category is not literally "Flag" or "DRS" | Buckets to **Other**, never invented |
| Flag word not in the recognised set | Category badge still shows **Flag** if the category says so, but no pennant is drawn |

***

## FAQ

> **Why does a Flag row show no pennant icon?**
>
> Its flag value is not one of the recognised words (green, yellow, double yellow, blue, red, chequered, black and white, SC, VSC). Rather than guess a colour, the row shows the category badge and message with no icon.

> **Is the feed ordered by time?**
>
> It reflects the order messages arrived in the store, reversed for newest-first display, not a sort by the message's own timestamp. In practice these normally agree, since race control messages are received in order.

***

## Next Steps

> **[Stints](/software/internal/watchparty/widgets/stints)**
>
> See the same flag periods as bands over every driver's laps.

> **[Timing Tower](/software/internal/watchparty/widgets/timing-tower)**
>
> The tower header floods with the flag state these messages announce.

> **[Weather](/software/internal/watchparty/widgets/weather)**
>
> Conditions at the moment a flag was thrown.

> **[Data Journey](/software/internal/watchparty/concepts/data-journey)**
>
> How race control messages reach the app, live or replayed.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.