Skip to content

fix(web): add design-system search clear - #6810

Open
SomSamantray wants to merge 2 commits into
nexu-io:mainfrom
SomSamantray:fix/2697-search-clear
Open

fix(web): add design-system search clear#6810
SomSamantray wants to merge 2 commits into
nexu-io:mainfrom
SomSamantray:fix/2697-search-clear

Conversation

@SomSamantray

@SomSamantray SomSamantray commented Aug 13, 2026

Copy link
Copy Markdown

Fixes #2697

Why

While using the design-system picker, entering a search query and using the existing Clear action could also clear the selected design system. This made it difficult to reset search results without losing the current design-system choice.

What users will see

The picker now shows a query-only Clear search icon when text is entered. It resets the search query, restores the default results, preserves the selected design system, and returns focus to the search field. The existing row-level Clear action remains available for clearing the selected design system.

Surface area

  • UI — design-system picker search interaction in apps/web
  • Keyboard shortcut
  • CLI / env var
  • API / contract
  • Extension point
  • i18n keys
  • New top-level dependency
  • Default behavior change
  • None

Screenshots

The screenshots use the same project, selected design system, search query, viewport, and Chromium capture flow. The before image is from origin/main (85d2e4893); the after image is from this PR (2ac0df63c).

Before PR After PR
Before PR — no query-only clear icon After PR — query-only Clear search icon

Difference: with Aurora UI selected and aur entered, the PR adds the inline Clear search icon while leaving the selected design system unchanged.

Bug fix verification

  • Test path: apps/web/tests/components/DesignSystemPicker.test.tsx covers entering a query, showing Clear search, clearing only the query, preserving the selected design system, hiding the action when the query is empty, and not calling onChange for query-only clearing.
  • Browser path: select Aurora UI → enter aur → click Clear search → query resets and default results return → Aurora UI remains selected → focus returns to the search input.

Preserved selection path: query entered → clear icon clicked → results reset while the selected design system stays unchanged.

Validation

  • corepack pnpm exec vitest run -c vitest.config.ts --maxWorkers=1 tests/components/DesignSystemPicker.test.tsx — passed
  • corepack pnpm --filter @open-design/web typecheck — passed
  • corepack pnpm guard — passed in PR review checks
  • Chromium + Chrome DevTools MCP browser verification — passed for the interaction path above

Contributor: Som Samantray

@lefarcen

Copy link
Copy Markdown
Contributor

Thanks @SomSamantray — the query-only clear behavior here looks like a nicely scoped follow-up to #2697.

Since this updates the picker UI, we’ve marked the PR for the normal design/QA path before merge. Could you also add a quick screenshot or before/after to the PR body? That’ll make the visual pass faster for everyone.

@lefarcen
lefarcen requested a review from nettee August 13, 2026 03:26
@lefarcen lefarcen added size/S PR changes 20-100 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix needs-validation Runtime change detected; needs human or /explore agent validation. needs-design-review Awaiting design review (external UI change); cleared by the Odcrew App applying design-approved labels Aug 13, 2026

@nettee nettee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SomSamantray

I reviewed the query-only clear affordance in DesignSystemPicker, including the focused picker, flow, and brand-preview coverage. The clear button resets only the query, preserves the selected system, restores the default result list, and returns focus to the search field. Local validation passed: picker tests (8/8), related flow/brand-preview tests (44 passed, 6 skipped), web typecheck, and pnpm guard.

Nice, focused fix—thanks for preserving the selection semantics while adding the missing search affordance.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Visual regression review

Head: 813cd5e · Base: 85d2e48

4 changed · 45 unchanged · 0 new without baseline · 0 failed

Changed cases

Case Main PR Diff
visual-home
538 px (0.04%)
main pr diff
visual-home-plugin-use-staged
4,470 px (0.34%)
main pr diff
visual-home-staged-attachment
4,001 px (0.31%)
main pr diff
visual-topbar-local-cli-model-list
2,434 px (0.19%)
main pr diff
Unchanged cases
Case Main PR Diff
visual-avatar-local-agent-list
142 px (0.01%)
main pr diff
visual-avatar-local-agent-list-panel
34 px (0.04%)
main pr diff
visual-avatar-menu
104 px (0.01%)
main pr diff
visual-avatar-menu-panel
0 px (0.00%)
main pr diff
visual-avatar-open-design-model-picker
144 px (0.01%)
main pr diff
visual-critical-settings
0 px (0.00%)
main pr diff
visual-critical-workspace
345 px (0.03%)
main pr diff
visual-critical-workspace-preview
191 px (0.01%)
main pr diff
visual-design-system-detail
0 px (0.00%)
main pr diff
visual-design-systems
1 px (0.00%)
main pr diff
visual-home-catalog
0 px (0.00%)
main pr diff
visual-home-context-picker
124 px (0.01%)
main pr diff
visual-home-context-picker-popover
15 px (0.00%)
main pr diff
visual-home-plugin-filter
0 px (0.00%)
main pr diff
visual-home-plugin-use-with-query
0 px (0.00%)
main pr diff
visual-integrations
0 px (0.00%)
main pr diff
visual-integrations-mcp
0 px (0.00%)
main pr diff
visual-integrations-use-everywhere
0 px (0.00%)
main pr diff
visual-new-project-modal
0 px (0.00%)
main pr diff
visual-onboarding-cloud
0 px (0.00%)
main pr diff

Visual diff is advisory only and does not block merging.

@lefarcen lefarcen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @SomSamantray — the PR body is already clear on the intent, and @nettee’s approval helps confirm the behavior. Before this moves further, could you add two small PR-body pieces: (1) a screenshot or before/after for the new clear affordance, and (2) a short bug-fix verification note that explicitly calls out the preserved selection path (for example: query entered → clear icon clicked → results reset while the selected design system stays unchanged).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-design-review Awaiting design review (external UI change); cleared by the Odcrew App applying design-approved needs-validation Runtime change detected; needs human or /explore agent validation. risk/medium Medium risk: regular code changes size/S PR changes 20-100 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a clear-input action to the search box when text is entered

4 participants