Summary
The P3 Fleet-tab live preview row mirrors the transcript card's state line, but it always drops the ctx% segment that the card shows — because RunRecord (engine/run-registry.ts) has no maxContext field, while the transcript card's RunCardState gets maxContext from the dispatch path.
Observed (real-pi smoke, same run, same moment)
Transcript card: state ⣾ · ●turn · turn 9 · 1m01s · 582K tok · 58%
Fleet preview: ⣽ · ●turn · turn 9 · 1m01s · 582K tok ← no 58%
Root cause
stateLine() renders the % segment only when both contextTokens and maxContext are set. previewLine() (src/panel/present.ts, P3) builds its state from cardSnapshot(run) where run is a RunRecord — which lacks maxContext, so the segment degrades out (by design, gracefully). The dispatch path knows the model's context window, but never records it on the registry row.
Suggested fix
- Add
maxContext?: number to RunRecord; set it at dispatch (spawnSubagent knows the model's context window)
cardSnapshot already spreads overrides; previewLine's interim cast (rec as { maxContext?: number }).maxContext (added in the P3 preview task) then becomes a plain typed read
Found while
P3 real-pi smoke (Task 6 acceptance @ 6c66299). Flagged as a Minor during the P3 Task 4 review (the interim cast is the honest in-scope typing); this issue tracks the durable fix.
Summary
The P3 Fleet-tab live preview row mirrors the transcript card's state line, but it always drops the ctx% segment that the card shows — because
RunRecord(engine/run-registry.ts) has nomaxContextfield, while the transcript card'sRunCardStategetsmaxContextfrom the dispatch path.Observed (real-pi smoke, same run, same moment)
Transcript card:
state ⣾ · ●turn · turn 9 · 1m01s · 582K tok · 58%Fleet preview:
⣽ · ●turn · turn 9 · 1m01s · 582K tok← no58%Root cause
stateLine()renders the%segment only when bothcontextTokensandmaxContextare set.previewLine()(src/panel/present.ts, P3) builds its state fromcardSnapshot(run)whererunis aRunRecord— which lacksmaxContext, so the segment degrades out (by design, gracefully). The dispatch path knows the model's context window, but never records it on the registry row.Suggested fix
maxContext?: numbertoRunRecord; set it at dispatch (spawnSubagent knows the model's context window)cardSnapshotalready spreads overrides;previewLine's interim cast(rec as { maxContext?: number }).maxContext(added in the P3 preview task) then becomes a plain typed readFound while
P3 real-pi smoke (Task 6 acceptance @ 6c66299). Flagged as a Minor during the P3 Task 4 review (the interim cast is the honest in-scope typing); this issue tracks the durable fix.