Skip to content

feat(ui): refresh work progress without adding a chat message - #154044

Merged
steipete merged 4 commits into
mainfrom
openclaw/hidden-refresh-control-in-work-card
Sep 20, 2026
Merged

steipete merged 4 commits into
mainfrom
openclaw/hidden-refresh-control-in-work-card

Conversation

@roboclaw-bot

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

Copy link
Copy Markdown
Collaborator

What Problem This Solves

A saved task-progress card can become stale while work continues. Refreshing it currently requires a visible chat request, which adds noise and does not distinguish requesting an update from receiving a saved update.

User Impact

Adds a small refresh button to expanded and collapsed composer progress cards. It asks the agent to reconcile the card with current work, blockers and next steps without inserting a visible chat message. Pending, retry and updated states preserve the draft, transcript, disclosure and previous card. Success requires a newer authoritative saved-card revision. Read-only projections remain read-only.

Why This Change Was Made

Uses a typed, authorized progressCard.refresh RPC and the existing trusted internal steering path rather than a browser-generated chat.send. The original caller principal and session lifecycle checks are retained. A standalone refresh has restricted tools and hidden transcript/delivery projections; steering existing work does not replace its tools or visible reply. Refresh input cannot answer pending human-input requests, and an unconfirmed steering receipt cannot abort independently authorized work.

Requested by and implemented with @steipete.

Evidence

  • Initial complete changed-file gate passed: formatting, line caps, generated schema consistency, i18n, core and test types, UI types/styles, lint, portable platform checks, database and authorization guards.
  • pnpm build passed on the configured isolated Blacksmith Testbox.
  • Focused runtime, authorization, transcript visibility, human-input isolation, UI store/component and pane tests passed. Registered-Gateway integration covers idle dispatch, rejected-steer fallback, confirmed and unconfirmed active steering, concurrent visible human messages and read-only denial.
  • Actual-browser proof passed for desktop expanded, 390px collapsed and failure/retry scenarios. Before screenshots use a clean base snapshot; after screenshots exercise the implemented UI against a controlled Gateway fixture. No live-provider result is claimed. Sanitized before/after screenshots are embedded below; these capture the implemented application, not the design preview.
  • Independent local AutoReview passed for the original implementation through P1 and the retry repairs through P2. The added registered-Gateway regressions fail before the repair and pass afterward; 55 focused Gateway/UI tests pass. The final queued-lifecycle repair also passed independent review through P2, production and Gateway-test typechecks, lint, formatting, and line-cap checks.
  • Retry recovery distinguishes finished direct or queued work from accepted steering, rereads saved state after failed/missed change-event reads, and preserves deduplication for unconfirmed steering. The real enqueue/drain/lifecycle and followup runner are exercised with controlled provider/session edges: separate runtime ID, progress, terminal no-update, abandonment, consumed steering and replaced-controller cases. Three regressions fail before the queued repair; all 38 tests across four focused Gateway suites pass afterward.
  • Personally inspected upstream Codex at c7c824dce4da186e5142af5d9a1587ae553efe46: codex-rs/app-server/src/request_processors/turn_processor.rs:991-1120, codex-rs/core/src/codex_thread.rs:440-473, codex-rs/core/src/session/turn_input.rs:548-645 and codex-rs/core/src/session/turn.rs:295-320,410-425. Steering is bound to the active turn and applied at its next model boundary.

No Gateway deployment or restart is included. Exact-head PR CI and native landing gates remain to be completed.

Before

Before: task progress without the refresh control

After

After: refresh control beside the task progress timestamp

Test cost and CI repair notes

Each local row is the wall time of one complete node scripts/run-vitest.mjs run <file> --maxWorkers=1 invocation, including startup/transformation. The first 13 files were measured at 83ed099; the final two were measured on the queued-repair candidate. All 15 files passed. On hosted run 35540198874, the refresh browser file passed all three cases in 3.984 s. The bundled Gateway logs expose only partial per-case timing lines rather than complete file durations; no full-file CI times are inferred from those partial sums.

Test file One-worker command wall
src/agents/harness/transcript-visibility.test.ts 1.41 s
src/agents/session-tool-result-guard.visibility.test.ts 14.92 s
src/auto-reply/reply/reply-run-registry.visibility.test.ts 2.33 s
src/auto-reply/reply/session.heartbeat-no-reset.test.ts 16.70 s
src/auto-reply/reply/source-reply-delivery-mode.test.ts 6.68 s
src/gateway/server-methods-list.test.ts 19.46 s
src/gateway/server-methods/progress-card-refresh.integration.test.ts 23.81 s
src/gateway/server-methods/progress-card-refresh.test.ts 6.69 s
src/gateway/server-methods/progress-card.authorization.test.ts 24.67 s
ui/src/components/session-progress-card-refresh.test.ts 2.92 s
ui/src/lib/session-progress-cards.test.ts 2.82 s
ui/src/pages/chat/chat-composer-progress-refresh.test.ts 2.78 s
ui/src/pages/chat/chat-pane-identity.test.ts 6.72 s
src/gateway/server-methods/progress-card-refresh.queued.test.ts 14.87 s
src/gateway/server-methods/chat-send-dispatch-errors.test.ts 10.34 s

The browser file ui/src/e2e/session-progress-refresh.e2e.test.ts previously passed all three scenarios in 16.38 s reported suite duration on Blacksmith Testbox (not a live-provider test). This composition exercises the rendered application, real disclosure/DOM identity and draft/transcript preservation that store-only tests cannot prove.

Initial CI failures were diagnosed rather than blindly rerun: method registration shifted advertised indices (fixed here by appending the new method); the task-identifier test imported the moved codec binding from the SQLite module (upstream fix #153988); the stylelint fixture expectation omitted a TS fixture present on the merge ref (upstream fix #153061). The latter two fixes are included in the branch base. The security resolver hit GitHub installation rate limiting. The follow-up run on 83ed099 completed with only generated Kotlin method-order drift and its aggregate gate failing; the canonical generator repaired that drift and pnpm protocol:check passes. The final queued-completion repair and generated correction are published at fc8765eef0886dbb5923746fbf9c2fce6564d63c; its own CI is required before landing.

Worked on by

Work sessions


View the OpenClaw team session

@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: android App: android app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 20, 2026
@steipete
steipete marked this pull request as ready for review September 20, 2026 20:14
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed September 20, 2026, 6:37 PM ET / 22:37 UTC (Revision 3).

ClawSweeper review

What this changes

Adds a progress-card refresh button and authorized Gateway request that updates task status without inserting a visible chat message.

Merge readiness

⛔ Needs changes before merge - 3 items remain

The feature remains useful and absent from main. Earlier retry repairs address normal completion and missed updates, but idle refresh admission and queued cancellation still have concrete correctness defects.

Priority: P2
Reviewed head: fc8765eef0886dbb5923746fbf9c2fce6564d63c

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful visual evidence and focused coverage accompany two unresolved runtime lifecycle defects.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The maintainer-author exemption applies. Inspected screenshots support control placement and preserved draft/transcript; controlled browser and dispatch-mocked integration evidence does not establish successful agent-driven refresh through the real session-preparation callback.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-author exemption applies. Inspected screenshots support control placement and preserved draft/transcript; controlled browser and dispatch-mocked integration evidence does not establish successful agent-driven refresh through the real session-preparation callback.
Evidence reviewed 10 items Introduced scope and checkout identity: Reviewed the merge-base-to-head changes at fc8765e. The raw head parent matches the supplied original-head record. Base-only changes and the stale test merge were not attributed to this PR.
Feature remains absent from current main: The progress-card handler at fetched main implements get and put, without refresh. The related merged UI PRs address collaborator scrolling and people-picker caching, rather than this capability.
Release capability check: The v2026.9.5 method registry advertises progressCard.get and progressCard.put, without progressCard.refresh. Some local historical blobs were unavailable through the promisor remote; bounded GitHub contents reads supplied the main and release checks.
Findings 2 actionable findings [P1] Keep hidden refresh runs eligible for session preparation
[P2] Retire cancelled queued refresh receipts before removing their owner
Security None None.

How this fits together

The Control UI displays progress cards saved by the agent through the Gateway. Refresh requests enter the existing chat admission and steering pipeline, while saved-card revisions determine whether the UI reports success.

flowchart TD
  A[Refresh button] --> B[Gateway authorization]
  B --> C{Active work accepts steering?}
  C -->|Yes| D[Existing agent turn]
  C -->|No| E[Hidden status turn]
  D --> F[Saved progress card]
  E --> F
  F --> G[Revision check and UI update]
Loading

Before merge

  • Keep hidden refresh runs eligible for session preparation (P1) - Setting projectSessionActive: false here makes onSessionPrepared in this same module reject every matching refresh binding at line 624. Idle refreshes and rejected-steer fallback enter real reply resolution, which invokes that callback through dispatch-from-config.gather.ts and get-reply.ts:761, so they abort before the agent can update the card. Separate hidden presentation from admission liveness while preserving cancellation and replacement checks. The registered integration fixture mocks dispatch before this callback. This is a late discovery: the admission file is byte-identical to the earlier reviewed head.
  • Retire cancelled queued refresh receipts before removing their owner (P2) - After the initial dispatch settles with a queued refresh, cancelling that queued turn removes its map entry through the controller's abort listener. completeQueuedChatTurn then returns false here, so even abandonment cannot replace the cached status: "ok". The queued abort handler does not update that receipt either. Retry therefore keeps returning accepted for cancelled work until dedupe expiry. Record cancellation against the exact queued owner before removal, retaining the successor-controller protection, and cover abort followed by retry.
  • Complete next step (P2) - Repair hidden refresh admission and cancelled queue receipts, with regressions exercising the real preparation callback and queued abort path.

Findings

  • [P1] Keep hidden refresh runs eligible for session preparation — src/gateway/server-methods/chat-send-admission.ts:397-399
  • [P2] Retire cancelled queued refresh receipts before removing their owner — src/gateway/server-methods/chat-send-turn-adoption.ts:108-118
Agent review details

Security

None.

PR surface

Source +700, Tests +1947, Docs +12, Other +45. Total +2704 across 55 files.

View PR surface stats
Area Files Added Removed Net
Source 36 831 131 +700
Tests 16 2105 158 +1947
Docs 1 14 2 +12
Config 0 0 0 0
Generated 0 0 0 0
Other 2 45 0 +45
Total 55 2995 291 +2704

Review metrics

Metric Value Why it matters
New request contract 1 write RPC; 0 new configuration options The fixed-prompt refresh operation reuses existing session authorization and saved-card storage.
Production versus test growth Production +745 net lines; tests +1,947 net lines The stated production growth supports hidden dispatch and retry ownership, but the mocked dispatch boundary misses the idle-path failure.

Technical review

Best possible solution:

Keep saved cards authoritative, separate hidden presentation from run liveness, and settle refresh retry identities on both completion and cancellation.

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

Yes, source establishes deterministic PR-head paths: an idle refresh reaches the rejecting session-preparation callback, and queued cancellation removes the receipt owner before settlement. Neither path was executed during this read-only review.

Is this the best way to solve the issue?

The existing Gateway admission and card-storage owners are the right integration points, but the patch must distinguish presentation visibility from execution liveness and terminalize cancelled queued refreshes.

Full review comments:

  • [P1] Keep hidden refresh runs eligible for session preparation — src/gateway/server-methods/chat-send-admission.ts:397-399
    Setting projectSessionActive: false here makes onSessionPrepared in this same module reject every matching refresh binding at line 624. Idle refreshes and rejected-steer fallback enter real reply resolution, which invokes that callback through dispatch-from-config.gather.ts and get-reply.ts:761, so they abort before the agent can update the card. Separate hidden presentation from admission liveness while preserving cancellation and replacement checks. The registered integration fixture mocks dispatch before this callback. This is a late discovery: the admission file is byte-identical to the earlier reviewed head.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.
  • [P2] Retire cancelled queued refresh receipts before removing their owner — src/gateway/server-methods/chat-send-turn-adoption.ts:108-118
    After the initial dispatch settles with a queued refresh, cancelling that queued turn removes its map entry through the controller's abort listener. completeQueuedChatTurn then returns false here, so even abandonment cannot replace the cached status: "ok". The queued abort handler does not update that receipt either. Retry therefore keeps returning accepted for cancelled work until dedupe expiry. Record cancellation against the exact queued owner before removal, retaining the successor-controller protection, and cover abort followed by retry.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0a9d65e3b7b6.

Labels

Label justifications:

  • P2: This is a bounded task-status improvement with correctness blockers in the proposed refresh workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The maintainer-author exemption applies. Inspected screenshots support control placement and preserved draft/transcript; controlled browser and dispatch-mocked integration evidence does not establish successful agent-driven refresh through the real session-preparation callback.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The maintainer-author exemption applies. Inspected screenshots support control placement and preserved draft/transcript; controlled browser and dispatch-mocked integration evidence does not establish successful agent-driven refresh through the real session-preparation callback.

Evidence

What I checked:

  • Introduced scope and checkout identity: Reviewed the merge-base-to-head changes at fc8765e. The raw head parent matches the supplied original-head record. Base-only changes and the stale test merge were not attributed to this PR. (fc8765eef088)
  • Feature remains absent from current main: The progress-card handler at fetched main implements get and put, without refresh. The related merged UI PRs address collaborator scrolling and people-picker caching, rather than this capability. (src/gateway/server-methods/progress-card.ts:49, 0a9d65e3b7b6)
  • Release capability check: The v2026.9.5 method registry advertises progressCard.get and progressCard.put, without progressCard.refresh. Some local historical blobs were unavailable through the promisor remote; bounded GitHub contents reads supplied the main and release checks. (src/gateway/methods/core-descriptors.ts, ec9c1a13db89)
  • Hidden projection rejects session preparation: Refresh registration sets projectSessionActive=false. The same module's onSessionPrepared callback rejects that value at line 624. Real reply resolution invokes this callback through dispatch-from-config.gather.ts and get-reply.ts:761, before agent execution. The integration fixture replaces dispatch and never invokes this callback. (src/gateway/server-methods/chat-send-admission.ts:398, fc8765eef088)
  • Late-finding continuity verified: A read-only byte comparison against GitHub's exact 83ed099 admission-module blob returned true. Both the hidden projection assignment and rejecting preparation guard were present at the earlier reviewed head. (src/gateway/server-methods/chat-send-admission.ts:398, 83ed099edf0c)
  • Queued completion repair and cancellation gap: The new settlement callback updates the original dedupe receipt only when completeQueuedChatTurn removes the matching controller. Normal completion and overflow abandonment are covered. Queued abort removes that entry first through chat-queued-turns.ts; the queued branch in chat-abort-handler.ts does not replace its cached response, leaving settlement unable to retire the refresh receipt. (src/gateway/server-methods/chat-send-turn-adoption.ts:116, fc8765eef088)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Repair hidden-run admission and cover idle refresh through the real session-preparation callback.
  • Cover queued cancellation followed by refresh retry without allowing stale owners to overwrite successor receipts.

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 (2 earlier review cycles)
  • reviewed 2026-09-20T20:34:17.179Z sha 2152a9ca912ee186aaa12eaa3fb2b6a1894cbc03 :: needs changes before merge. :: [P2] Allow retry after a completed refresh produces no card update | [P2] Reload authoritative card state when retrying a refresh
  • reviewed 2026-09-20T22:06:13.334Z sha 83ed099 :: needs changes before merge. :: [P2] Retire queued refresh receipts when their actual turn finishes

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: fc8765eef0886dbb5923746fbf9c2fce6564d63c
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/methods/core-descriptors.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.
  • src/gateway/session-method-policy.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

roboclaw-bot and others added 2 commits September 20, 2026 21:51
Worked on by:
- @steipete
- @shakkernerd

Co-authored-by: steipete <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
OpenClaw-Publication: d2d91917-0d1c-4b51-b6d6-08b345a1ee4b
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/hidden-refresh-control-in-work-card branch from 2152a9c to 83ed099 Compare September 20, 2026 21:54
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 20, 2026
@steipete
steipete merged commit ddb31b3 into main Sep 20, 2026
247 checks passed
@steipete
steipete deleted the openclaw/hidden-refresh-control-in-work-card branch September 20, 2026 22:54
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
…aw#154044)

* feat(ui): refresh work progress without adding a chat message

Worked on by:
- @steipete
- @shakkernerd

Co-authored-by: steipete <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
OpenClaw-Publication: d2d91917-0d1c-4b51-b6d6-08b345a1ee4b

* fix(ui): recover progress refresh retries without duplicate work

Co-authored-by: steipete <[email protected]>
Co-authored-by: shakkernerd <[email protected]>

* fix(protocol): align generated refresh method order

Co-authored-by: steipete <[email protected]>
Co-authored-by: shakkernerd <[email protected]>

* fix(ui): allow retry after queued progress refresh settles

Co-authored-by: steipete <[email protected]>
Co-authored-by: shakkernerd <[email protected]>

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: android App: android app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants