Skip to content

fix(ui): keep task transcripts in the task sidebar - #120463

Merged
steipete merged 5 commits into
mainfrom
steipete/sidebar-transcript-navigation-bug-c4be75
Aug 8, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/sidebar-transcript-navigation-bug-c4be75

Conversation

@steipete

@steipete steipete commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users viewing background task details could not open the task transcript in the same sidebar. Same-session transcript targets could no-op, while different-session targets replaced the main chat pane and lost the task-detail context.

Why This Change Was Made

The background-task rail now owns a closed list → detail → transcript navigation flow. It loads task history into the rail with the existing read-only chat renderer, rejects stale async responses, and reconciles detail/transcript state when bounded task refreshes remove the viewed task. The task action no longer routes through main-pane session navigation.

User Impact

“View transcript” now opens the transcript inside the background-task sidebar without changing the URL or main conversation. Back returns to the exact task detail that launched it, and refreshes cannot strand a stale transcript view.

Evidence

  • Before / transcript / Back browser screenshots
  • Mantis behavior evidence
  • Mantis raw QA manifest
  • Mocked-Gateway browser E2E verifies the task transcript loads in the rail, the URL and main transcript remain unchanged, and Back restores task details.
  • Focused state coverage verifies bounded refresh omission resets both detail and transcript views and late responses cannot resurrect them.
  • Focused UI state/rendering, browser E2E, chat view, i18n, lint/types/max-lines all passed.
  • Session-provenance repair matrix passed: 25 session-loop tests, 8 attempt-normalization tests, 63 status/context tests, 43 sessions/status-summary tests, 17 fork/accessor tests, 75 agent-runner tests, and 114 inbound/reply-state tests.
  • QA Lab current-source process extraction: 38 focused tests plus lint/format, preserving PGID settlement, Windows taskkill, output caps, timeout diagnostics, and JSON parsing.
  • Core guards, typecheck, dead-code scan, oxlint, formatting, and git diff --check passed.
  • Codex-backed autoreview was clean for the sidebar patch, session-provenance bundle, QA Lab extraction, and full branch.

Current main introduced shared merge-gate regressions while this PR was in flight. Repairs now on main were deduplicated during rebase. This branch carries only the still-needed session-provenance owner repair and a behavior-preserving QA Lab process-owner extraction that fixes current-main max-lines without suppression. Sarah Fortune retains contributor credit on the session provenance commit.

AI-assisted implementation; reviewed, simplified, and behavior-verified by the maintainer.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Browser proof

Before — task detail exposes View transcript

Task detail before opening transcript

After — task transcript replaces the detail inside the same sidebar; the main conversation stays unchanged

Task transcript rendered in the sidebar

Back — the originating task detail is restored

Task detail restored after Back

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@openclaw-mantis web-ui-chat candidate=f6d195aed7274939b678a0426f737a67faaf3070

@steipete
steipete marked this pull request as ready for review August 8, 2026 04:36
@openclaw-mantis

openclaw-mantis Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Mantis Web UI Chat Proof

Summary: Mantis ran the OpenClaw Control UI chat proof against the candidate ref, sent a message through the mocked Gateway, rendered the final reply in the browser, and captured browser artifacts for review.

Control UI web chat proof

Control UI web chat proof

Full videos:

Raw QA files: https://artifacts.openclaw.ai/mantis/web-ui-chat-proof/pr-120463/run-31242351420-1/index.json

@clawsweeper clawsweeper Bot added 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. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 8, 2026
@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 4:37 AM ET / 08:37 UTC.

ClawSweeper review

What this changes

The PR renders background-task transcripts inside the Control UI sidebar, fixes stale session-usage provenance, and extracts QA Lab CLI process handling into its own module.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

The patch is necessary and appears correct: current main still moves task transcripts into the main chat, while this branch makes the task rail own its transcript flow. Keep it open for normal maintainer review and exact-head CI completion because it is maintainer-authored and carries the maintainer label.

Priority: P2
Reviewed head: 777b14b8fe96553ec19e81397ed416ba911d475b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The implementation is owner-correct with direct UI screenshots and focused boundary coverage; final CI completion remains the practical merge gate.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; supplied screenshots directly show the sidebar flow, though the prepared Mantis capture is not task-rail-specific.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; supplied screenshots directly show the sidebar flow, though the prepared Mantis capture is not task-rail-specific.
Evidence reviewed 7 items Current-main behavior remains broken: Current main still routes the task-row action through main-pane session navigation, so the sidebar transcript behavior is not already implemented.
Sidebar is the state owner: The branch uses a closed rail view, loads supported chat history, and rejects a late response unless the transcript view is still authoritative.
Browser-boundary regression coverage: The mocked-Gateway E2E covers rail-only transcript rendering, unchanged URL and main transcript, and Back restoring task detail.
Findings None None.
Security None None.

How this fits together

The Control UI receives background-task summaries and transcript history from the Gateway, then renders them beside the active conversation. This change keeps task navigation and read-only transcript state in the task sidebar so the main chat and URL remain unchanged.

flowchart LR
A[Gateway task summaries] --> B[Task sidebar state]
B --> C[Task detail view]
C --> D[Task transcript history]
D --> E[Read-only sidebar transcript]
B --> F[Main chat and URL unchanged]
Loading

Before merge

  • Resolve merge risk (P1) - The prepared Mantis artifact does not itself demonstrate the task-sidebar flow on the final head; the direct screenshots are useful, but a focused final-head capture would reduce reviewer uncertainty.
Agent review details

Security

None.

PR surface

Source +280, Tests +221. Total +501 across 39 files.

View PR surface stats
Area Files Added Removed Net
Source 22 845 565 +280
Tests 17 406 185 +221
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 39 1251 750 +501

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: src/agents/sessions/agent-session-loop-correctness.test.ts, serialized state: src/agents/sessions/agent-session-loop-resource-loader.test-support.ts, serialized state: src/commands/sessions.ts, serialized state: src/config/sessions/types.ts, unknown-data-model-change: src/agents/sessions/agent-session-loop-correctness.test.ts, unknown-data-model-change: src/agents/sessions/agent-session-loop-resource-loader.test-support.ts, and 1 more. Confirm migration or upgrade compatibility proof before merge.

Mantis proof suggestion

A focused final-head web chat capture would directly verify the sidebar transcript, unchanged main chat, and Back behavior that the existing generic Mantis capture does not show. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis web UI chat proof: verify that opening a background task transcript stays in the sidebar, preserves the main chat and URL, and Back restores task details.

Merge-risk options

  • Required exact-head CI is still in progress, so the focused results in the PR body are not a substitute for completed required checks.

Maintainer options:

  1. Decide the mitigation before merge
    Merge the sidebar-owned navigation repair only after exact-head checks complete, retaining the aligned session-provenance and behavior-preserving QA Lab extraction changes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the sidebar-owned navigation repair only after exact-head checks complete, retaining the aligned session-provenance and behavior-preserving QA Lab extraction changes.

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

Yes; current main's task-row navigation path is source-proven, and the branch's mocked-Gateway E2E specifies the prior main-pane replacement/no-op failure and expected sidebar-only outcome.

Is this the best way to solve the issue?

Yes; making the task rail own list/detail/transcript state, stale-result rejection, and refresh reconciliation is cleaner than routing through the unrelated main chat pane.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This repairs a visible Control UI task-navigation defect without evidence of broad runtime or data-loss impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; supplied screenshots directly show the sidebar flow, though the prepared Mantis capture is not task-rail-specific.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored PR is exempt from the external-contributor proof gate; supplied screenshots directly show the sidebar flow, though the prepared Mantis capture is not task-rail-specific.

Evidence

What I checked:

Likely related people:

  • steipete: Introduced the original task-rail navigation on main and authored the sidebar, session-provenance, and extraction commits in this PR. (role: feature owner and recent area contributor; confidence: high; commits: 7016b9c81de2, 57f2f3379ba7, 3b9282844546; files: ui/src/pages/chat/components/chat-background-task-row.ts, ui/src/pages/chat/components/chat-background-tasks.ts, src/agents/embedded-agent-runner/run/attempt-normalization.ts)
  • Sarah Fortune: The session-provenance commit credits this person as co-author and the change affects session usage normalization and display semantics. (role: co-author of session-provenance repair; confidence: medium; commits: 618b02d53531; files: src/agents/embedded-agent-runner/run/attempt-normalization.ts, src/status/summary.ts, src/config/sessions/types.ts)
  • vincentkoc: Available history ties the existing QA Lab process-settlement behavior to this contributor before the behavior-preserving extraction. (role: adjacent process-lifecycle contributor; confidence: medium; commits: bf0aadbc40c2; files: extensions/qa-lab/src/suite-runtime-agent-process.ts, extensions/qa-lab/src/qa-cli-process.ts)

Rank-up moves

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

  • Let exact-head required checks finish; if a manual proof refresh is needed, capture the task-sidebar transcript and Back flow on the final head with private details redacted.

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 (3 earlier review cycles)
  • reviewed 2026-08-08T04:42:33.591Z sha f6d195a :: found issues before merge. :: [P2] Reconcile transcript view after task snapshots change
  • reviewed 2026-08-08T05:49:42.059Z sha 58319242db92703f344c65fdd786ff740efe3f93 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-08T06:48:16.320Z sha 8cb229a4c036440c9ff596e841bb5cc7b56a8c94 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/sidebar-transcript-navigation-bug-c4be75 branch from f6d195a to f291010 Compare August 8, 2026 05:20
@steipete
steipete force-pushed the steipete/sidebar-transcript-navigation-bug-c4be75 branch from f291010 to 5831924 Compare August 8, 2026 05:43
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Addressed the stale bounded-refresh finding at the task-rail state owner: successful snapshot replacement now resets detail/transcript views whose task is no longer authoritative, with regression coverage for both view kinds and late async responses.

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@openclaw-mantis web-ui-chat candidate=58319242db92703f344c65fdd786ff740efe3f93

@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added 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. and removed 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. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Aug 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final head 226b4bfb9ce1b55616c651a3999f66f82ac95d92 differs from the clean reviewed UI head only by the canonical one-line Plugin SDK baseline repair required by currently red main. The exact baseline generator check passes.

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete
steipete force-pushed the steipete/sidebar-transcript-navigation-bug-c4be75 branch from 226b4bf to 8cb229a Compare August 8, 2026 06:40
@openclaw-barnacle openclaw-barnacle Bot added the commands Command implementations label Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final head 8cb229a4c036440c9ff596e841bb5cc7b56a8c94 adds only the reviewed canonical red-main Doctor test-seam fix after the clean UI head and Plugin SDK manifest repair. The deterministic 120s shard now completes in ~25s; 192 focused Doctor tests pass. No user-visible UI code changed after the clean review at 58319242db92703f344c65fdd786ff740efe3f93.

@steipete
steipete force-pushed the steipete/sidebar-transcript-navigation-bug-c4be75 branch from a38bf9d to 618b02d Compare August 8, 2026 08:07
@openclaw-barnacle openclaw-barnacle Bot removed the docs Improvements or additions to documentation label Aug 8, 2026
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final deduplicated candidate 618b02d535315d06dcb5e1648ae3e89a8b81c605 is rebased onto origin/main a4b4c58e87cee2d3d818f49d4520fa2e548c75fc. Main now owns the Plugin SDK, Doctor, and Swift repairs; this branch contains only the sidebar fix plus the still-needed reviewed session-provenance repair. Whole-branch autoreview and the focused matrix are clean.

@clawsweeper

clawsweeper Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Final candidate 777b14b8fe96553ec19e81397ed416ba911d475b adds only the reviewed behavior-preserving current-source QA Lab process-owner extraction after the clean 618b02d branch. It preserves current PGID settlement semantics, passes 38 focused QA Lab tests plus lint/format, and fixes current-main max-lines without suppression.

@clawsweeper

clawsweeper Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete
steipete merged commit c5d00cb into main Aug 8, 2026
131 checks passed
@steipete
steipete deleted the steipete/sidebar-transcript-navigation-bug-c4be75 branch August 8, 2026 08:45
@steipete

steipete commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 8, 2026
Remove the callback option retired by #120463 so the terminal header regression test type-checks on current main.
steipete added a commit that referenced this pull request Aug 8, 2026
The session-loop split and #120463's helper extraction landed the same
createResourceLoader/createCompactionHandlers twice; the rebase kept both,
orphaning main's agent-session-loop-resource-loader.test-support.ts and
failing the dead-code gate. Import the upstream helpers and delete the
duplicates.
steipete added a commit that referenced this pull request Aug 8, 2026
* fix(ui): restore terminal button in chat header

* test(ui): follow background task props API

Remove the callback option retired by #120463 so the terminal header regression test type-checks on current main.
steipete added a commit that referenced this pull request Aug 8, 2026
The session-loop split and #120463's helper extraction landed the same
createResourceLoader/createCompactionHandlers twice; the rebase kept both,
orphaning main's agent-session-loop-resource-loader.test-support.ts and
failing the dead-code gate. Import the upstream helpers and delete the
duplicates.
steipete added a commit that referenced this pull request Aug 8, 2026
The session-loop split and #120463's helper extraction landed the same
createResourceLoader/createCompactionHandlers twice; the rebase kept both,
orphaning main's agent-session-loop-resource-loader.test-support.ts and
failing the dead-code gate. Import the upstream helpers and delete the
duplicates.
steipete added a commit that referenced this pull request Aug 9, 2026
…d dirty retention (#120434)

* feat(agents): record run-end worktree cleanup outcome

Persist removed, retained, and failed run-end cleanup outcomes on managed worktree records. Operators and QA can inspect the durable fact through worktrees.list and openclaw worktrees list --json.

Release note: Managed worktree run-end cleanup now records why a checkout was removed or retained in worktree list JSON.

* test(qa): prove dirty worktree retention outcome

* chore(protocol): regenerate swift gateway models

* fix(agents): harden worktree cleanup recovery

Register run_end_cleanup_json as a lazy compatible column so same-version v6 index repair and read-only doctor migration can recover databases created before the column existed.

Type removal contention at the registry boundary; unexpected claim failures now best-effort record a bounded failed outcome and rethrow the original error.

* fix(ci): clear repo-wide lint debt blocking merge gates

The red-main landing rule requires this PR to repair repository-wide merge-gate debt instead of bypassing it. Apply the current lint contracts mechanically and split turn-transition coverage into a concept-named sibling with per-file-safe test state.

Exact line delta: +676/-574 (net +102) across 44 test/support files.

* fix(ci): preserve cached health refresh proof

Require the public refresh call to exist before accepting that sensitive fields were omitted, so the boundary proof cannot pass on a missing call.

* fix(ci): correct test typing left by the lint sweep

Literal-widened totalTokensVersion fixtures, a WebSocket RawData overload
mismatch, and the protocol schema document cast broke check-test-types
after the repo-wide lint repair. Aligns the fixtures with SessionEntry,
narrows Buffer handling per RawData, and keeps the JSON-shaped undefined
omission under structuredClone.

* test(agents): reuse upstream resource-loader test support

The session-loop split and #120463's helper extraction landed the same
createResourceLoader/createCompactionHandlers twice; the rebase kept both,
orphaning main's agent-session-loop-resource-loader.test-support.ts and
failing the dead-code gate. Import the upstream helpers and delete the
duplicates.

* fix(agents): reject finalized rows at the worktree removal claim

Address the accepted ClawSweeper late-claim finding by rereading and rejecting missing or finalized worktree rows inside the synchronous removal-claim transaction.

Preserve the authoritative cleanup invariant: finalized contenders record nothing, while retained-busy is written only while the row remains live.

* refactor(agents): reuse registry update for busy outcomes

Keep the live-row conditional write in the canonical registry update path so the finalized-claim repair stays below the registry max-lines ratchet without weakening the authoritative-outcome invariant.

* test(agents): drop session test duplicates after rebase

Keep current main as the canonical owner of next-turn lifecycle coverage and correctness test support after replaying the older lint-debt split.

* fix(agents): guard post-abort cleanup outcomes against finalization

After abortWorktreeRemoval releases a stale remover's claim, its retained or
failed write raced a finalizing remover and could overwrite the authoritative
removed-lossless fact. Route every retained/failed write through the live-row
condition; only the finalizing remover's own removed-lossless write stays
unconditional.

* fix(agents): persist the removal outcome atomically with finalization

A delayed removed-lossless write after remove() finalized could race a
restore plus newer cleanup and overwrite the newer operator-visible fact.
The run-end outcome now rides remove()'s finalization update; every other
cleanup write stays live-row conditional, so no post-finalize write path
remains.

* test(qa): restore strict cached-health contract assertions

The lint sweep's Boolean() coercions let truthy non-booleans satisfy the
wire-typed cached-meta contract. Assert the literal boolean for unknown-typed
fields and use nullish-coalesced strict equivalents for boolean chains.

* fix(agents): clear the stale cleanup outcome when restoring a worktree

A restored checkout begins a new lifecycle; leaving the removed-lossless
fact on the live row showed operators a stale result until the next
cleanup. Restore clears the recorded outcome and the regression asserts
the cleared state before the next cleanup records fresh truth.

* fix(agents): scope stale cleanup outcomes to their observed lifecycle

A stale remover's retained/failed write raced a concurrent remove-plus-
restore: the revived row is live again, so the live-row condition alone
could stamp a prior-lifecycle outcome. Condition those writes on the
activity stamp the remover observed; restore bumps lastActiveAt, making
any prior-lifecycle write a no-op.

* fix(agents): advance the restore activity stamp within one millisecond

Stale cleanup writes fence on the activity stamp they observed; a restore
completing in the same millisecond could revive the row with an identical
stamp and let the fence match. Restore now always advances past the
stored value, and the ABA regression pins the clock to prove the
same-millisecond case.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
* fix(ui): keep task transcripts in the task sidebar

* refactor(ui): split background task rail rendering

* fix(ui): reset stale task rail views

* fix(sessions): honor context usage provenance

Co-authored-by: Sarah Fortune <[email protected]>

* fix(qa): split suite runtime agent process below line cap

---------

Co-authored-by: Sarah Fortune <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
* fix(ui): restore terminal button in chat header

* test(ui): follow background task props API

Remove the callback option retired by openclaw#120463 so the terminal header regression test type-checks on current main.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 9, 2026
…d dirty retention (openclaw#120434)

* feat(agents): record run-end worktree cleanup outcome

Persist removed, retained, and failed run-end cleanup outcomes on managed worktree records. Operators and QA can inspect the durable fact through worktrees.list and openclaw worktrees list --json.

Release note: Managed worktree run-end cleanup now records why a checkout was removed or retained in worktree list JSON.

* test(qa): prove dirty worktree retention outcome

* chore(protocol): regenerate swift gateway models

* fix(agents): harden worktree cleanup recovery

Register run_end_cleanup_json as a lazy compatible column so same-version v6 index repair and read-only doctor migration can recover databases created before the column existed.

Type removal contention at the registry boundary; unexpected claim failures now best-effort record a bounded failed outcome and rethrow the original error.

* fix(ci): clear repo-wide lint debt blocking merge gates

The red-main landing rule requires this PR to repair repository-wide merge-gate debt instead of bypassing it. Apply the current lint contracts mechanically and split turn-transition coverage into a concept-named sibling with per-file-safe test state.

Exact line delta: +676/-574 (net +102) across 44 test/support files.

* fix(ci): preserve cached health refresh proof

Require the public refresh call to exist before accepting that sensitive fields were omitted, so the boundary proof cannot pass on a missing call.

* fix(ci): correct test typing left by the lint sweep

Literal-widened totalTokensVersion fixtures, a WebSocket RawData overload
mismatch, and the protocol schema document cast broke check-test-types
after the repo-wide lint repair. Aligns the fixtures with SessionEntry,
narrows Buffer handling per RawData, and keeps the JSON-shaped undefined
omission under structuredClone.

* test(agents): reuse upstream resource-loader test support

The session-loop split and openclaw#120463's helper extraction landed the same
createResourceLoader/createCompactionHandlers twice; the rebase kept both,
orphaning main's agent-session-loop-resource-loader.test-support.ts and
failing the dead-code gate. Import the upstream helpers and delete the
duplicates.

* fix(agents): reject finalized rows at the worktree removal claim

Address the accepted ClawSweeper late-claim finding by rereading and rejecting missing or finalized worktree rows inside the synchronous removal-claim transaction.

Preserve the authoritative cleanup invariant: finalized contenders record nothing, while retained-busy is written only while the row remains live.

* refactor(agents): reuse registry update for busy outcomes

Keep the live-row conditional write in the canonical registry update path so the finalized-claim repair stays below the registry max-lines ratchet without weakening the authoritative-outcome invariant.

* test(agents): drop session test duplicates after rebase

Keep current main as the canonical owner of next-turn lifecycle coverage and correctness test support after replaying the older lint-debt split.

* fix(agents): guard post-abort cleanup outcomes against finalization

After abortWorktreeRemoval releases a stale remover's claim, its retained or
failed write raced a finalizing remover and could overwrite the authoritative
removed-lossless fact. Route every retained/failed write through the live-row
condition; only the finalizing remover's own removed-lossless write stays
unconditional.

* fix(agents): persist the removal outcome atomically with finalization

A delayed removed-lossless write after remove() finalized could race a
restore plus newer cleanup and overwrite the newer operator-visible fact.
The run-end outcome now rides remove()'s finalization update; every other
cleanup write stays live-row conditional, so no post-finalize write path
remains.

* test(qa): restore strict cached-health contract assertions

The lint sweep's Boolean() coercions let truthy non-booleans satisfy the
wire-typed cached-meta contract. Assert the literal boolean for unknown-typed
fields and use nullish-coalesced strict equivalents for boolean chains.

* fix(agents): clear the stale cleanup outcome when restoring a worktree

A restored checkout begins a new lifecycle; leaving the removed-lossless
fact on the live row showed operators a stale result until the next
cleanup. Restore clears the recorded outcome and the regression asserts
the cleared state before the next cleanup records fresh truth.

* fix(agents): scope stale cleanup outcomes to their observed lifecycle

A stale remover's retained/failed write raced a concurrent remove-plus-
restore: the revived row is live again, so the live-row condition alone
could stamp a prior-lifecycle outcome. Condition those writes on the
activity stamp the remover observed; restore bumps lastActiveAt, making
any prior-lifecycle write a no-op.

* fix(agents): advance the restore activity stamp within one millisecond

Stale cleanup writes fence on the activity stamp they observed; a restore
completing in the same millisecond could revive the row with an identical
stamp and let the fence match. Restore now always advances past the
stored value, and the ABA regression pins the clock to prove the
same-millisecond case.
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: web-ui App: web-ui commands Command implementations extensions: qa-lab maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

1 participant