Skip to content

feat(rules): searchable pickers across the automation rule builder#52

Merged
Abdulkhalek-1 merged 9 commits into
mainfrom
feat/rules-searchable-event-picker
Jul 9, 2026
Merged

feat(rules): searchable pickers across the automation rule builder#52
Abdulkhalek-1 merged 9 commits into
mainfrom
feat/rules-searchable-event-picker

Conversation

@Abdulkhalek-1

Copy link
Copy Markdown
Member

Summary

Adds search to every <Select> picker in the automation rule builder. Introduces one reusable, presentational SearchableSelect (Popover + auto-focused search + filtered list) and routes all the rule-builder pickers through it.

What changed

  • New SearchableSelect (apps/dashboard/src/client/shared/ui/searchable-select.tsx) — data-agnostic searchable single-select lifted from the DiscordSelect shell; supports per-row icons, keywords search, loading/error/empty states, and optional id/aria-required for <Label> association.
  • DiscordSelect refactored onto SearchableSelect — public API and appearance unchanged (all 7 existing consumers unaffected).
  • Searchable pickers now cover: trigger event type, both action types (with ACTION_ICONS), condition field + operator, and the action-field channel + role pickers. The generic action-field enum select is intentionally left as a plain <Select>.
  • Shared helper buildActionTypeOptions (unit-tested) maps action-type constants → options.
  • i18n: panel.search/panel.noResults (rules) and form.search/form.noResults (common).

Testing

  • Full dashboard tests/client suite: 60/60 passing (Docker); client typecheck clean.
  • New tests: SearchableSelect behavior (10), DiscordSelect characterization smoke (2), buildActionTypeOptions (2).

Notes / follow-ups

  • Adds a dev-only dependency @testing-library/jest-dom (+ tests/setup.ts + vitest setupFiles) for the component tests.
  • pnpm-lock.yaml changed — rebuild the bot Docker image so in-container installs stop needing --no-frozen-lockfile (CI unaffected; committed lockfile + manifest are consistent).
  • Deferred cosmetic polish (non-blocking): tighten a searchable-select test's button query with an accessible-name matcher; align form.noResults wording with the component default.

Spec: docs/superpowers/specs/2026-07-09-searchable-event-picker-design.md · Plan: docs/superpowers/plans/2026-07-09-searchable-event-picker.md

🤖 Generated with Claude Code

Abdulkhalek-1 and others added 9 commits July 9, 2026 11:28
Extract DiscordSelect's popover-based searchable shell into a reusable
SearchableSelect and use it for the trigger event picker.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a presentational searchable single-select built on Popover with
label+keyword filtering, allowNone row, loading/error states, and
Obsidian Engine design tokens. Wires up @testing-library/jest-dom via a
vitest setup file so toBeInTheDocument matchers work across all client
component tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…/operator/channel/role selects

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace both action-type <Select> pickers (ActionPanel + StepPanel) with
SearchableSelect, backed by a new shared buildActionTypeOptions() helper that
maps ACTION_ICONS and description as search keywords. Adds i18n keys
panel.search and panel.noResults; includes 2 unit tests (TDD RED→GREEN).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends SearchableSelect with id/aria-required forwarding for
label association, converts ActionFields channel and role <Select>
pickers to SearchableSelect, and adds form.search/form.noResults
i18n keys to common.json.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Abdulkhalek-1 Abdulkhalek-1 merged commit 9de71be into main Jul 9, 2026
7 checks passed
@Abdulkhalek-1 Abdulkhalek-1 deleted the feat/rules-searchable-event-picker branch July 9, 2026 10:34
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.

1 participant