Skip to content

fix(ui): expand collapsed task progress on final - #137569

Merged
VACInc merged 1 commit into
mainfrom
roboclaw/task-progress-final-expand
Sep 4, 2026
Merged

VACInc merged 1 commit into
mainfrom
roboclaw/task-progress-final-expand

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #132137

Requested and co-authored by @VACInc.

What Problem This Solves

Fixes an issue where users who enabled Collapse task progress by default would still have the task list hidden after the assistant's final response. The useful completed task context remained available, but required reopening the disclosure manually.

Why This Change Was Made

The composer now binds disclosure transitions to exact run IDs. With the preference enabled, each new run collapses the task list, same-run updates preserve manual disclosure choices, and the matching successful final expands it once. Reloaded cards, interrupted runs, repeated renders, and stale finals do not reopen the list. The setting hint now describes the full lifecycle.

User Impact

Users can keep task progress out of the way while work is active and automatically see the completed list beside the final response. Starting another run collapses it again. With the preference disabled, disclosure behavior is unchanged.

Evidence

  • Pre-fix focused regression: session-progress-card.test.ts failed because the card stayed collapsed after a successful final.
  • node scripts/check-changed.mjs
  • pnpm test:changed — 4 UI shards passed, including 13,434 UI tests, isolated/browser suites, and the full five-case progress-card E2E file.
  • node scripts/run-vitest.mjs ui/src/components/session-progress-card.test.ts ui/src/e2e/session-progress-live-placement.e2e.test.ts — 34 component tests and 5 mocked-Gateway E2E tests passed after the final rebase.
  • Structured autoreview: no accepted/actionable findings.
  • Exact-head PR CI — all 104 jobs completed successfully for bee8fbdc64c109ec46f0a7906f955cf1f2b57ed4.
  • ClawSweeper: no correctness or security findings; platinum patch quality and ready for normal maintainer review. Its worker could not fetch the hosted media because DNS was unavailable, so the recording was independently decoded and inspected before upload.
  • Live mocked-Gateway Control UI proof: 1280×900 VP8/WebM, 11.68 seconds. It enables the real setting, verifies same-run manual state preservation, expands on the matching final, preserves a post-final manual close, and collapses the next run again.
task-progress-final-expand-cycle.webm

Collapsed before the final

Task progress collapsed before the final

Expanded with the final

Task progress expanded beside the final response

Collapsed again for the next run

Task progress collapsed when the next run starts

Review metrics

  • Production: +58 / -12 lines. The existing details-element owner is the narrowest place that can record exact run ownership and consume one matching completion without replaying stale finals.
  • Tests: +251 / -2 lines, including the complete real-UI recording flow.
  • Browser-local preference surface: 0 added, 1 behavior description updated to match the new lifecycle.

Worked on by

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 3, 2026 21:21
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 3, 2026
@clawsweeper

clawsweeper Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 3, 2026, 5:42 PM ET / 21:42 UTC.

ClawSweeper review

What this changes

The PR makes an enabled task-progress disclosure collapse for each active run, expand once on that run’s successful final response, and preserve manual toggles between updates.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this is a focused repair for a current Control UI lifecycle gap, and its maintainer label requires normal maintainer handling rather than automated cleanup.

Priority: P3
Reviewed head: bee8fbdc64c109ec46f0a7906f955cf1f2b57ed4

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-covered UI repair with no supported correctness or security finding.
Proof confidence 🌊 off-meta tidepool Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; its added mocked-Gateway browser E2E remains useful supplemental coverage of the changed Control UI path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; its added mocked-Gateway browser E2E remains useful supplemental coverage of the changed Control UI path.
Evidence reviewed 5 items Current-main behavior: Current main initializes the composer disclosure only once per session; later renders return when the details element is already registered, so a terminal render cannot reopen it.
Changed owner boundary: The PR extends the existing details-element WeakMap with active and handled completion run IDs, reopening only for one matching completion and retaining manual state on same-run renders.
Run identity caller: The chat pane projects the active run ID into composer props, and the composer pairs it with the terminal done run ID before rendering the progress card.
Findings None None.
Security None None.

How this fits together

The Control UI receives session progress and chat-run state from the Gateway, then renders a task-progress disclosure beside the chat composer. This change uses the run identity already projected into the chat UI to decide when that disclosure should change state.

flowchart LR
  A[Gateway run events] --> B[Chat pane state]
  B --> C[Composer run identity]
  C --> D[Progress disclosure owner]
  E[Browser collapse preference] --> D
  D --> F[Task progress details]
  F --> G[Visible final response context]
Loading

Before merge

  • Resolve merge risk (P1) - The repair adds 46 net production lines; its run-lifecycle state should remain confined to the existing details-element WeakMap so a second disclosure-state owner does not emerge.
Agent review details

Security

None.

PR surface

Source +46, Tests +249. Total +295 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 4 58 12 +46
Tests 2 251 2 +249
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 309 14 +295

Review metrics

Metric Value Why it matters
Production versus test delta production +46 net (58 added, 12 removed); tests +249 net (251 added, 2 removed) The production growth records exact active and completed run identity in the existing disclosure owner; coverage exercises the resulting lifecycle at component and browser boundaries.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep exact run matching in the existing disclosure owner; no net-neutral alternative can distinguish a matching final from stale or repeated terminal events without obscuring that lifecycle state.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep exact run matching in the existing disclosure owner; no net-neutral alternative can distinguish a matching final from stale or repeated terminal events without obscuring that lifecycle state.

Do we have a high-confidence way to reproduce the issue?

Yes—current-main source deterministically preserves the disclosure’s prior state on a terminal rerender, while the added focused tests define the matching-final scenario.

Is this the best way to solve the issue?

Yes—the existing details-element owner is the narrowest boundary that can retain active and completed run identity without replaying stale finals or overriding same-run manual toggles.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6b788ee87f5e.

Labels

Label justifications:

  • P3: This repairs behavior behind an existing opt-in browser-local presentation preference and does not affect the default chat flow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this MEMBER-authored PR; its added mocked-Gateway browser E2E remains useful supplemental coverage of the changed Control UI path.

Evidence

What I checked:

Likely related people:

  • roboclaw-bot: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-03T21:30:44.756Z sha bee8fbd :: blocked before merge. :: none

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Land-ready evidence is complete for bee8fbdc64c109ec46f0a7906f955cf1f2b57ed4.

  • Exact-head PR CI: all 104 jobs passed.
  • Local: node scripts/check-changed.mjs and pnpm test:changed passed.
  • Focused after the final rebase: node scripts/run-vitest.mjs ui/src/components/session-progress-card.test.ts ui/src/e2e/session-progress-live-placement.e2e.test.ts passed (34 component tests, 5 bundled mocked-Gateway E2E tests).
  • The PR body contains the inspected 1280×900 recording and before/final/next-run screenshots.
  • Structured autoreview and ClawSweeper reported no actionable correctness or security findings.

ClawSweeper's production-growth note is accepted: @VACInc requested and co-authored this exact lifecycle, and the review agrees the existing details-element owner is the narrowest state owner that can reject stale/repeated finals. Its media-proof limitation was a reviewer DNS failure; the artifact decoded as an 11.68-second VP8 WebM and representative full-resolution frames were inspected before upload.

@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Additional idle/continuation proof at unchanged PR head bee8fbdc64c109ec46f0a7906f955cf1f2b57ed4:

  • Run 1 task list completed 2/2 while still collapsed.
  • The matching final changed the disclosure closed → open exactly once.
  • The UI then remained untouched for 15.045 seconds. All 145 samples (~100 ms intervals) were open=true, with zero disclosure transitions.
  • Sending run 2 changed the disclosure open → closed exactly once.
  • The following progress-card update caused no additional transition; all 20 continuation samples remained closed.

The apparent bounce in the earlier proof was caused by that test deliberately exercising manual close and reopen after the final. This slower recording performs no post-final disclosure interaction and reproduces no automatic rubber-banding.

Video: 22.4 seconds, 1280×900, VP8/WebM; decoded and inspected frame-by-frame before upload.

task-progress-idle-continuation.webm

No source or PR-head change was required; exact-head CI remains green.

@VACInc
VACInc merged commit 5350f8c into main Sep 4, 2026
184 of 185 checks passed
@VACInc
VACInc deleted the roboclaw/task-progress-final-expand branch September 4, 2026 00:07
vincentkoc added a commit that referenced this pull request Sep 4, 2026
…date-command

* origin/main:
  fix(ci): retry transient npm advisory timeouts (#137716)
  fix: keep restored Usage navigation from being replaced by Chat (#137402)
  fix: keep Usage day totals within the selected session scope (#137396)
  refactor: reduce live digest scheduling allocations (#137655)
  fix(ui): submit selected slash arguments in new sessions (#137571)
  fix(ui): expand collapsed task progress on final (#137569)
  fix(test): prevent auth discovery from stalling MCP replacement proof (#137639)
  test(cli): reuse canonical directory mock call helper (#137640)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants