Skip to content

test(ui): open worktree row details before following the owner link - #207547

Merged
obviyus merged 1 commit into
mainfrom
fix/worktrees-owner-link-visible
Nov 28, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/worktrees-owner-link-visible

Conversation

@obviyus

@obviyus obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

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

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: checks-ui-e2e (6/10) on this PR.

- #203716 moved the worktree owner Session link into the row's collapsed
  repository details. linked-session-navigation waited for the link to be
  visible and timed out on every run, alone or in shard order.
- Open the row's details first, as a user does, then keep the click and
  href identity checks unchanged.
@clawsweeper

clawsweeper Bot commented Nov 28, 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.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR opens the worktree row’s repository disclosure before following its owner Session link.

Example: The browser test follows the owner of synthetic-owner-worktree.

  • Before: Both navigation variants wait for the hidden Session link and time out.
  • After: The test opens the repository disclosure, then checks the same full session URL, selected transcript, and reload behavior.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct test repair supported by source inspection and passing browser-harness CI, with the broader UI gate unresolved.
Proof confidence 🦐 gold shrimp (3/6) No product behavior changes, so shipped-entry-point proof is unnecessary; the exact-head browser check passes with a mocked Gateway, while the linked screenshots document the earlier row design.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: The browser regression test times out before it can verify that worktree owner links select the correct session.
Reason: This maintainer-authored test correction restores useful regression coverage while respecting the intentional compact-row design.

Regression provenance

Regression provenance — verified: source commit 1a05dca19d90 by RoboClaw; canonical PR #203716 (blame-to-merge-commit).

Merge readiness

✅ Ready for maintainer review

Keep open: this PR makes a minimal, correct repair to a browser test that no longer follows the intended worktree-row interaction; no introduced defect was found.

Reviewed head: 5248129d91f1d209bf131c34e2a8cdb5ec0851ac

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI browser test supplies synthetic Gateway records to the real worktrees page and verifies that owner links preserve session identity through navigation and reload.

flowchart LR
  A[Synthetic Gateway records] --> B[Worktrees page]
  B --> C[Repository disclosure]
  C --> D[Owner Session link]
  D --> E[Chat navigation]
  E --> F[Transcript and reload assertions]
Loading

Technical review

Best possible solution:

Retain this focused test repair and its existing navigation assertions.

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

Current-main source deterministically places the Session link inside a collapsed disclosure while the test waits for visibility; the PR reports both variants failing on the base, but no target code was executed during this review.

Is this the best way to solve the issue?

Opening the existing disclosure is the smallest complete repair because it follows the intended UI interaction and preserves the full session-identity contract.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4f8d4f5a36d7.

Provenance checked

  • Linked-session navigation coverage keeps the original intent (177e50f: Preserve complete session identity through generated links, including colliding prefixes and reloads; the later Tasks retirement retained the worktree variants.)
  • Collapsed repository metadata keeps the original intent (1a05dca: Keep worktree rows compact and distinguishable while exposing full repository, branch, owner, and age through a disclosure.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 177e50f adds ui/src/e2e/linked-session-navigation.e2e.test.ts:114 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 177e50f2c1dc; files: ui/src/e2e/linked-session-navigation.e2e.test.ts)
  • RoboClaw: Raw commit 1a05dca adds ui/src/pages/worktrees/worktrees-page.tsx:315 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1a05dca19d90; files: ui/src/pages/worktrees/worktrees-page.tsx)

PR surface

Tests +1. Total +1 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 3 +1
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 3 +1

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:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

Reviewed November 28, 2026, 9:16 AM ET / 14:16 UTC.

@obviyus
obviyus merged commit 27036be into main Nov 28, 2026
135 of 137 checks passed
@obviyus
obviyus deleted the fix/worktrees-owner-link-visible branch November 28, 2026 14:38
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…penclaw#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 642acd5. openclaw#203716 (7561603) 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 openclaw#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 642acd5, 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]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…ettles (#207510)

## Problem

A one-shot command (`openclaw agent --local`, `agent exec`, `templates add`) closes its databases as soon as its own turn returns. Work the command admitted that runs detached from the turn (subagent completion, announcements back to the parent, cleanup flows) is cut off: its next database write fails with `Database maintenance resource admission is closed`, and the result is lost without a visible error.

## Solution

One owner waits: the one-shot database owners wait for admitted root work to go idle before they close the databases.

- `waitForGatewayRootWorkIdle` (process/gateway-work-admission.ts): resolves when no root work outside the caller is active. It is event-driven (root-work release listeners, no timer). Long-lived subscriptions never count, by the existing `isActiveRootWork` rule, so a process that hosts no Gateway cannot wait on listeners or loops.
- `waitForLocalBackgroundWork` (cli/local-state-owner.ts) is the single call both one-shot owners use: `runWithLocalStateOwner` before it closes its resources, and `agent exec` before it cleans up its temporary state.
- While it waits, the CLI prints `Waiting for N background tasks to finish. Press Ctrl-C to stop.` Ctrl-C stops the wait: through the CLI signal gate, or through the command's own signal bridge for `agent --local` and `agent exec`.

## User impact

- One-shot commands that started detached work keep their databases open until it finishes, with one visible waiting line.
- Commands that start no detached work exit as before, with no wait.
- Gateway users: unchanged. The wait runs only in the one-shot owners.
- This is part A of a split. Part B (subagent spawn in one-shot `agent --local`) builds on it.

## Accepted edge cases

- **Ctrl-C** stops the wait, not the work. The databases then close under any work still running, which is what main does today for all detached work.
- **Failure retries on timers** hold no root work during the delay, so a one-shot process can exit before a retry runs. The work stays persisted as pending; the next Gateway start recovers it.

## Evidence

- New test `local-state-owner.test.ts` "keeps the command's databases open until detached work it admitted settles": red on main (the owner settles while the detached work is still held), green here.
- `gateway-work-admission.idle.test.ts`: no work or only a subscription returns at once; detached work is waited for and reported once; an interrupt stops the wait.
- Consumer tests of every changed module pass.

Co-authored-by: Ayaan Zaidi <[email protected]>

(cherry picked from commit 440945f)

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): a3bd213 test(gateway): start the auth-removal Gateway under process custody like production (#207615).
Later PR-number mentions: `6ec3cbf5614c` fix(agents): run sessions_spawn children in one-shot agent --local (#207557), `a3bd2136eec2` test(gateway): start the auth-removal Gateway under process custody like production (#207615) Later commit-SHA mentions: `27036be84d68` test(ui): open worktree row details before following the owner link (#207547), `a3bd2136eec2` test(gateway): start the auth-removal Gateway under process custody like production (#207615)

Co-authored-by: RomneyDa <[email protected]>
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]>
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]>
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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