Repository navigation
fix(ui): show frozen elapsed time for stopped goals - #130501
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 7:54 PM ET / 23:54 UTC. ClawSweeper reviewWhat this changesThe PR initializes the Control UI goal-card elapsed label for every status, while retaining the one-second interval only for active goals. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. Current main still returns before initializing a stopped goal’s elapsed span; this PR repairs that renderer boundary with focused unit and browser coverage. The draft and maintainer label require normal maintainer handling rather than automated cleanup. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherThe Control UI receives session goal state from the Gateway and renders a compact goal card above the chat composer. That card uses stored goal timestamps for stopped durations and a local interval only while a goal is active. flowchart LR
A[Gateway session goal] --> B[Control UI session model]
B --> C[Composer goal card]
C --> D{Goal status}
D -->|Stopped| E[Frozen elapsed label]
D -->|Active| F[Live interval]
E --> G[Visible chat composer]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +183. Total +186 across 3 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the elapsed text and interval in this renderer, initialize all statuses through the canonical duration formatter, and retain active-only timer ownership. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main’s non-active early return leaves the elapsed span unset, and the new focused tests exercise that exact rendered boundary. This review did not execute the browser harness. Is this the best way to solve the issue? Yes. The existing duration helper already defines stopped-time semantics, and initializing the same DOM owner before the active-only interval avoids introducing a competing template path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a4c01c1a77ac. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer review complete: the extra three production lines separate all-status label initialization from active-only timer ownership in the existing renderer; no second text owner or timer path is added. The automated stored-data warning is a false positive. Both flagged The reviewed commit is unchanged, and exact-head CI is green, including the required merge gate. The PR body retains the independent rendered/browser proof and all five source-blind checks. |
|
Merged via squash.
|
Additional instructions
Maintainer-editable branch in the upstream repository. AI-assisted with Codex.
What Problem This Solves
Fixes an issue where users opening a paused, blocked, limited, or completed goal would see no elapsed time in the collapsed card above the chat composer. Stopping an already-visible active goal could instead leave its previous live duration in place.
Closes #130500.
Why This Change Was Made
Initialize the elapsed label for every goal status in the existing rendering owner, then start the interval only for active goals. This keeps one owner for the DOM text and preserves timer retirement on status changes, goal removal, and host disconnection. Goal state, timestamps, storage, commands, and timing semantics are unchanged.
The existing formatter already freezes stopped goals at their corresponding status timestamp. Reintroducing a separate template text value would mix Lit child-part ownership with direct timer text updates, so this repair stays in the existing ref lifecycle.
User Impact
Stopped goals immediately show their correct frozen duration, including after reload or an active-to-stopped transition. Active goals continue ticking, and expanding or collapsing details preserves the same duration.
Evidence
Before: the paused card has no elapsed duration.
After: the same paused card immediately shows its recorded one-minute duration.
Production LOC: +5/-2 (net +3), separating initialization for all statuses from active-only interval ownership. Tests: +183/-0. No new production helper, timer owner, configuration, or persisted state.
Provenance: source regression introduced by #124301 (64853b1), authored by @vyctorbrzezowski and merged by @steipete on August 25, 2026. Stable-release reachability was not established.
Proof boundary: the browser runs the real Control UI with synthetic session data and a declared mock Gateway. No operator Gateway, actual agent goal, or external model was modified or invoked.