Skip to content

fix(worktrees): choose known repositories and base branches - #199323

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
openclaw/worktree-reference-choices
Nov 18, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
openclaw/worktree-reference-choices

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Creating a worktree requires retyping repository paths and branch names that the page already knows.

User Impact

Choose known repositories and discovered branches by name, search the lists, or enter a custom repository path, branch, tag, or commit. Automatic base retains the existing Gateway decision: remote default when configured, otherwise local HEAD. Only Create creates a worktree.

Why This Change Was Made

Both reference fields use the existing picker and creation model. Repository choices come from the current managed-worktree records, not a new filesystem scan or a complete project catalog. Branches still come from the selected repository’s existing discovery owner. Changing the source clears its old base selection and cancels the old branch read before it can repopulate the new source’s choices. Unknown refs, custom drafts, failed creation, offline editing, and admin boundaries remain supported.

Requested by @vyctorbrzezowski.

Work sessions

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

Evidence

  • Baseline current main eb1a21d: the new real-page regression fails because the known-repository choice control is absent. The before screenshot captures that same creation form.
  • 32 focused tests pass across the worktree page and checkout-snapshot owner (1.21 s Vitest wall time). Proof selects a known repository and branch through actual controls, verifies the exact worktrees.create payload, consumes the returned inventory, reopens the form, and restores automatic base selection. Separate coverage keeps custom refs through discovery/creation failure, retires old-source results, retains the actual custom input through edits, and preserves the existing pending/read-only/offline/reconnect tests.
  • Full source-app Chromium flow passes (5.87 s) with synthetic Gateway data: selection, Create, exact request, accepted inventory, reopen, keyboard selection, Escape/focus return, and custom tag entry at 400 px. These are client-boundary fixtures; no real repository was mutated. Images are light theme, 1100×1000 desktop and 400×800 emulated phone, not native-device or WebKit proof.
  • UI build/typecheck, scoped lint/format, i18n and controller guards pass. Build advisory budgets report unattributed overages; no performance or budget-improvement claim. Hosted CI duration is not yet available.
  • Author review/simplification removes both raw-only reference paths and the branch datalist while keeping one shared field and the existing discovery/mutation owners. Net +90 production, +127 test, and +2 documentation lines. No independent reviewer or subagent was used under the task’s no-delegation boundary. No merge, auto-merge, or deployment is requested.

Before

Before: known repository and branch references require typing

After

After: named searchable repositories in the worktree form

Phone search and custom refs

Phone repository selection

Custom branch tag and commit entry remains editable

@clawsweeper

clawsweeper Bot commented Nov 14, 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: web-ui App: web-ui size: M labels Nov 14, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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:feature Preliminary submission classification; full source review pending. labels Nov 15, 2026
@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR adds searchable repository and base-reference choices while preserving custom entry.

Example: Create a worktree for /srv/projects/support using release.

  • Before: Type the repository path and enter or select the branch through the browser datalist.
  • After: Choose support and release from searchable pickers, then click Create.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, useful UI work with inspected visual proof and relevant regression coverage; supplied browser evidence covers the client boundary rather than real Git mutation.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected source-app browser screenshots show the changed repository picker, phone search, and editable custom ref; the public body records Chromium control interactions and request verification using synthetic Gateway data, matching the scoped Control UI proof policy.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users must retype repository paths and use a less discoverable branch input despite the page already having useful choices.
Reason: The maintainer-authored direction offers clear convenience through existing controls and owners without new configuration, persistence, or backend policy.

Merge readiness

✅ Ready for maintainer review

Keep this useful, maintainer-authored draft open; the change preserves existing creation semantics, and no actionable introduced defect was found.

Priority: P3
Reviewed head: 2cfefd21292d17a3512b327bd0b8df07bd2bc7c1

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI derives repository choices from managed-worktree records, obtains branches through the existing discovery model, and sends explicit creation requests to the Gateway.

flowchart LR
  A[Managed worktree records] --> B[Repository picker]
  B --> C[Worktrees model]
  C --> D[Gateway branch discovery]
  D --> E[Base reference picker]
  E --> C
  C --> F[Explicit Create request]
Loading

Technical review

Best possible solution:

Keep the shared reference field and existing discovery and mutation owners, with custom refs and automatic base selection preserved.

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

Current-main source and the baseline screenshot establish the raw repository input and branch datalist; this read-only review ran no target code.

Is this the best way to solve the issue?

The shared component is used twice and owns only custom-entry presentation, while the model retains synchronous draft updates and request cancellation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 92016ce978f0.

Provenance checked

  • Worktrees form and presentation ownership keeps the original intent (7dd5b52: The Solid migration preserved controls, Gateway behavior, and in-progress creation drafts.)
  • Automatic versus explicit base selection keeps the original intent (2d481c5: Discovery must supply suggestions without silently selecting a stale local default branch.)
  • Branch discovery lifetime keeps the original intent (6babda5: Existing request and snapshot owners provide responsive choices, background refresh, and cancellation without duplicate request generations.)
  • Automatic-base documentation keeps the original intent (c9451b4: Local-only repositories use HEAD while repositories with origin preserve remote-default behavior.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +90, Tests +127, Docs +2. Total +219 across 6 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 117 27 +90
Tests 1 135 8 +127
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 255 36 +219

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:

  • P3: This improves an existing advanced workflow by reducing typing without changing creation capability or defaults.
  • 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.

Reviewed November 14, 2026, 7:11 PM ET / November 15, 2026, 00:11 UTC.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 18, 2026 12:56
@vyctorbrzezowski
vyctorbrzezowski merged commit f7c6804 into main Nov 18, 2026
84 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/worktree-reference-choices branch November 18, 2026 13:19
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…#199323)

* fix(worktrees): choose known repositories and base branches

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

* test(ui): exercise automatic and explicit base through the worktree picker

---------

Co-authored-by: vyctorbrzezowski <[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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants