Skip to content

feat(agents): show Ready to use filters as one row of dropdown headers - #2179

Merged
gkhngyk merged 3 commits into
ansvisor:mainfrom
cihan-gyk:feature/agent-center-filter-menus
Nov 6, 2026
Merged

gkhngyk merged 3 commits into
ansvisor:mainfrom
cihan-gyk:feature/agent-center-filter-menus

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

The owner asked for this. Agent Center › Ready to use showed its filters as three rows of chips: Goal (10 chips), Business type (5) and For your role (9). They are now one row of headers side by side: Goal ▾ · Business type ▾ · Role ▾. Clicking a header opens its options right below it, and the other headers stay closed.

How it behaves:

  • The header shows the current pick, e.g. Goal: Content ▾, filled dark like a picked chip was before, so the row shows what is filtered. With no pick it shows only its name, e.g. Goal ▾.
  • Picking an option closes the panel and filters as before. Filters add up: Goal: Content with Business type: B2C keeps what matches both. All clears that filter.
  • One panel open at a time. With one panel open, one click on another header opens that one and closes the first (the menus are not modal).
  • Esc and a click outside close the panel, and nothing is filtered.
  • Keyboard: the header is a button with aria-haspopup="menu", aria-expanded, and aria-controls pointing at the panel while it is open. Enter, Space or ↓ opens it and moves the focus into the options. The arrow keys move through them, and Enter picks one. Esc, or picking an option, gives the focus back to the header.
  • Same rules as before: a filter shows only once a preset has one of its values. Industry has none yet, so it stays hidden. The picks stay in the component's state, as before (they were never in the address). The option labels are the same strings.

Components reused: the app's DropdownMenu (web/src/components/ui/dropdown-menu.tsx, Base UI Menu) with DropdownMenuRadioGroup / DropdownMenuRadioItem closeOnClick (the radio items' ✓ marks the pick), as the Content page's sort menu and the editor's page-type menu use it. The headers keep the list's .fc chip shape with lucide's ChevronDown, the arrow the app's dropdown triggers use.

Strings: one new string, chatAgents.ready.filterPicked = "{filter}: {value}". chatAgents.ready.filters.role now reads Role (was "For your role"), the owner's word for the header. The For your role mark on a card is a different string and is unchanged.

Phone width: checked in headless Chrome at 375px. The three headers fit on one line, and with long picks ("Role: Business Development") they wrap onto more lines. A panel near the right edge moves in to stay on screen.

  • Help: help/chat/agents.md gets a new section, Filter ready-to-use agents (102 words). It replaces the old one-line mention ("Filter them by Goal, Business type and For your role"), which made Ready-to-use agents go over 150 words. Keywords: goal, role, filter agents. approved-articles.json regenerated (yarn test -u src/lib/help).

Related issue

None (owner's request: Agent Center UI).

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Open Agent Center (Ready to use opens first). Above the cards, Goal ▾ · Business type ▾ · Role ▾ sit in one row, all closed.
  2. Click Goal. Its options (All, Visibility … Help) open right under it, with All ticked. Click Business type: its panel opens and Goal's closes.
  3. Pick B2C. The panel closes, the header reads Business type: B2C and three cards are left. Open Goal and pick Content: one card is left (Social Proof Pages).
  4. Open Goal again and pick All. The header reads Goal again and the filter is gone.
  5. Open a header and press Esc, or click elsewhere on the page. The panel closes and nothing changes.
  6. Keyboard: Tab to Role and press Enter or ↓. The focus moves into the options. Use the arrows and Enter to pick one. The panel closes and the focus is back on Role.
  7. At phone width (375px) the row wraps when the picks are long, and each panel stays on screen.
  8. Tests: cd web && npx vitest run src/components/chat/agents/ready-agents.test.tsx src/lib/help.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes
  • yarn typecheck passes
  • yarn format:check passes
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change)

Branched from main at e2be79b, then main (12e5e7b) merged in (b876c9c). The one conflict was help/chat/agents.md's keywords: main's new ones are kept and this branch's are added. Checks below ran locally on b876c9c. Later main (5d1a1e6, #2145) was merged in the same way (0334706): the keywords again, with Help regenerated and the Help and Ready to use tests passing.

  • web: format:check passes. lint gives 0 errors and 7 warnings, all already on main in files this PR doesn't touch. typecheck passes. yarn test passes 998/998 files, 10696 tests passed and 1 skipped. yarn build with CI's placeholder env passes.
  • ready-agents.test.tsx: 16/16, with no new act() warnings. src/lib/help: 12/12 (approved-articles.json is up to date after the merge).

Generated by Claude Code

Agent Center › Ready to use showed its filters as three rows of chips.
They are now one row of headers, Goal ▾ · Business type ▾ · Role ▾,
built on the app's dropdown menu (Base UI Menu, radio items) and its
ChevronDown icon. Clicking a header opens its options right under it;
one panel is open at a time, Escape or a click outside closes it, and
picking an option, All included, closes it and filters as before. A
header names its pick ("Goal: Content"), so the row says what is
filtered. Industry stays hidden while no preset carries one. The filters
stay in the component's state, as before.

Help: Agent Center's article gets a "Filter ready-to-use agents"
section; the approved articles are copied again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9
…r-filter-menus

Conflict in help/chat/agents.md's keywords: main's new ones (what this
agent did, agent impact …) kept, with this branch's goal, role and
filter agents added.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SvzkMf5TZg7yqwaSeMFba9

@gkhngyk gkhngyk 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.

LGTM.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants