Skip to content

[Feat]: Structured filter: Match all / Match any (AND/OR) toggle聽#864

Description

@debba

馃殌 Feature Proposal

Add a Match all / Match any toggle to the structured filter panel, so filter rows can be combined with AND (today's behaviour) or OR.

Motivation

Finding rows that match any of several conditions (status = 'failed' OR retries > 3) currently requires switching to the raw WHERE input.

Where to start

  • src/utils/filterBar.ts: buildStructuredFilterClause always joins with " AND ". Add a combinator: "AND" | "OR" parameter and wrap the OR output in parentheses.
  • src/components/ui/TableToolbar.tsx: keep the combinator state next to structuredFilters, add a small segmented control in the panel header and pass it to every buildStructuredFilterClause call (including the SQL preview).

Acceptance criteria

  • The toggle shows in the structured filter panel; default is "Match all".
  • OR output is parenthesized so it composes safely with other clauses.
  • The SQL preview reflects the choice.
  • The choice is kept while the tab is open.
  • Unit tests in tests/utils/filterBar.test.ts.

Contributor notes

  • Follow the repo rules in .rules/ (TypeScript, React, design tokens, accessibility, testing).
  • Any new UI string needs a key in every locale under src/i18n/locales/.
  • Run pnpm lint, pnpm typecheck and pnpm test before opening the PR.
  • Questions? Ask here or on Discord.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions