Skip to content

fix: new-session branch suggestions ignore search text - #199432

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
openclaw/new-session-branch-search
Nov 18, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
openclaw/new-session-branch-search

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: New Session keeps offering the first eight branches instead of matching the name typed into the worktree’s From field, leaving later known branches unselectable.

User Impact

Users can type part of a known branch name and select the matching branch without spelling its full reference. Search is case-insensitive. Custom branches, tags, commits, blank/default behavior, and the explicit Start session boundary are preserved. No new network request, repository access, persistence policy, or migration is introduced.

Why This Change Was Made

Filter the existing repository-scoped catalog before applying the eight-result menu limit. Keep the field and its suggestion container mounted when a custom value has no matches, so typing does not lose focus or the input node. An empty result closes the suggestion popup rather than displaying an empty panel.

The existing draft, discovery, keyboard-selection and submission owners remain unchanged. Author simplification/review found no additional owner or helper needed. Net change: +7 production lines, +47 test lines, +4 documentation lines.

Requested by @vyctorbrzezowski.

Work sessions

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

Evidence

  • Baseline: current main 5fbdf69. The real checkout control regression fails because the ninth branch never appears after typing its substring. The complete source app independently shows eight unrelated suggestions.
  • 92 focused tests passed across checkout interactions, submission flow and worktree-preference handling. The new regression covers a branch beyond the initial eight, case-insensitive matching, keyboard selection, custom-value DOM/focus retention, and returning to blank suggestions. Existing discovery-failure, identity/retired-row and submission tests remain intact.
  • Full source-app Chromium flow passed: open New Session → New worktree → type a partial branch → select by keyboard → close/reopen → narrow-screen selection/custom typing → Start session with the exact selected worktreeBaseRef. The before/after pair was delivered in chat. The screenshots use a synthetic repository catalog in the actual app, not a real created worktree.
  • UI typecheck, scoped lint/format, controller guards, diff checks and UI build passed. The build reports advisory bundle-budget overages without attribution; no limits were changed. Test diagnostics retain visibility-listener warnings in the unchanged submission fixtures and baseline strict-read warnings; they were not suppressed.
  • No independent agent review was delegated under the user’s no-delegation instruction. Draft for human review; no merge, deployment, full hosted CI, WebKit or physical-device claim.

Before — typing portal still shows the first eight unrelated branches

Before: typed branch substring does not change suggestions

After — a later known branch is selectable

After: matching branch beyond the first eight is selectable

Narrow-screen branch search

After: branch search at a 400 px viewport

@clawsweeper

clawsweeper Bot commented Nov 15, 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: S labels Nov 15, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. 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. clawsweeper:intake:needs-environment 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 filters New Session branch suggestions by the From field before limiting results to eight.

Example: Type PORTAL when release/customer-portal follows eight unrelated branches in the loaded catalog.

  • Before: The menu shows the first eight unrelated branches.
  • After: The menu shows release/customer-portal as a selectable match.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful repair with directly inspected visual proof and meaningful component coverage; broad hosted validation has not run.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots show the changed Checkout picker filtering a synthetic catalog in the actual source app on desktop and narrow Chromium layouts; the proof directly covers the visible search change, while actual worktree creation is outside these captures.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Typing a known branch substring leaves unrelated suggestions visible and prevents choosing later branches from the menu.
Reason: The maintainer-authored change restores useful search within an existing control while preserving custom values, defaults, and the explicit submission boundary.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a current branch-search defect with a focused change, and I found no actionable correctness or security defects; it remains a draft.

Priority: P2
Reviewed head: e36c8bd6d6b6c02dcc0ebef990fe7b16ee6c74ff

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Checkout picker consumes the draft’s repository-scoped branch catalog and typed base reference, renders suggestions, and passes the selected reference to the existing draft and submission owners.

flowchart LR
  A[Gateway branch catalog] --> B[Draft repository owner]
  B --> C[Checkout picker]
  D[From field text] --> C
  C --> E[Up to eight matching branches]
  E --> B
  B --> F[Explicit session submission]
Loading

Technical review

Best possible solution:

Keep filtering in the existing picker, preserve custom references and input identity, and complete the normal draft-to-ready validation.

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

Current-main source deterministically shows the first eight branches regardless of input, matching the supplied before screenshot; I did not execute a reproduction.

Is this the best way to solve the issue?

The patch repairs the suggestion computation at its existing owner and separates catalog availability from match availability, avoiding input remounts without adding state or another implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 76b7ed16d6e5.

Provenance checked

  • Branch suggestions and retained picker input changes intended behavior with a stated reason (bcafd72: The custom popup replaced a native datalist to preserve editing and provide keyboard selection; its unfiltered eight-result list was subsequently carried through the Solid and lazy-loading refactors.)
  • Existing discovery-retry and suggestion-identity tests keeps the original intent (8abe618: Repository-read presentation must retain editable nodes and focus through discovery transitions; updated expectations account for filtering while retaining those assertions.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 87a94c4 adds ui/src/pages/new-session/checkout-picker-content.tsx:47 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 87a94c4b4236; files: ui/src/pages/new-session/checkout-picker-content.tsx)
  • Dallin Romney: Raw commit bcafd72 adds ui/src/pages/new-session/checkout-chip.test.ts:277 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: bcafd72f610e; files: ui/src/pages/new-session/checkout-chip.test.ts)

PR surface

Source +7, Tests +47, Docs +4. Total +58 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 14 7 +7
Tests 1 51 4 +47
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 69 11 +58

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:

  • P2: Branch suggestions ignore typed text, but users can still enter a complete reference through the existing field.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster 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, 11:38 PM ET / November 15, 2026, 04:38 UTC.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 18, 2026 13:00
@vyctorbrzezowski
vyctorbrzezowski merged commit e97fb01 into main Nov 18, 2026
159 of 162 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the openclaw/new-session-branch-search branch November 18, 2026 13:18
@vyctorbrzezowski

Copy link
Copy Markdown
Member

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

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 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