Skip to content

improve(ui): move card search into the header - #189573

Merged
vyctorbrzezowski merged 4 commits into
mainfrom
brzezowski/card-header-search
Oct 31, 2026
Merged

vyctorbrzezowski merged 4 commits into
mainfrom
brzezowski/card-header-search

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Floating cards with a search field show that input permanently, even though most people open them to pick from a short list.

User Impact

These cards now open with a compact header: back when the card has one, a title, and a search icon. The icon turns the header into the typing field, matching the composer Skills menu. Typing into an open card still starts a search.

Why This Change Was Made

One shared control now backs every converted card, and Skills uses it too, so they all behave the same:

  • The icon swaps the title for the input at the same height. Card width stays stable.
  • X and Escape clear and close the search; a second Escape closes the card.
  • Focus moves into the input on open and back to the icon on close. Arrow keys still reach the list.
  • Keyboard users keep immediate typing: the first printable key opens the search with that character.

No new copy was added. Header titles and labels reuse existing strings. All converted headers use the same hairline as Skills, so they read as one pattern. The composer bottom bar layout is untouched.

Two behaviour changes to review:

  • X in Skills now clears and closes. It used to clear only.
  • Pickers that opened with focus in the input now focus the toggle or the list. Type-to-search covers the difference.

Evidence

States were captured in the real app against the session-design mock fixture, driven with real clicks and keystrokes at 1440 and 390 px. Before images come from the same base commit with this change reversed.

Sessions filters

Sessions filters popover, Absolutely dark

Sessions filters popover, Absolutely light

Sidebar owner picker (shared SelectPicker)

Sidebar owner picker, Absolutely dark

Sidebar owner picker, Absolutely light

Command palette, Projects

Palette projects submenu, Absolutely dark

Palette projects submenu, Absolutely light

New session, Project picker

New session project picker, Absolutely dark

New session project picker, Absolutely light

New session, Where picker

New session where picker, Absolutely dark

New session where picker, Absolutely light

Composer Skills (reference, now on the shared control)

Composer skills menu, Absolutely dark

Composer skills menu, Absolutely light

390 px

Sessions filters popover at 390 px, dark

Sessions filters popover at 390 px, light

Sidebar owner picker at 390 px, dark

Sidebar owner picker at 390 px, light

New session project picker at 390 px, dark

New session project picker at 390 px, light

New session where picker at 390 px, dark

New session where picker at 390 px, light

CRT and Beacon samples

Owner picker, CRT

Where picker, CRT

Owner picker, Beacon

Where picker, Beacon

Inventory

Surface File Result
Palette Projects pages/new-session/palette-session-settings-view.tsx Converted
New session Project pages/new-session/project-picker-content.tsx Converted
New session Where pages/new-session/where-picker-content.tsx Converted
Session menu, Assign to components/session-menu-details-solid.tsx Converted
Sharing menu, members pages/chat/components/chat-session-sharing-menu.tsx Converted
Diff, Jump to file pages/chat/components/session-diff-menus.tsx Converted
Sessions filters pages/sessions/sessions-filters.tsx Converted
SelectPicker search (sidebar owners, model select, group select, mobile sheet) components/select-picker-view.tsx Converted
Composer Skills pages/chat/components/chat-composer-plus-menu-subview.tsx Moved onto the shared control
Composer model picker pages/chat/components/chat-model-picker-panel Kept: search-first combobox over a large catalog
Emoji and reaction pickers emoji-search-panel Kept: search plus grid, typing is the primary action
Command palette, search page, transcript search, file find Kept: search is the purpose of the surface
Provider login model-providers login view Kept: labeled field in a modal wizard
MCP app resources mcp-app-resources Kept: explicit submit form
Group dialog search personal-session-group-dialog Kept: list inside a dialog, not a compact floating card
Sharing content, mobile sharing, mobile group page chat-session-sharing-content, chat-session-sharing-mobile Unchanged: search is already on demand
Context panel, workspace rails, settings and systems sidebars Out of scope: panels, not floating cards
Page toolbars: logs, dashboards, activity, cron runs, plugins, model providers, usage, meetings, transcripts, catalog, templates Out of scope: full pages

Validation

  • The shared header uses the existing active-overlay owner for typing, with listeners released by its rendering lifecycle. Control registrations are created in the rendering owner, and the still-live diff-tree search input retains its sizing.
  • Focused unit/browser suites were exercised in Chromium and WebKit. The final people assignment/sharing and connection-reset flows pass (5 cases). Three local WebKit Tab-exit failures also reproduce in the original, unmodified tests at merge-base 1df5510; they are not claimed as passing.
  • All 28 affected end-to-end cases pass. The existing Sessions search case now also proves that opening an empty search, closing the card, and reopening restores its collapsed search header. That sequence fails before the lifecycle correction and passes afterward.
  • Closed header search is advertised through the existing menu keyboard owner, so typing in an Assign to submenu reaches search rather than the chat composer. Both sidebar and header cases fail before this correction. All 14 existing assignment E2Es and 165 menu, chat keyboard, and Skills sibling checks pass afterward, including Chromium and WebKit. No additional test cases were needed.
  • UI and UI-test typechecks, controller and assertion-safety checks, scoped lint/format/style checks pass. Existing warnings are not represented as zero-warning lint.
  • Existing tests were adapted to activate the search field through its real controls. Tests use ordinary clicks and keystrokes. No new test cases or test-only production hooks were added.
  • The published captures remain representative of the approved visual design. These landing repairs preserve its visual values.

Gaps

  • Session menu Assign to, sharing members and diff Jump to file are not captured. The fixture does not reach them on screen (Assign to is disabled: "This Gateway does not support this session action"). They are covered by tests only.
  • The 390 px mobile session actions page for Assign to was not seen on screen.
  • The palette and Skills are shown at 1440 px only.
  • Project search with no results shows only Browse folders, with no message. Current behaviour is unchanged.
  • At 390 px the input uses the app's 16 px mobile input size, so typed text is larger than the title.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 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: 📸 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 Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces permanently visible search inputs in floating cards with expandable header searches.

Example: Open the sidebar Owners picker and search for Bob.

  • Before: The picker immediately displays a search input.
  • After: The picker displays an Owners header and search button; activating search reveals the input.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Representative visual proof supports the design, but a confirmed keyboard regression remains on the reviewed head.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected browser captures demonstrate the shared header's visual states against a synthetic Gateway fixture.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Always-visible search fields add visual weight to compact cards whose short lists are often selected without searching.
Reason: The maintainer-authored direction explicitly accepts on-demand search and changed opening focus, with representative visual evidence.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open for the maintainer-approved UI improvement: the earlier findings are fixed, but current-head CI exposes a keyboard regression that blocks merge.

Priority: P2
Reviewed head: 174ed139b6b67d75f3aca8c998b7f1370b2d8929

Before merge

  • Preserve menu keyboard ownership before chat autotype runs (P2) - With a chat open, hover Assign to from either the header actions or sidebar context menu and type zz without clicking Search. The collapsed header has no input, so findMenuSearch returns undefined. Chat's already-registered document-capture handler then focuses the composer and calls stopImmediatePropagation before this document listener runs. Current-head checks-ui-e2e (4/7) fails both existing scenarios at session-owner-assignment.e2e.test.ts:246; the header failure snapshot shows zz in Chat composer and no assignment searchbox. Integrate collapsed-search availability with the existing menu keyboard-admission owner so the first printable key opens search instead of editing the draft.
  • Explain or restore the original intent of Hovered assignment keyboard ownership - c07c615: fix: typing filters an open assignment menu #182016 prevents printable keys from closing Assign to and reaching the composer; this PR intends to preserve that behavior but currently breaks its admission condition.

Findings

  • [P2] Preserve menu keyboard ownership before chat autotype runs — ui/src/components/solid/header-search.tsx:155-157

Provenance

  • Hovered assignment keyboard ownership changes intended behavior without addressing why it exists (c07c615: fix: typing filters an open assignment menu #182016 prevents printable keys from closing Assign to and reaching the composer; this PR intends to preserve that behavior but currently breaks its admission condition.)
Agent review details

How this fits together

Control UI cards receive keyboard and pointer input, filter existing catalogs, and delegate selection and mutations to their existing owners.

flowchart TD
  User[User input] --> Overlay[Overlay registry]
  Overlay --> Header[Shared header search]
  Header --> Query[Existing query owners]
  Query --> Lists[Filtered choices]
  Lists --> Selection[Existing selection actions]
Loading

Technical review

Best possible solution:

Make the existing menu keyboard-admission owner recognize collapsed header search before chat autotype claims printable keys.

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

Reviewed-head CI reproduces both hovered assignment failures, and source inspection explains why the collapsed search loses keyboard ownership.

Is this the best way to solve the issue?

The shared visual control is appropriate, but keyboard admission must be integrated with the existing menu and chat owners.

Full review comments:

  • [P2] Preserve menu keyboard ownership before chat autotype runs — ui/src/components/solid/header-search.tsx:155-157
    With a chat open, hover Assign to from either the header actions or sidebar context menu and type zz without clicking Search. The collapsed header has no input, so findMenuSearch returns undefined. Chat's already-registered document-capture handler then focuses the composer and calls stopImmediatePropagation before this document listener runs. Current-head checks-ui-e2e (4/7) fails both existing scenarios at session-owner-assignment.e2e.test.ts:246; the header failure snapshot shows zz in Chat composer and no assignment searchbox. Integrate collapsed-search availability with the existing menu keyboard-admission owner so the first printable key opens search instead of editing the draft.
    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 bb8c5a07f194.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test:ui:e2e ui/src/e2e/session-owner-assignment.e2e.test.ts
  • pnpm test ui/src/pages/chat/chat-pane-keyboard-focus.test.tsx ui/src/components/session-people-search.browser.test.ts
  • pnpm tsgo:ui
  • pnpm check:control-ui-controllers

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit ef273ce adds ui/src/pages/chat/components/chat-session-sharing-menu.tsx:73 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ef273ce110b1; files: ui/src/pages/chat/components/chat-session-sharing-menu.tsx)

PR surface

Source +169, Tests +115. Total +284 across 54 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 20 599 430 +169
Tests 34 195 80 +115
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 54 794 510 +284

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The UI improvement has limited scope, but its hovered assignment interaction currently redirects search typing into the chat draft.
  • 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: 📸 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-31T17:22:17.524Z sha 975ae2e :: needs changes before merge. :: [P2] Create control-ref factories in the component owner | [P2] Route typing through the existing surface owners | [P2] Preserve the separate diff-tree search input rule

Reviewed October 31, 2026, 3:52 PM ET / 19:52 UTC (Revision 2).

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

The control-ref factories now run inside their rendering owners. Header search uses the existing active-overlay registry and owned listeners, with no document-wide DOM discovery or separate header-controller registry. Diff-tree input sizing is restored. The additional empty-search close/reopen defect is covered by a failing-before/passing-after sequence in the existing Sessions E2E. Affected typechecks, guards, Chromium flows and E2Es pass; the three local WebKit Tab-exit failures reproduce on the unmodified merge base and are documented in the PR. The main CSS conflict is resolved without changing approved visual values.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 31, 2026
@vyctorbrzezowski
vyctorbrzezowski enabled auto-merge (squash) October 31, 2026 20:01
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

The hovered-assignment keyboard contract from #182016 is preserved in 069c879. The existing menu search registry now advertises the owned collapsed search toggle before chat autotype runs. Actual input insertion and arrow navigation remain input-only, and the standalone Skills toggle is unchanged.

Both existing sidebar/header typing cases reproduced the composer interception before this correction. All 14 assignment E2Es and 165 menu, chat keyboard, and Skills sibling checks pass afterward, including Chromium and WebKit. The correction also passed independent review.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 31, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit fc1833d into main Oct 31, 2026
95 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/card-header-search branch October 31, 2026 20:08
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
* improve(ui): move card search into the header

* fix(ui): bind header search to owned overlay lifecycles

* fix(ui): advertise collapsed search to menu keyboard routing
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 clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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