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

# Predicted Pit Window and SC

> Each driver's next predicted stop from the engine's best strategy, plus safety-car-now guidance.

## Overview

Predicted Pit Window and SC boils the Strategy Table down to one line per driver: when their best-ranked strategy says they stop next, and what the engine currently recommends if a safety car falls. Reach for it when you want a quick "who pits when" read rather than the full ranked-options table.

> [!NOTE]
>
> SC-now guidance is not implemented on the current engine. Every driver's recommendation reads "unsupported" until a bundle ships the capability; the widget names the responsible engine version rather than hiding the gap.

***

## What It Shows

![Each driver's next predicted stop; SC-now reads unsupported on the interim engine (Madrid 2026)](https://mintcdn.com/smedley_group/zwm6wmhxgH8zyABx/images/watchparty/predicted-pit-window.png?fit=max\&auto=format\&n=zwm6wmhxgH8zyABx\&q=85\&s=8b71d747ff4efb0623fa029bc84e2260)

One row per driver, taken from that driver's own rank-1 strategy.

| Column | Meaning |
| - | - |
| Driver | Driver number |
| Next stop | The rank-1 strategy's first stop lap strictly after the playhead, with a tyre badge for the compound fitted after that stop |
| SC now | The engine's pit-versus-stay recommendation if a safety car were called now, with a margin in brackets when the engine provides one |

The Next stop cell has three forms:

* **Upcoming**: `lap N`, `in K laps`, and the post-stop tyre badge.
* **Passed**: `passed (lap N)`, when the rank-1 candidate stop is at or before the playhead. This is written in words deliberately, never as a negative laps-until count; a countdown that has gone negative is a different fact, and the widget says so.
* **No predicted stops**: the strategy has no remaining stop at all.

When every driver carrying an SC-now entry says "unsupported", a single footer note names the responsible engine version rather than repeating the caveat on every row.

***

## Data Behind It

Rows come from the latest `strategy_snapshot` at or before the playhead lap (the as-of rule): each driver's rank-1 `strategy_rankings` entry for the stop-lap column, and that driver's `sc_now` entry for the recommendation. `model_id` `strategy_snapshot`, `model_version` the composite `engine_version+WRAPPER_VERSION`, over `vpw:v1:{session_key}:insight:strategy_snapshot`, hydrated via REST on session enter and rehydrate, then live.

The "upcoming vs passed" decision is made against the **playhead** lap, not the snapshot's own lap: because a snapshot can be stale under the as-of rule, a candidate stop that looked upcoming when the engine solved it can have already passed by the time it is displayed. The next stop's tyre compound is read from the strategy's category letter immediately after the stop index.

***

## States

| State | Behaviour |
| - | - |
| No snapshot at or before the playhead | Shows the shared empty-state text: the exact-lap status gate and reasons where known, or a generic "No strategy data at lap N." |
| Stale snapshot | A banner reads "Data as of lap N (playhead lap M)" above the table |
| SC-now unsupported | A footer note names the engine version, once, when every SC-now entry present says "unsupported" |
| Race-only | Outside a race, the widget renders "Session is not a race"; the app never computes a strategy bundle for a non-race session |
| Live vs replay | Wire-identical; the widget never branches on `source` |
| Mixed `model_version` | Falls back to the generic no-data state, alongside every other strategy widget |

***

## FAQ

> **Why does a row say 'passed (lap N)' instead of counting down?**
>
> The rank-1 strategy's candidate stop is at or before the current playhead: events have overtaken that prediction. The widget states the fact in words rather than showing a negative number.

> **When will SC now show real recommendations?**
>
> As soon as an engine bundle ships the whole-field SC-now capability. No widget change is needed: rows with a non-"unsupported" recommendation render live and drop out of the footer's "unsupported" count automatically.

***

## Next Steps

> **[Race Strategy Tool](/software/internal/watchparty/strategy/index)**
>
> The shared engine, derivation layer, and sentinel rule behind all six strategy widgets.

> **[Strategy Table](/software/internal/watchparty/strategy/table)**
>
> The full ranked list of strategies this widget's next-stop row is drawn from.

> **[Pit Window](/software/internal/watchparty/widgets/pit-window)**
>
> The actual, non-predicted pit window widget.

> **[Strategy Status](/software/internal/watchparty/strategy/status)**
>
> The gate, reasons, and whole-race health strip that explains a blank or stale table.


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