Skip to content

improve: make session environments searchable - #144453

Merged
Patrick-Erichsen merged 4 commits into
mainfrom
improve/search-first-environment-picker
Sep 11, 2026
Merged

Patrick-Erichsen merged 4 commits into
mainfrom
improve/search-first-environment-picker

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Closes #144443

What Problem This Solves

New Session calls one fixed Local row “Environments,” separates connected devices into another group, and presents Auto as if it were another machine. The picker makes it hard to understand where a session will run and gets crowded as devices are added.

Why This Change Was Made

Replace those groups with one search-first list ordered Local → Devices → Cloud, and make Auto a separate switch. Preserve placement, capacity, permissions, and cloud configuration behavior; this does not add an environment manager or change scheduling.

User Impact

  • Opening the picker focuses Search environments immediately, with an 8px gap before the first option. No picker-specific ⌘K hint or binding.
  • House identifies Local; Cloud identifies cloud profiles. Connected Macs explicitly named MacBook, Mac mini, or Mac Studio get matching hardware outlines, with Monitor as the fallback. Names are presentation hints, not authoritative hardware detection.
  • The macOS app shell supplies those three SF Symbols through its existing scoped stylesheet. A 25-line AppKit helper resolves them on the Mac host; no new bridge API or Apple symbol assets in the web build. Other clients retain SVG outlines.
  • Devices retain slot pips and busy-count tooltips even when selected. A fixed-width checkmark column prevents labels and meters from shifting. No right-hand type badges.
  • Choose a device automatically has a framed shuffle icon and separate footer. It stays open when toggled and dims/disables manual choices. Turning it off returns to Local. Search and Connect remain usable.
  • Search and footer controls remain reachable on short laptop screens; Escape closes the picker and restores trigger focus.

Evidence

Real /new UI with a synthetic mocked Gateway, baseline 38e0e2e9d4c09b13c60ebecf7307db6c693d4b4d and candidate 9534fae80b6802d36f748296cd8e11b74f34f717 (renderer unchanged at final docs-only head 0a65b87b5f7fde486c3a62ce14d8dab9bd7b4bf6). Captures are labeled before/after. Browser assertions verify the 8px search gap, fixed 20px checkmark column, framed shuffle icon, and exactly unchanged row/label/meter/check positions and widths after selection.

Mac device selection before and after

Watch the updated 35-second Mac demo: Mac mini, Mac Studio, and MacBook Pro; selecting Studio retains its slots beside the checkmark, then the native-symbol CSS preview and Auto mode are demonstrated. Devices are synthetic; the native segment uses real AppKit output in a labeled CSS harness.

Typical inventory, Auto mode, and selection

Typical inventory before and after

Auto mode before and after

Selected device retains slots and checkmark

Mac device outlines before and after

Browser outlines versus native SF Symbols

These are explicitly labeled native-symbol CSS harness captures using real AppKit-generated masks—not screenshots of a launched production app.

Browser outlines and native-symbol CSS harness

Selected native Mac and trigger.

Full comparison matrices: desktop 1440×900, mobile 390×844, laptop 1366×768. Inspected 45 browser candidate states plus six native-symbol CSS harness states (102 full-viewport/crop captures). Coverage includes loading, empty, failure, dense/scrolling, offline/unavailable/full-capacity devices, cloud controls, search, Auto, and selection. Search has no baseline equivalent and is labeled accordingly.

Validation

  • 52 focused picker/menu unit tests pass on the final rendering changes; the initial implementation also passed 177 focused UI tests across nine files.
  • All 33 affected mock-Gateway browser scenarios pass. Existing tests now cover stacked descriptions, flat destination order, explicit Auto-off recovery, eligibility/remediation, no-dispatch safeguards, search autofocus/Escape, and selection geometry. Project-recents subtitle coverage is preserved.
  • The isolated real-Gateway command-state browser test passes for undeclared, pending, unauthorized, and reallowed commands; hot-reload and cleanup assertions remain intact.
  • UI production build and bundle budgets pass.
  • Full macOS OpenClaw product build, targeted Swift format/lint, native localization verification, and isolated AppKit symbol rendering passed for the unchanged native implementation.
  • Fresh independent review of the implementation and final refinement/test migration found no actionable findings. The subsequent ClawSweeper review confirmed the test migration and visual proof; its one stale documentation sentence is corrected at the final head.
  • Exact-head hosted CI passed: 131 successful checks, including openclaw/ci-gate. The unchanged macOS suite had one WebKit callback/deadline timing failure, then passed on one failed-job rerun; no test or product code was changed for the retry. CI result.
  • Final-head ClawSweeper review: no remaining actionable findings.
  • Final docs-only correction: pnpm format:docs:check (1,281 files), pnpm docs:check-links (13,407 links; zero broken), and git diff --check pass.
  • node scripts/check-changed.mjs passes for the final changed files: core/UI/extension typechecks, formatting, i18n, dependency/boundary guards, source lint, styles, and full bundled-extension lint.
  • No production Gateway or native-app state was modified or restarted. The real-Gateway proof used an isolated profile with no inherited work-Gateway credentials.

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Sep 10, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 10, 2026, 7:41 PM ET / 23:41 UTC (Revision 4).

ClawSweeper review

What this changes

Makes New Session destinations searchable, separates automatic device selection into a switch, and adds matching Mac icons while retaining capacity indicators and placement eligibility.

Merge readiness

✅ Ready for maintainer review

The prior documentation and browser-test findings are resolved, with no remaining actionable findings identified. The improvement remains absent from current main and the latest release, so this protected PR remains useful.

Priority: P2
Reviewed head: 0a65b87b5f7fde486c3a62ce14d8dab9bd7b4bf6

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported improvement with both prior findings resolved and no remaining actionable defect identified.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after captures of the production /new renderer with synthetic Gateway inventory show the redesigned picker, retained selected capacity, and Auto presentation. The final documentation-only commit preserves that renderer; native harness/build claims are supplemental and are not presented as a launched-app observation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Inspected before/after captures of the production /new renderer with synthetic Gateway inventory show the redesigned picker, retained selected capacity, and Auto presentation. The final documentation-only commit preserves that renderer; native harness/build claims are supplemental and are not presented as a launched-app observation.
Evidence reviewed 10 items Final correction resolves the previous finding: GitHub’s exact commit response confirms that the final commit changes only the selected-device documentation sentence. It now describes retained slot indicators and tooltips beside the checkmark. The local raw tree comparison independently confirms that only this documentation file changed since the previous reviewed head.
Renderer preserves selected capacity: The shared menu renderer emits the capacity meter independently of the selected checkmark. The browser regression checks that the selected row retains its busy-slot label and that row, label, meter, and checkmark geometry remain unchanged.
Earlier browser-test migration is present: Affected browser assertions now target stacked descriptions, flat destination ordering, explicit Auto-off recovery, and search focus. The real-Gateway command-state test retains its undeclared, pending, unauthorized, and reallowed scenarios while adapting the description selector. These tests were inspected, not executed during this read-only review.
Findings None None.
Security None None.

How this fits together

The New Session destination picker displays the Gateway’s device and cloud inventory. User selections feed the existing session-placement owner, which retains responsibility for eligibility and saved destination preferences.

flowchart TD
  A[Gateway environment inventory] --> B[Existing eligibility projection]
  B --> C[Searchable destination picker]
  D[Search text] --> C
  C --> E[Manual selection or Auto switch]
  E --> F[Existing session placement owner]
  F --> G[Session destination]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +331, Tests +516, Docs +2, Other +26. Total +875 across 25 files.

View PR surface stats
Area Files Added Removed Net
Source 12 474 143 +331
Tests 10 606 90 +516
Docs 1 3 1 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 2 26 0 +26
Total 25 1109 234 +875

Review metrics

Metric Value Why it matters
Production versus test growth Production +357 net lines; tests +516 net lines Growth supports the searchable presentation and its preservation checks while reusing the existing placement owner.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #144443
Summary: This PR implements the linked open destination-picker request; the issue should remain open until implementation lands.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Keep destination search and Auto presentation in the existing picker, with eligibility, scheduling, and saved preferences owned by the existing placement flow.

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

Not applicable as a bug reproduction: this adds an accepted picker interaction. Current-main source confirms the old grouped interface, and inspected captures demonstrate the proposed visual change.

Is this the best way to solve the issue?

Yes. Extending the existing picker and selection callbacks preserves one placement owner; the final documentation correction now accurately describes the implemented selection behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5c99bfa6eaad.

Labels

Label justifications:

  • P2: This is a bounded improvement to destination selection without evidence of an urgent broken session workflow.
  • 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. Sufficient (screenshot): Inspected before/after captures of the production /new renderer with synthetic Gateway inventory show the redesigned picker, retained selected capacity, and Auto presentation. The final documentation-only commit preserves that renderer; native harness/build claims are supplemental and are not presented as a launched-app observation.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected before/after captures of the production /new renderer with synthetic Gateway inventory show the redesigned picker, retained selected capacity, and Auto presentation. The final documentation-only commit preserves that renderer; native harness/build claims are supplemental and are not presented as a launched-app observation.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Inspected before/after captures of the production /new renderer with synthetic Gateway inventory show the redesigned picker, retained selected capacity, and Auto presentation. The final documentation-only commit preserves that renderer; native harness/build claims are supplemental and are not presented as a launched-app observation.

Evidence

What I checked:

  • Final correction resolves the previous finding: GitHub’s exact commit response confirms that the final commit changes only the selected-device documentation sentence. It now describes retained slot indicators and tooltips beside the checkmark. The local raw tree comparison independently confirms that only this documentation file changed since the previous reviewed head. Public docs: docs/web/control-ui/sessions-and-sidebar.md. (docs/web/control-ui/sessions-and-sidebar.md:154, 0a65b87b5f7f)
  • Renderer preserves selected capacity: The shared menu renderer emits the capacity meter independently of the selected checkmark. The browser regression checks that the selected row retains its busy-slot label and that row, label, meter, and checkmark geometry remain unchanged. (ui/src/pages/new-session/cloud-target.ts:91, 0a65b87b5f7f)
  • Earlier browser-test migration is present: Affected browser assertions now target stacked descriptions, flat destination ordering, explicit Auto-off recovery, and search focus. The real-Gateway command-state test retains its undeclared, pending, unauthorized, and reallowed scenarios while adapting the description selector. These tests were inspected, not executed during this read-only review. (ui/src/e2e/new-session-page.environment-metadata.e2e.test.ts:285, 0a65b87b5f7f)
  • Current main still needs the improvement: The complete picker retrieved at the pinned main revision still renders separate destination headings and Auto as a device row, without environment search or the footer switch. (ui/src/pages/new-session/where-chip.ts, 5c99bfa6eaad)
  • Latest-release check: The supplied latest release, v2026.9.3, also retains separate Environments and Your devices headings and the Auto device row. (ui/src/pages/new-session/where-chip.ts:178, 1391f7cd2d40)
  • Inspected visual proof: Inspected the three prepared before/after images linked in the captured PR body, including https://github.com/user-attachments/assets/1c0fe4df-e830-43a4-bf2b-f8b560723320. They show the actual picker with synthetic inventory, retained selected-device pips, distinct Mac outlines, and dimmed manual destinations in Auto mode. The final commit leaves the renderer unchanged. Video preparation failed because ffprobe was unavailable; the video was not used to establish sufficiency. Native-symbol harness and native build results remain contributor-reported rather than independently observed production-app execution. (9534fae80b68)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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-09-10T22:49:19.819Z sha c4cd854 :: needs changes before merge. :: [P2] Migrate the existing browser tests to the new picker contract
  • reviewed 2026-09-10T22:57:14.035Z sha c4cd854 :: blocked before merge. :: [P2] Migrate the existing browser tests to the new picker contract
  • reviewed 2026-09-10T23:32:20.048Z sha 9534fae :: needs changes before merge. :: [P3] Describe the retained capacity indicator on selected devices

@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 10, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Browser-test migration and final picker refinements are complete at 9534fae. The PR description includes refreshed, verified proof and passing local browser/real-Gateway checks.

@clawsweeper

clawsweeper Bot commented Sep 10, 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 exact_review_queue).
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. labels Sep 10, 2026
@Patrick-Erichsen

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Corrected the remaining selected-device documentation sentence at 0a65b87. It now describes the retained worker-slot indicator and busy-count tooltip beside the checkmark. Docs formatting and link checks pass. This commit changes only that sentence; the reviewed renderer and published proof are unchanged.

@clawsweeper

clawsweeper Bot commented Sep 10, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Patrick-Erichsen
Patrick-Erichsen merged commit 6c918f6 into main Sep 11, 2026
272 of 274 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the improve/search-first-environment-picker branch September 11, 2026 00:24
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 11, 2026
* improve: make session environments searchable

* improve: stabilize environment selection and refresh browser coverage

* test: avoid returning from picker lifecycle promise executor

* docs: describe retained selected-device capacity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui docs Improvements or additions to documentation extensions: qa-lab maintainer Maintainer-authored PR 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: 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.

Make New Session environment selection searchable and distinguish Auto mode

1 participant