> ## 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.

# Stints

> Per-driver lap blocks on a time axis, coloured by tyre compound, showing stint length and pit stops as gaps.

## Overview

The Stints widget (registry id `stints`, built by `StintViewer`) draws one column per driver, with every completed lap as a block on a shared time axis. Reach for it to read a session's stop pattern at a glance: how long each stint ran, which compound was fitted, and exactly when a driver was in the pits.

> [!NOTE]
>
> A pit stop is never drawn as its own block. It shows up as the natural gap between two laps in a column, because the driver's next lap started later than the previous one ended.

***

## What It Shows

![The Stint viewer: per-driver lap columns, compound colours and flag bands (Madrid 2026)](https://mintcdn.com/smedley_group/zwm6wmhxgH8zyABx/images/watchparty/stints.png?fit=max\&auto=format\&n=zwm6wmhxgH8zyABx\&q=85\&s=577d189e81da292de7c6dda05640d4ab)

Columns are ordered by ascending driver number and never reshuffle as the race unfolds, so a given driver always sits in the same place even while the running order changes.

| Element | Encoding |
| - | - |
| Column | One per driver with at least one as-of lap, in fixed driver-number order |
| Block | One completed lap; its height IS the lap time on a fixed 18px-per-minute scale |
| Block colour | Tyre compound (soft/medium/hard/intermediate/wet token); neutral grey when the compound is unknown |
| Gap between blocks | Time spent in the pits |
| **P** marker | Top-right corner of a block: the driver pitted at the end of that lap |
| Vertical axis | Circuit-local time of day, or lap number in a race session (click the axis header to toggle) |
| Flag overlay | Translucent horizontal bands for safety car, virtual safety car, red flag and track-level yellow; a line for each chequered flag; a labelled line for each green flag |
| Struck-through block | A lap race control deleted; still drawn, with the reason in its title |
| Knockout fill | Qualifying only: the part of a driver's column after they were eliminated is filled, so a knocked-out car reads at a glance |

The axis is a fixed pixel scale, not a percentage of the visible span, so a lap's height always means the same duration however far the viewer has scrolled.

**Your scroll position is yours.** There is no follow mode: nothing moves the viewer just because new data arrived, a compound was edited, or the playhead moved. The one exception is not following either, it is compensating when the span's own start shifts, so the laps already on screen stay where they were rather than jumping a frame.

Flag bands are drawn in severity order (yellow, then SC, then VSC, then red last) so an overlapping red or SC period is never hidden underneath a less severe one. In qualifying, every segment's green flag gets its own labelled line (Q1/Q2/Q3, or SQ1/SQ2/SQ3 on a sprint weekend); in a race, only the true start gets one, so safety-car restarts do not each add a line.

A **Raw / Fuel corr** toggle above the viewer swaps which lap-time basis sizes the blocks, the same toggle shared with Lap Times, the Laps table and Stint Lap Times.

![In qualifying, an eliminated driver's column is filled from their knockout onwards (Madrid 2026)](https://mintcdn.com/smedley_group/zwm6wmhxgH8zyABx/images/watchparty/stints-qualifying.png?fit=max\&auto=format\&n=zwm6wmhxgH8zyABx\&q=85\&s=34952e6b34156dda9ade8a63e09db71f)

**Correcting a compound.** Right-click any lap block to open the compound picker and set that stint's tyre by hand. This is the same menu the timing tower's badge and the Tyre Strategy widget open, and it exists here precisely because the whole stint is already on screen: you do not have to scrub to the lap to fix it.

***

## Data Behind It

Stints is entirely client-derived: there is no insight metric or `model_id`/`model_version` behind it. `screens/derive.ts`'s `buildStintColumns` (blocks), `buildStintFlags` (overlay) and `buildStintAxisLaps` (lap-number ticks) are pure functions of the hydrated session state and the playhead cutoff.

* **REST hydration**: `GET /v1/sessions/{session_key}/laps` and `GET /v1/sessions/{session_key}/stints`, both offset-paged row endpoints. `SessionController.enter` reads both in parallel with the other row endpoints, and the same rehydrate path re-reads them on a WS reconnect or a `seek`.
* **Live updates**: the `laps` WS channel. Stint rows carry no channel of their own on the wire; they are synthesised through the same `timing`-channel envelope reducer as pit rows, keyed off the presence of a `stint_number` field.
* **Compound source**: the tyre for a lap comes from the `stints` table (`compoundForLap`), matched to the lap by lap number, not from the lap row itself. A manual override for that stint wins over the wire's own value and is marked as edited.
* **Deleted laps**: identified from race control's own message text, following the same rule the server metric uses, and struck through rather than removed.
* **Clocks**: the time-of-day axis renders the session's 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 completed laps yet | "No completed laps yet." empty state |
| Live vs replay | Identical rendering; blocks appear as lap rows arrive on either path |
| Session-type gating | None: Stints renders in every session type. The time-of-day/lap-number axis toggle only appears in race sessions |
| Missing compound at source | Some sessions carry stint rows with no compound recorded. The affected block still draws, in the neutral colour, never a guessed compound |
| Pit-out lap, next lap not yet arrived | No block for that lap until the following lap's row lands, because a pit-out lap's true end can only be read off the next lap's start |
| Fuel-corrected mode, no corrected value as of the cutoff | No block for that lap; the widget never silently falls back to the raw time |
| Qualifying knockout | The eliminated driver's column is filled from the moment of their knockout to the end of the visible span |
| New data arrives while you are scrolled back | Nothing moves: there is no follow mode |

***

## FAQ

> **Why is a block drawn in plain grey instead of a tyre colour?**
>
> The compound for that lap is missing at source. This happens for a minority of sessions in the stint data and is an honest "unknown", not a rendering bug.

> **Why did a lap suddenly appear with a large gap before it?**
>
> That gap is the pit stop. A pit-out lap is positioned against the next lap's start rather than its own duration, because a pit-out lap's recorded duration on the live feed includes the whole pit and garage sit.

***

## Next Steps

> **[Tyre Strategy](/software/internal/watchparty/widgets/tyre-strategy)**
>
> The same stints as compact per-driver bars on one lap axis.

> **[Lap Times](/software/internal/watchparty/widgets/lap-times)**
>
> The pace behind each stint block, driver by driver.

> **[Stints Table](/software/internal/watchparty/widgets/stints-table)**
>
> The same stints as sortable, filterable rows.

> **[Pit Window](/software/internal/watchparty/widgets/pit-window)**
>
> Judge a stop against the cars around the selected driver.


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