Skip to content

improve(ui): open long pickers as a bottom sheet on phones - #191399

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/phone-picker-sheet
Nov 3, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/phone-picker-sheet

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

What Problem This Solves

On a phone, long pickers opened as a small anchored popup over the page. Language showed 11 of its 24 choices in a popup that started halfway down the screen, with page text showing around it.

Why This Change Was Made

The picker's own surface becomes a bottom sheet at phone width, so options, search, keyboard navigation and windowing stay the same code. It has the same corners, backdrop, safe areas and motion as the existing phone sheets, plus a grabber to swipe down, a close button and a title.

  • Which pickers: any list longer than 8 choices, and every agent picker, so it doesn't change form as agents are added. This covers Language, the typeface pickers and long setup choices.
  • Which don't: the model pickers opt out because their phone form belongs to their own overhaul. Short lists stay anchored, and desktop is unchanged.
  • Search: it stays closed on open so the keyboard doesn't cover the list, and the sheet holds its height while filtering.

User Impact

Long lists on a phone use the screen and are easy to reach and dismiss. No choice or capability changes.

Evidence

Real clicks in the mock Control UI at 390.

Before After
Language
Agent

Absolutely dark, Agent:

CRT light, Language:

Desktop stays anchored at 1440:

Checks on the branch: oxfmt, stylelint, oxlint, tsgo:ui, picker and agent select browser tests (76), and eight agent, session and settings e2e files (35) pass. The agent list test's row limit moves from 30 to 60 because the taller sheet shows more of the 300 rows; it renders 35. ui:check-performance:base fails on budget only: total CSS gzip is 319961 B against 319616 B (+409 B from base), and chat boot JS gzip is 1280584 B against 1280000 B (+1025 B from base). The swipe code loads on first use to keep that low. Also checked by real clicks: close button, backdrop tap, Escape, swipe down and reopen, and search with a longer agent list.

Real Safari, opened by OS clicks in a phone-width window. Bottom anchoring, backdrop, backdrop tap, close and reopen work; swipe wasn't run there:

@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 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 clawsweeper:intake:feature 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR presents long pickers and agent selectors as bottom sheets on phones while retaining anchored desktop menus.

Example: Open Language in Appearance at 390px width.

  • Before: The 24 choices appear in a narrow anchored popup.
  • After: The choices appear in a wide bottom sheet with a title, grabber, close button, and dimmed background.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful, visually demonstrated work with actionable dismissal and validation defects.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The inspected before/after screenshots exercise Language and Agent through the rendered Control UI at 390px with mock data and show the new bottom-sheet presentation; interaction defects are tracked separately.
Patch quality 🦪 silver shellfish (2/6) 5 actionable review findings remain.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Long phone pickers use a small anchored popup that exposes fewer choices and competes visually with the page.
Reason: The inspected screenshots show a useful improvement, and maintainer authorship supplies the direction decision, including the explicit model-picker exclusion.

Merge readiness

⛔ Needs changes before merge - 5 items remain

Keep open: this maintainer-authored improvement has clear visual value, but dismissal defects and validation failures need repair.

Priority: P2
Reviewed head: 8db34af0b7d97906889b345e69ae9f887e373a42

Before merge

  • Intercept pointer input on the phone sheet's backdrop (P2) - The colored native popover backdrop does not intercept input: Chromium gives it pointer-events: none !important. At 390px with a mouse, opening the short Agent sheet and clicking a dimmed Settings navigation control both dismisses the picker and activates that control. The registry absorbs clicks only for touch. Give this sheet an actual backdrop hit target, following the existing PhoneSheet pattern, while preserving desktop popover mouse behavior.
  • Exclude Close from picker selection-key handling (P2) - When the new Close button receives keyboard focus, Enter or Space bubbles to PickerContent.handleKeydown. Its header-control exemption omits picker-select__sheet-close, so menu.keydown prevents native activation and selects the highlighted option instead. A user activating Close after highlighting another agent can therefore switch agents. Add the button to the existing control exemption and verify dismissal produces no selection callback.
  • Update the affected matchMedia fixture for subscriptions (P2) - Every PickerContent now creates this media-query subscription, including nested sheet pickers. sidebar-session-filter-popover.test.tsx stubs matchMedia with only { matches: true }, so createMediaQuerySource.subscribe reaches listen on an object without addEventListener. The current UI check reports this exact unhandled error. Supply an event-capable media-query fixture in the affected test rather than weakening the production browser contract.
  • Return gesture cleanup from the settled lifecycle (P2) - This new component-level onCleanup is counted by check-control-ui-controllers.mts, and the new file has no allowance in the shrink-only onCleanup baseline. The source-defined guard therefore rejects the addition. Return the gesture teardown from onSettled, as the existing PhoneSheet does, without expanding the baseline.
  • Keep the new sheet within the enforced asset budgets (P2) - The performance check attributes additional CSS growth to a base that already exceeds its cap, where only 64 bytes of build variance are allowed; chat boot JavaScript also exceeds its cap. The PR body independently records base-relative growth. Reduce or share the added sheet styling and boot-path code so the existing performance check passes; an inherited CSS overage does not exempt this additional growth.

Findings

  • [P2] Intercept pointer input on the phone sheet's backdrop — ui/src/styles/select-picker.css:482-484
  • [P2] Exclude Close from picker selection-key handling — ui/src/components/select-picker-phone-sheet.tsx:58-63
  • [P2] Update the affected matchMedia fixture for subscriptions — ui/src/components/select-picker-phone-sheet.tsx:12

Tests

  • Low-value test ui/src/components/select-picker.behavior.browser.test.ts: Replace the added class-only responsive test with geometry and dismissal assertions; it currently passes even if the sheet CSS is missing.
  • Missing end-to-end proof: The added test has no demonstrated red-on-base run and does not exercise backdrop isolation or keyboard activation of Close.
Agent review details

How this fits together

Control UI picker components receive choices and selection callbacks; the shared picker and overlay owners handle rendering, navigation, selection, and dismissal.

flowchart TD
  A[Settings and agent selectors] --> B[Shared picker]
  B --> C[Phone layout adapter]
  B --> D[Menu navigation and windowing]
  C --> E[Native overlay surface]
  D --> E
  E --> F[Selection callback]
Loading

Technical review

Best possible solution:

Keep one picker and overlay owner, provide an input-blocking sheet backdrop, preserve native Close activation, and repair the affected fixture, lifecycle guard, and asset budgets.

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

Prepared screenshots establish the before/after presentation, and source traces establish the review defects; no target code was executed.

Is this the best way to solve the issue?

Reusing the picker surface preserves selection and windowing ownership, but its sheet adaptation must also preserve backdrop isolation and native header-control activation.

Full review comments:

  • [P2] Intercept pointer input on the phone sheet's backdrop — ui/src/styles/select-picker.css:482-484
    The colored native popover backdrop does not intercept input: Chromium gives it pointer-events: none !important. At 390px with a mouse, opening the short Agent sheet and clicking a dimmed Settings navigation control both dismisses the picker and activates that control. The registry absorbs clicks only for touch. Give this sheet an actual backdrop hit target, following the existing PhoneSheet pattern, while preserving desktop popover mouse behavior.
    Confidence: 0.98
  • [P2] Exclude Close from picker selection-key handling — ui/src/components/select-picker-phone-sheet.tsx:58-63
    When the new Close button receives keyboard focus, Enter or Space bubbles to PickerContent.handleKeydown. Its header-control exemption omits picker-select__sheet-close, so menu.keydown prevents native activation and selects the highlighted option instead. A user activating Close after highlighting another agent can therefore switch agents. Add the button to the existing control exemption and verify dismissal produces no selection callback.
    Confidence: 0.96
  • [P2] Update the affected matchMedia fixture for subscriptions — ui/src/components/select-picker-phone-sheet.tsx:12
    Every PickerContent now creates this media-query subscription, including nested sheet pickers. sidebar-session-filter-popover.test.tsx stubs matchMedia with only { matches: true }, so createMediaQuerySource.subscribe reaches listen on an object without addEventListener. The current UI check reports this exact unhandled error. Supply an event-capable media-query fixture in the affected test rather than weakening the production browser contract.
    Confidence: 0.99
  • [P2] Return gesture cleanup from the settled lifecycle — ui/src/components/select-picker-phone-sheet.tsx:18
    This new component-level onCleanup is counted by check-control-ui-controllers.mts, and the new file has no allowance in the shrink-only onCleanup baseline. The source-defined guard therefore rejects the addition. Return the gesture teardown from onSettled, as the existing PhoneSheet does, without expanding the baseline.
    Confidence: 0.99
  • [P2] Keep the new sheet within the enforced asset budgets — ui/src/styles/select-picker.css:459-474
    The performance check attributes additional CSS growth to a base that already exceeds its cap, where only 64 bytes of build variance are allowed; chat boot JavaScript also exceeds its cap. The PR body independently records base-relative growth. Reduce or share the added sheet styling and boot-path code so the existing performance check passes; an inherited CSS overage does not exempt this additional growth.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/select-picker.behavior.browser.test.ts src/components/agent-select-opening.browser.test.ts src/components/sidebar-session-filter-popover.test.tsx
  • pnpm check:control-ui-controllers
  • pnpm tsgo:ui
  • pnpm lint:ui:styles
  • pnpm ui:check-performance:base

What I checked:

  • Introduced change and current main: Reviewed the pinned merge-base-to-head diff. Fetched main retains the preceding picker implementation; its comparison with the merge base shows no changes in the inspected picker subtree or picker stylesheet. (ui/src/components/select-picker-view.tsx:182, 8db34af0b7d9)
  • Visual evidence: Inspected all four prepared Language and Agent before/after screenshots linked in the PR body; they show the changed Control UI presentation with synthetic data. Supplemental attachment downloads failed with curl error 23, so additional theme, desktop, and Safari images were not independently inspected. (8db34af0b7d9)
  • Backdrop ownership: The existing PhoneSheet uses an actual full-screen backdrop button. The registry deliberately absorbs compatibility clicks only for touch dismissal; fix(ui): keep an outside tap from activating the page beneath #190505 explicitly preserves mouse activation and distinguishes sheets that own their backdrop. (ui/src/components/overlay-registry.ts:414, 8db34af0b7d9)
  • Native backdrop contract: Chromium's native popover backdrop has pointer-events: none !important. Coloring that backdrop does not make it intercept page input; this runtime contract directly governs the PR's native popover surface. (third_party/blink/renderer/core/html/resources/html.css:2034, 87bf8aae70d6)
  • Keyboard activation path: The picker exempts existing header controls from selection keys, but the added Close button is absent from that exemption. The menu runtime converts Enter and Space into selection and prevents native button activation. (ui/src/components/select-picker-view.tsx:362, 8db34af0b7d9)
  • CI failure attribution: The UI check reports target.addEventListener failures in sidebar-session-filter-popover.test.tsx, whose matchMedia stub returns only matches. The new unconditional picker media subscription reaches that incomplete fixture. A separate Session Observer assertion remains unclassified; full job logs redirect to a blocked storage host. (ui/src/components/sidebar-session-filter-popover.test.tsx:69, 8db34af0b7d9)

Likely related people:

  • Vyctor H. Brzezowski: Raw commit e571cd1 adds ui/src/components/solid/phone-sheet.tsx:22 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e571cd1495c1; files: ui/src/components/solid/phone-sheet.tsx)

PR surface

Source +228, Tests +25. Total +253 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 8 238 10 +228
Tests 2 27 2 +25
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 265 12 +253

Labels

Label changes:

  • add P2: Useful mobile ergonomics work with bounded dismissal and validation defects.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: Useful mobile ergonomics work with bounded dismissal and validation defects.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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 2, 2026, 2:21 PM ET / 19:21 UTC.

@vyctorbrzezowski
vyctorbrzezowski merged commit fcf922b into main Nov 3, 2026
15 of 16 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/phone-picker-sheet branch November 3, 2026 18:49
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…191399)

improve(ui): open long pickers as a bottom sheet on phones
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 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant