Skip to content

fix: suggest filter values by their label and in any case - #12582

Open
burrows99 wants to merge 1 commit into
windmill-labs:mainfrom
burrows99:fix/filter-suggestions-ignore-case
Open

burrows99 wants to merge 1 commit into
windmill-labs:mainfrom
burrows99:fix/filter-suggestions-ignore-case

Conversation

@burrows99

@burrows99 burrows99 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

The filter bar on the Runs page (and every list page that uses FilterSearchbar) suggests values for a filter as you type, but only when the typed text appears in the option's value, with the same case. So timeframe:within suggests nothing, though all seven timeframes are labelled "Within …", and job_trigger_kind:pub does not offer GCP Pub/Sub, whose value is gcp. The user types what the list shows, the label, and gets an empty list.

This PR matches the typed text against the option's label as well as its value, ignoring case. 2 lines added, 1 removed, in FilterSearchbar.svelte. Nothing changes for options whose label is their value except the case.

Reproduced on main at 28985a1 (CE v1.882.0).

flowchart TD
    A[User types part of a filter value] --> B{Text matches the label or another case}
    B -->|Before| C[No suggestion offered]
    B -->|After| D[Matching options suggested]
Loading

Narrated recording, before then after (sound on):

evidence.mp4

The recording is the real app (frontend dev server from this checkout against the main backend image). Waits on page loads are shortened; nothing else is edited.

Edge cases and unchanged behaviour checked

All checked in the running app, on this branch:

  • A label-only match: event suggests Azure Event Grid (value azure).
  • Capitals: timeframe:WITHIN suggests the same seven timeframes.
  • Unchanged: typing a value (kafka) still suggests Kafka.
  • Unchanged: Enter on a suggestion applies it (?job_trigger_kind=kafka).

Not changed here: on the Variables page the path suggestions are built from the rows the current filter returns, so once a partial path is typed the list is empty and has nothing to suggest. That is a separate issue and is the same with and without this change.

Checks run

  • oxlint on the changed file: passes.
  • prettier --check (with prettier-plugin-svelte) on the changed file: passes.
  • Not run: npm run check (svelte-check needs about 8 GB here) and npm run check:fast (no bun on this machine).
  • No test added: docs/validation.md asks for none on pure UI changes.

Related issue

None filed. Found while filtering runs by timeframe.

AI tools (Claude Code) assisted with this change; the bug was reproduced on main and the fix verified in the running app as shown.

🤖 Generated with Claude Code


Summary by cubic

Fixes filter value suggestions in the search bar so typing a label fragment or different capitalization still offers matching options. Previously only the option's value was matched, case-sensitively—so timeframe:within offered nothing and job_trigger_kind:pub missed GCP Pub/Sub. Suggestions now match both label and value, ignoring case.

Written for commit a9a76d9. Summary will update on new commits.

View guided diff

A filter's value suggestions matched the typed text against the option's value only, case-sensitively. On the Runs page "timeframe:within" listed nothing, since every timeframe starts with "Within", and "job_trigger_kind:pub" did not find GCP Pub/Sub, whose value is "gcp". Suggestions now match the label too, ignoring case.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

View guided diff | Re-trigger cubic

This branch has not been deployed

No deployments
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