Repository navigation
fix(ui): keep completed work duration after later run updates - #181844
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR preserves a completed answer’s known duration in its Worked disclosure and removes duplicate footer timing while retaining output tokens. Example: A 13-second answer with 42 output tokens remains visible after session metadata advances to another run.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it fixes a current Control UI timing defect with a focused change, inspected before/after proof, and green exact-head CI; no actionable defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI projects Gateway lifecycle and usage facts into run-owned transcript frames, which render work disclosures and answer footers. flowchart TD
A[Gateway lifecycle and usage] --> B[Session reconciliation]
B --> C[Run recap owner]
B --> D[Transcript grouping]
C --> E[Run frame]
D --> E
E --> F[Worked disclosure]
E --> G[Answer footer]
Technical reviewBest possible solution: Use the existing run-associated recap to fill missing work timing and hide footer timing only when the matching disclosure displays it. Do we have a high-confidence way to reproduce the issue? Current source shows work timing disappearing when session lastRunId advances while the watched recap remains available; the supplied compiled-UI before screenshot demonstrates that scenario. Is this the best way to solve the issue? The patch is a small, complete presentation repair using existing timing ownership, with matching-run checks and preserved handoff, ambiguous-history, and zero-runtime behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f5cb8110d7a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +26, Tests +73. Total +99 across 6 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 23, 2026, 3:21 PM ET / 19:21 UTC. |
|
Merged via squash.
|
What Problem This Solves
A completed answer can show only “Worked” above its activity while still showing “Done in 13 seconds” below the answer after session metadata advances to another run.
User Impact
The existing Worked disclosure keeps the known duration for its own run. The footer keeps output tokens without repeating that duration; answers without a matching Worked disclosure retain their footer timing.
Why This Change Was Made
Reuse the terminal recap already associated with the answer's run when the session no longer carries that run's timing. This changes presentation only: no transcript rewriting, timestamp estimates, new state, or grouping changes. Production delta: +26 lines; tests add 73 lines for the lifecycle boundary, token display, and zero-runtime case.
Evidence
Before (main, same synthetic scenario):
After (0303124):
Risk and coverage
Historical work without matching lifecycle facts remains untimed. Zero runtime keeps the existing footer duration because Worked cannot format it. Rollups without a safe run association retain their existing presentation and any legitimate footer timing. Handoff request-wide timing, multi-run grouping, final answers, and token/cost metadata are unchanged. No live provider or private conversation was accessed.