Skip to content

feat(inbound-filters): Edit custom filter conditions with the search query builder - #127105

Open
shellmayr wants to merge 6 commits into
masterfrom
shellmayr/feat/inbound-filter-query-builder
Open

shellmayr wants to merge 6 commits into
masterfrom
shellmayr/feat/inbound-filter-query-builder

Conversation

@shellmayr

@shellmayr shellmayr commented Oct 9, 2026 •

Copy link
Copy Markdown
Member
  • Replaces the condition rows in the custom inbound filter modal with SearchQueryBuilder. Free text, OR, and parentheses are disallowed, and the key menu only offers the condition types of the selected data type.

  • Each filter token maps to one API condition, and conditions gain an operator field (matches, does_not_match, gt, gte, lt, lte). Saved conditions map back to tokens when editing.

    Query Condition
    error_message:spam matches spam
    error_message:[a,b] matches a or b
    !release:1.* does_not_match 1.*
    contains timeout matches *timeout*
    release:>=2.0.0 gte 2.0.0
  • Stored globs fold back into the matching wildcard operator: *x* shows as "contains", x* as "starts with", *x as "ends with". release offers the comparison operators, ip_address only "is" and "is not".

  • Changing the data type remounts the builder. A condition the new data type does not offer turns invalid and blocks the save, as do unknown condition types.

  • The filters table shows the operator next to the value and joins negated values with "and" instead of "or".

  • A row that holds a legacy list (legacyFilter set, once a list reaches the v2 stage) keeps the plain line list: one pattern per line, trimmed and blank lines dropped, with its condition and data type fixed. The query builder only edits filters made in the table.

  • The backend ignores operator today, so negations and comparisons save as plain matches until the backend accepts the field. This PR should land after that backend change.

Example:

Screen.Recording.2026-10-09.at.22.31.25.mov

…query builder

Replace the condition rows in the custom inbound filter modal with SearchQueryBuilder. Each filter token maps to one API condition with an operator: a negated key is does_not_match, release comparisons map to gt/gte/lt/lte, and contains/starts with/ends with fold into glob values and back. The table shows the operator and joins negated values with and.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.72% 95.72% ±0%
Typed 142,218 142,262 🟢 +44
Untyped 6,363 6,366 🔴 +3
🔍 3 new type safety issues introduced

Non-null assertions (!) (1 new)

File Line Detail
static/app/views/settings/project/projectFilters/customFilters.tsx 445 values[0]!

Type assertions (as) (2 new)

File Line Detail
static/app/views/settings/project/projectFilters/customFilters.tsx 379 as ConditionType — type as ConditionType
static/app/views/settings/project/projectFilters/customFilters.tsx 382 as ConditionType — type as ConditionType

This is informational only and does not block the PR.

@shellmayr
shellmayr marked this pull request as ready for review October 15, 2026 07:36
@shellmayr
shellmayr requested review from a team as code owners October 15, 2026 07:36
shellmayr and others added 2 commits October 15, 2026 09:57
A legacy newline list of the project settings moves into the custom filters
table as one row with one condition, marked by legacyFilter. Its lines must
round-trip exactly, comments included, and the legacy API maps the list onto
that one condition, so the row cannot take the query builder.

Edit such a row with the plain line list the settings use, one pattern per
line, with its data type fixed. A filter made here keeps the query builder.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ery-builder' into shellmayr/feat/inbound-filter-query-builder

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a26774f. Configure here.

Comment thread static/app/views/settings/project/projectFilters/customFilters.tsx
…legacy id

A row that holds a legacy list reports its outcomes under the id of that
list, not under custom-inbound-filter:<id>, so the table looked up an empty
trend for it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 3eb5a0d5 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant