Skip to content

fix: show when worktree cleanup stopped or will retry - #207883

Merged
daniel-lxs merged 5 commits into
mainfrom
openclaw/worktree-cleanup-status-truth-53a130
Nov 29, 2026
Merged

daniel-lxs merged 5 commits into
mainfrom
openclaw/worktree-cleanup-status-truth-53a130

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #200350, #200434

What Problem This Solves

The Worktrees page labels a checkout Active even when cleanup has stopped to protect its files. It looks the same as a checkout in use, and someone has to choose Delete to discover why cleanup stopped.

User Impact

A stopped checkout shows Cleanup stopped, the reason, and Retry cleanup. The confirmation names the checkout and explains that it will be deleted only after a safety snapshot succeeds. For scheduled cleanup, the page shows Will retry after and the local time. Ordinary and restorable checkouts keep their existing actions.

Why This Change Was Made

The worktree already records whether retries stopped and when another attempt is eligible. The page uses that record and the existing safe retry operation. No changes to cleanup policy, CLI output, JSON, permissions, or stored data. No migration.

Evidence

I compared main 15a54eaa5479 with 71a0ca85494b in Chromium against an isolated Gateway on CrabBox AWS. The same three CLI-created checkouts had normal activity, a nested Git repository, or a missing Git object. On main, all three said Active. On the fix, they showed three distinct outcomes. At 390 px, cancelling sent no removal; confirming after moving the inner repository sent one safe retry without force. The row became Restorable and the rescued file remained intact.

The row regression failed on main and passed on the fix. All 27 focused page tests and 9 Worktrees browser tests passed, as did the UI build, typecheck, focused lint, style, format and locale checks. I did not wait for the scheduled retry timer or run the full repository suite. No bound local automated reviewer was available.

Clean comparison

Before: all three checkouts say Active.

Main: preserved and scheduled checkouts both say Active

After: the row says whether cleanup stopped or will retry.

Fix: the stopped checkout gives its reason and offers Retry cleanup

Annotated comparison

Main: the stopped checkout labeled Active

Fix: the same row labeled Cleanup stopped

Co-authored-by: @daniel-lxs

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 29, 2026 01:46
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 28958144-a8ea-41a9-82ab-745cc071fdbf
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M labels Nov 29, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. labels Nov 29, 2026
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 29, 2026 01:50
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

The Worktrees page shows stopped cleanup reasons and scheduled retry times, with a direct safe retry action for preserved checkouts.

Example: The branch-preview checkout contains a nested Git repository that prevents a safety snapshot.

  • Before: The row says Active and offers Delete; the preservation reason appears only after attempting removal.
  • After: The row says Cleanup stopped, explains how to address the nested repository, and offers Retry cleanup.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, worthwhile presentation fix with inspected visual evidence, a reported live recovery flow, and no identified correctness blocker.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected Chromium before/after images show the changed row states against the reported isolated Gateway setup; the public report also describes cancellation without removal, one non-force safe retry after repair, transition to Restorable, and retained rescued content. Scheduled timer execution was expressly outside the reported proof and is unchanged by this patch.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A checkout whose cleanup stopped to protect files looks active, hiding both the reason it remains on disk and the available recovery action.
Reason: The maintainer-authored change makes existing cleanup outcomes visible while preserving ordinary deletion, restoration, and snapshot safety.

Merge readiness

✅ Ready for maintainer review

This PR fixes misleading cleanup status through the existing safe removal path; no actionable regression was found, and current-head CI remains pending.

Reviewed head: 2622358b0e619360b8f962ac55e21322ae303e8a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI consumes cleanup metadata from worktrees.list and sends confirmed retryPreserved requests to the existing Gateway removal owner, which retains snapshot safety.

flowchart LR
  A[Cleanup receipt] --> B[Gateway worktrees list]
  B --> C[Worktrees model]
  C --> D[Cleanup status row]
  D --> E[Retry confirmation]
  E --> F[Gateway removal owner]
  F --> A
Loading

Technical review

Best possible solution:

Use the existing cleanup receipt for row presentation and the existing snapshot-safe retry operation, as this PR does.

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

The base renderer labels every nonremoved checkout Active regardless of its cleanup receipt, matching the inspected before screenshot; no target code was executed during this review.

Is this the best way to solve the issue?

The patch repairs presentation at its existing owner and reuses the established safe retry contract without changing cleanup policy, permissions, defaults, or persistence.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 793ccbd52f9e.

Provenance checked

  • Cleanup status and safe retry keeps the original intent (8e8203f: Expose terminal preservation and require explicit retry without bypassing snapshot safety.)
  • Compact checkout identity and confirmation keeps the original intent (1a05dca: Keep checkout rows distinguishable while retaining the full exact path in destructive confirmation.)
  • Worktrees request ownership keeps the original intent (02a1caa: Let Solid present readiness and mutations while the plain owner retains admission, serialization, and accepted results.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 8e8203f adds ui/src/pages/worktrees/worktrees-model.ts:197 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 8e8203f07607; files: ui/src/pages/worktrees/worktrees-model.ts)
  • RoboClaw: Raw commit 1a05dca adds ui/src/pages/worktrees/worktrees-page.tsx:309 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 1a05dca19d90; files: ui/src/pages/worktrees/worktrees-page.tsx)

PR surface

Source +87, Tests +18, Docs 0. Total +105 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 125 38 +87
Tests 2 20 2 +18
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 146 41 +105

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-11-29T01:55:41.145Z sha d5670cf :: passed. :: none
  • reviewed 2026-11-29T02:31:29.599Z sha 5bac610 :: passed. :: none

Reviewed November 28, 2026, 9:39 PM ET / November 29, 2026, 02:39 UTC (Revision 3).

@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit cb59aaa into main Nov 29, 2026
88 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/worktree-cleanup-status-truth-53a130 branch November 29, 2026 03:05
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…seline

* commit '32403124cae2ccbcfc556e844b218682b133956e': (547 commits)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…eline

* commit 'eee1e0553d29456424ac367008c3cf080f9866ec': (550 commits)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…ions suite

* commit '60e80f1c5fd439f7aa4ce33f54985c7efdc30884': (555 commits)
  refactor: remove the bundled GBrain adapter (#207924)
  improve(ui): show optional run limits beside the automation schedule (#201283)
  test(onboarding): inspect recorded output for credential leaks (#207872)
  perf(exec): reduce host memory sampler allocations (#207927)
  test(mcp-relay): isolate the Connected apps fallback locale (#207923)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* commit 'ba0a7a5fac3e2f1b642d05502273b98dc75adf4f': (556 commits)
  test(agents): fix provider header filtering coverage (#207732)
  refactor: remove the bundled GBrain adapter (#207924)
  improve(ui): show optional run limits beside the automation schedule (#201283)
  test(onboarding): inspect recorded output for credential leaks (#207872)
  perf(exec): reduce host memory sampler allocations (#207927)
  test(mcp-relay): isolate the Connected apps fallback locale (#207923)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Show the preservation reason or earliest retry time on the Worktrees page. Keep retries of preserved checkouts explicit and snapshot-safe.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 28958144-a8ea-41a9-82ab-745cc071fdbf
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
…207547)

## Problem

`ui/src/e2e/linked-session-navigation.e2e.test.ts:76` fails on main in `checks-ui-e2e (6/10)`: both cases time out after 30 s waiting for the worktree owner "Session" link to be visible.

Log signature (CI run 46147302963, shard 6): `locator.waitFor: Timeout 30000ms exceeded … waiting for locator('openclaw-worktrees-page').getByRole('link', { name: 'Session', exact: true }) to be visible`.

The failure looked order-dependent, but it is not. The file fails alone on main 440945f. #203716 (1a05dca) moved the owner link into the row's collapsed `<details class="worktree-row__details">` (`ui/src/pages/worktrees/worktrees-page.tsx:315-328`) and did not update this test. The CI failure screenshot shows the row collapsed with the link hidden. Main CI skips ui-e2e through changed-file selection, so the red shows only on PRs that select the shard.

## Solution

The test now opens the row's repository details, as a user does, before it waits for the link. The click and href identity checks do not change.

## Impact

- Test-only. No product change.
- Users: no change. With #203716 the owner Session link is one disclosure click away. This PR keeps that design. Putting the link back outside the disclosure is a separate product decision.

## Evidence

- Red on main: alone on 440945f, 2/2 cases time out at the same locator.
- Green on this branch: `linked-session-navigation.e2e` 2/2 and `worktrees.e2e` 9/9.
- `pnpm check:changed`: typecheck, lint and format pass. The dead-export scan fails on 5 existing main exports that this PR does not touch.
- Shard proof: the 109-file CI shard-6 set, run locally 3 times on this head. `linked-session-navigation.e2e` passed 2/2 in every run. Two runs passed 109/109. The third run, on a heavily loaded host, failed 3 unrelated files: two initial-roster load timeouts and an `openclaw-id-menu.e2e:178` geometry check, which is tracked separately.
- PR CI: `checks-ui-e2e (1/2)` ran `linked-session-navigation.e2e`, and it passed 2/2.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 27036be)

Companion audit: #207883 adds worktree cleanup statuses, not delete-dialog path identity. #207398 optimizes scans, #207547 checks owner navigation, and #203819/#201422/#207982/#207579 touch styles, strings, or other fixtures; no prerequisite established.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
* fix(worktrees): identify the checkout before deletion

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix: show the exact checkout before deleting a worktree

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4b537414-6701-8ad6-bf14-7f1def12956c

* fix: keep exact checkout identity in compact worktree rows

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix: satisfy lint in the touched test

* fix: satisfy lint in the Worktrees page

* fix(ui): reuse Settings layout constraints for worktree rows

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
(cherry picked from commit 1a05dca)

Companion audit: #207883 adds worktree cleanup statuses, not delete-dialog path identity. #207398 optimizes scans, #207547 checks owner navigation, and #203819/#201422/#207982/#207579 touch styles, strings, or other fixtures; no prerequisite established.

Release adaptation: Use stable list records for repository labels, keep stable create and removal behavior, and show the exact checkout in both existing confirmation dialogs.

Co-authored-by: RomneyDa <[email protected]>
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 docs Improvements or additions to documentation impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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