Skip to content

Wire up autocomplete for free-text filter fields - #701

Open
jvanbuel wants to merge 1 commit into
mainfrom
claude/wire-freetext-autocomplete
Open

Wire up autocomplete for free-text filter fields#701
jvanbuel wants to merge 1 commit into
mainfrom
claude/wire-freetext-autocomplete

Conversation

@jvanbuel

Copy link
Copy Markdown
Owner

What

FilterStateMachine has carried the machinery for autocompleting non-primary free-text fields all along:

  • a field_values: HashMap<String, Vec<String>> member
  • a set_field_values(field, values) setter
  • threading through value_candidates_for_field and edit_condition_state at six call sites

Nothing ever called the setter. The map was permanently empty, so value_candidates_for_field's FreeText arm always returned vec[] and those fields silently offered no suggestions.

Affected filters

Four real fields, all declared via impl_filterable! and all free-text:

Type Field
Dag owners, tags
TaskInstance operator
AirflowConfig endpoint

The primary fields (dag_id, dag_run_id, task_id, name) were never affected — they autocomplete from primary_values, which sync_panel has always populated.

Change

Populate field_values in sync_panel right beside the existing set_primary_values calls, so candidates reflect the data currently loaded.

Candidates are the individual values rather than the joined display string, because that is what a user actually types: owners renders as "alice, bob" but you filter with owners:alice, and matching is substring-based.

A small distinct() helper (sort, dedup, drop blanks) is shared by all four sites.

Alternative considered

The other way to resolve this was deleting the machinery (~25 lines). Wiring it up costs less code and turns four filters that quietly under-serve into working ones, so I went this way — but the delete is a clean revert of this PR plus removal of the plumbing if you'd rather not carry the feature.

Verification

cargo test --workspace --lib --bins (95 passing, including a test for distinct), cargo clippy --workspace --all-targets --all-features -- -D warnings, and cargo fmt --all --check all clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0127jzUgqqy8JVX5RydfQxh8


Generated by Claude Code

FilterStateMachine has carried a field_values map and a set_field_values
setter for autocompleting non-primary free-text fields, but nothing ever
called the setter, so the map was always empty and
value_candidates_for_field returned no suggestions for those fields.

Populate it in sync_panel alongside the existing set_primary_values
calls, so owners and tags (Dag), operator (TaskInstance) and endpoint
(AirflowConfig) suggest the values actually present in the loaded data.

Candidates are the individual values rather than the joined display
string, since that is what a user types: owners renders as "alice, bob"
but you filter with 'owners:alice'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0127jzUgqqy8JVX5RydfQxh8
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@jvanbuel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 035ecd72-7781-4d86-b81b-4d1bfc4e35ad

📥 Commits

Reviewing files that changed from the base of the PR and between c16ad73 and aa37f0f.

📒 Files selected for processing (1)
  • src/app/state/sync.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/wire-freetext-autocomplete

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

2 participants