Skip to content

improve(ui): open long filters as a shared phone sheet - #190499

Merged
vyctorbrzezowski merged 7 commits into
mainfrom
brzezowski/standardize-popover-sheet
Nov 2, 2026
Merged

vyctorbrzezowski merged 7 commits into
mainfrom
brzezowski/standardize-popover-sheet

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

On a phone, long filters open as narrow anchored popovers. Automations holds five selects plus Reset in a 280px popover that takes 57% of the screen and cuts off the list. Inside the Sessions filter, a native select, two compact inputs and two tinted toggles each use a different size. The mobile page PRs each decided this alone: two built separate sheets and one has a tall full-width popover.

User Impact

On phones, the Automations and Sessions filters open as a bottom sheet. It dismisses the same way everywhere: tap the dim, tap close, swipe the grabber or press Escape. Tapping the dim never reaches the page beneath. Every filter stays reachable, no copy is added, and desktop and tablet widths keep the popover.

Why This Change Was Made

The rule: a phone filter is a sheet when it is a form, meaning three or more labelled text, date or select fields. Option rows, checkboxes, toggles and one or two fields stay a popover. Height alone doesn't decide it: Dashboards reaches 50% with option rows, but each row applies with one tap and the popover scrolls its own author list.

PhoneSheet in components/solid/phone-sheet.tsx is the one shared sheet. It sits beside Popover and takes the same trigger, ref and child props, so a surface swaps with one tag. It follows the structure from #190387, because a backdrop in the same top layer as the panel can't be beaten by page stacking. Children stay mounted while closed, because the Meetings form submits its closed fields.

Every sheet has one header: a centered title with close on the right. Sessions' search sits directly left of close, in the same row, and doesn't move the title. While searching, the field takes the row and its own clear replaces close. The dim, grabber and Escape still dismiss.

The sheet also sets one rhythm for its content: a 16px side inset, 12px between rows, a 13px label above a 40px field, a 16px value and a full-width action. The value size is iOS's input floor. Automations keeps Schedule and Last run side by side, and longer values such as "Recently updated" get the full width. Sessions pairs Updated within with Limit and Global with Unknown, and Group by is a normal labelled select. An unchecked toggle draws no check, and its slot stays so the label doesn't move, the same as #190367.

Left alone: the sidebar's filter sheets and the Inbox sheet. They already work on phones, they share sheet-dismiss, and their desktop surfaces and nested pages are tied to them, so moving them changes nothing a person sees. The sidebar's sheets are settings lists of rows and switches rather than labelled forms, so the form rhythm doesn't apply to them.

Conversions for open PRs

Each one was tried locally on top of that PR's diff, including its sheet content refinement, at 390px. Meetings, Usage and Sessions all worked.

#190367 and #190387 overlap this PR on purpose, and resolve as described above.

Evidence

Mock data at 390x844 and 320x568, opened with a real tap, with default and long values. Page PRs are not applied, so these show today's top bar.

Automations before, light After, light
Automations filter as a narrow popover, light Automations filter as a sheet, light
After, dark, long values After, CRT (square theme)
Automations filter as a sheet, dark Automations filter as a square sheet, CRT
Sessions before, light After, light After, 320x568, dark, long values
Sessions filter as a popover, light Sessions filter as a sheet, light Sessions filter as a sheet, dark
Real Safari at 390px, opened with an OS click
Automations filter sheet in Safari
  • Safari: an OS click opened the final Automations sheet. On the previous revision a real click on the dim over "Learn more" closed the sheet and stayed on the page. Swipe wasn't driven in Safari.
  • Chromium at 390px with touch input: dim, close, grabber swipe and Escape all closed both sheets and returned focus to the trigger. A short swipe springs back, and reopening after each exit starts in the right place. A filter applied in the sheet updates the trigger, and Reset clears it.
  • At 1440px both surfaces are still the anchored popover.
  • oxfmt, stylelint, oxlint and tsgo:ui pass. The phone-sheet and view-jobs-filter browser tests pass along with the Sessions and Automations unit tests and the cron and session-list e2e tests.
  • ui:check-performance:base fails only on the total CSS budget, which main already exceeds (no JS budget failure).

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

clawsweeper Bot commented Nov 1, 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 the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 1, 2026
@clawsweeper clawsweeper Bot added 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 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR opens Automations and Sessions filters in a shared bottom sheet on phones while retaining popovers at wider widths.

Example: Open Automations filters at 390×844.

  • Before: Five selects and Reset occupy a narrow anchored popover over the job list.
  • After: The filters occupy a full-width bottom sheet with a backdrop, close button, and swipe dismissal.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Strong visual evidence supports the approved improvement, but the keyboard regression and concrete guard and performance failures prevent a passing patch verdict.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots show both production filter surfaces opening as phone sheets in the Control UI with synthetic data, including theme variations and Safari; the body separately records touch dismissal, focus return, filter changes, Reset, and wider-screen checks.
Patch quality 🦪 silver shellfish (2/6) 3 actionable review findings remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Long phone filter forms occupy narrow floating cards and obscure the underlying list.
Reason: The maintainer-authored direction supplies the owner decision, and inspected screenshots demonstrate a useful improvement without changing filter semantics or adding configuration.

Merge readiness

⛔ Needs changes before merge - 4 items remain

Keep this useful, maintainer-authored PR open; the visual improvement is supported, but keyboard behavior and two concrete validation blockers need repair.

Priority: P2
Reviewed head: 200dce8d4874de6517d96fea81fe39d54f0b73ff

Before merge

  • [P2] Exclude the current sheet from search Escape rejection (P2) - At phone width, open Sessions filters, activate search, enter calendar, and press Escape. PhoneSheet marks its Popover aria-modal=true, so hasModalSurface(document) now includes this same sheet and makes ownsEscape return false. HeaderSearchField therefore leaves Escape unhandled, and the overlay registry closes the sheet while retaining the query. Preserve the existing first-Escape-clears-search contract by excluding the current sheet while continuing to defer to other active modal owners, and cover this phone path.
  • [P2] Reuse the existing tabbable traversal (P2) - The new panel.querySelectorAll call is explicitly forbidden by the UI ownership policy and scripts/check-control-ui-controllers.mts: PhoneSheet is outside DOM_ISLANDS and has no query allowance. This deterministically introduces a failing guard regardless of the unrelated hosted failures. Use the existing tabbableElements traversal from components/focus-navigation.ts over panel.children instead of adding a second selector and eligibility implementation; do not raise the baseline or allowlist.
  • [P2] Bring the added CSS within the enforced growth budget (P2) - The exact-head performance check reports total CSS at 1566.7 KiB raw and 303.3 KiB gzip, above both the cap and the measured base. Its annotations explicitly allow only 64 bytes of growth when the base already exceeds the cap. Consequently, this failure is not cleared by the base being over budget: the added sheet styling increases the measured output. Reduce or consolidate the emitted sheet styles and rerun the paired performance check without weakening its budget.
  • Explain or restore the original intent of Sessions search Escape handling - improve(ui): move card search into the header #189573: The first Escape clears and closes search; a second Escape closes the card.

Findings

  • [P2] [P2] Exclude the current sheet from search Escape rejection — ui/src/pages/sessions/sessions-filters.tsx:114-118
  • [P2] [P2] Reuse the existing tabbable traversal — ui/src/components/solid/phone-sheet.tsx:83-86
  • [P2] [P2] Bring the added CSS within the enforced growth budget — ui/src/components/solid/phone-sheet.css:1-4

Provenance

Tests

  • Missing end-to-end proof: No phone-width regression demonstrates that Escape clears an active Sessions filter search while leaving its sheet open.
Agent review details

How this fits together

Control UI filter renderers choose a responsive presentation shell; existing filter callbacks still update their page owners, while Popover and sheet-dismiss provide overlay lifecycle and gestures.

flowchart TD
  A[Filter trigger] --> B[Phone layout query]
  B --> C[PhoneSheet]
  B --> D[Desktop Popover]
  C --> E[Shared overlay lifecycle]
  C --> F[Sheet dismissal gestures]
  C --> G[Existing filter controls]
  D --> G
  G --> H[Page filter owners]
Loading

Technical review

Best possible solution:

Keep the shared shell over the existing overlay and gesture owners, restore search-first Escape handling, reuse the tabbable traversal, and reduce emitted CSS to satisfy the paired budget.

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

Current main still renders anchored filter popovers, matching the supplied before captures; the introduced search-Escape failure follows directly from the modal and keyboard owners without executing target code.

Is this the best way to solve the issue?

A shared shell is justified because the existing sidebar sheet has sidebar-specific focus inputs and a separate backdrop; retaining Popover and sheet-dismiss avoids replacing their lifecycle and gesture responsibilities.

Full review comments:

  • [P2] [P2] Exclude the current sheet from search Escape rejection — ui/src/pages/sessions/sessions-filters.tsx:114-118
    At phone width, open Sessions filters, activate search, enter calendar, and press Escape. PhoneSheet marks its Popover aria-modal=true, so hasModalSurface(document) now includes this same sheet and makes ownsEscape return false. HeaderSearchField therefore leaves Escape unhandled, and the overlay registry closes the sheet while retaining the query. Preserve the existing first-Escape-clears-search contract by excluding the current sheet while continuing to defer to other active modal owners, and cover this phone path.
    Confidence: 0.99
  • [P2] [P2] Reuse the existing tabbable traversal — ui/src/components/solid/phone-sheet.tsx:83-86
    The new panel.querySelectorAll call is explicitly forbidden by the UI ownership policy and scripts/check-control-ui-controllers.mts: PhoneSheet is outside DOM_ISLANDS and has no query allowance. This deterministically introduces a failing guard regardless of the unrelated hosted failures. Use the existing tabbableElements traversal from components/focus-navigation.ts over panel.children instead of adding a second selector and eligibility implementation; do not raise the baseline or allowlist.
    Confidence: 1
  • [P2] [P2] Bring the added CSS within the enforced growth budget — ui/src/components/solid/phone-sheet.css:1-4
    The exact-head performance check reports total CSS at 1566.7 KiB raw and 303.3 KiB gzip, above both the cap and the measured base. Its annotations explicitly allow only 64 bytes of growth when the base already exceeds the cap. Consequently, this failure is not cleared by the base being over budget: the added sheet styling increases the measured output. Reduce or consolidate the emitted sheet styles and rerun the paired performance check without weakening its budget.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm check:control-ui-controllers
  • pnpm tsgo:ui
  • pnpm --dir ui test src/components/solid/phone-sheet.browser.test.tsx src/pages/cron/view-jobs-filter.browser.test.tsx src/pages/sessions/sessions-page.typing.test.ts
  • pnpm --dir ui test --project webkit src/components/solid/phone-sheet.browser.test.tsx
  • pnpm ui:check-performance:base

What I checked:

Likely related people:

  • RoboClaw: Raw commit 6052fff adds ui/src/lib/motion/sheet-dismiss.ts:49 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 6052fffac299; files: ui/src/lib/motion/sheet-dismiss.ts)

PR surface

Source +381, Tests +172. Total +553 across 8 files. Added test files: 2.

View PR surface stats
Area Files Added Removed Net
Source 6 617 236 +381
Tests 2 172 0 +172
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 789 236 +553

Labels

Label changes:

  • add P2: This improves phone filter usability and has a limited keyboard regression with focused repairs.
  • 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 🦞 diamond lobster 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: This improves phone filter usability and has a limited keyboard regression with focused repairs.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦞 diamond lobster 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 1, 2026, 11:29 AM ET / 16:29 UTC.

@vyctorbrzezowski
vyctorbrzezowski merged commit e571cd1 into main Nov 2, 2026
75 of 79 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/standardize-popover-sheet branch November 2, 2026 11:00
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
Share a phone sheet for Sessions and Automations filters while preserving desktop popovers and native form participation. Keep keyboard navigation inside the sheet when a restored search hides the close control.

The restored-search regression fails before the correction and passes afterward. Seven focused Chromium cases and independent review pass; redundant cosmetic and synthetic-event checks were removed. CI run 41430938418/1 remains red for the approved CSS budget exception and an unrelated isolated WebKit ChatDetails resize case. Its owners and imported inputs are identical to the tested main baseline and do not use PhoneSheet. All other jobs and security checks passed.
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: XL 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