Skip to content

543 default limit field values to 1000 in query builder#556

Merged
arturminchukov merged 3 commits intomainfrom
543-default-limit-field_values-to-1000-in-query-builder
Feb 6, 2026
Merged

543 default limit field values to 1000 in query builder#556
arturminchukov merged 3 commits intomainfrom
543-default-limit-field_values-to-1000-in-query-builder

Conversation

@arturminchukov
Copy link
Contributor

@arturminchukov arturminchukov commented Feb 5, 2026

Related issue: #543

Describe Your Changes

Added a limit on field values that are fetched in the query builder. You can configure the limit in the datasource settings.

Checklist

The following checks are mandatory:


Summary by cubic

Set a default limit of 1000 field values in the query builder to improve performance and avoid overwhelming dropdowns. The limit is configurable in datasource settings and field value search now filters on the server.

  • New Features

    • Limit field values to 1000 by default; configurable in datasource settings.
    • Server-side filtering for field values with a warning when the limit is reached.
  • Refactors

    • Extracted filter fetching into a new useFetchFilters hook and simplified QueryBuilderFieldFilter.
    • Updated language provider to build queries with fieldValueFilter for efficient server-side search.

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

@arturminchukov arturminchukov self-assigned this Feb 5, 2026
@arturminchukov arturminchukov linked an issue Feb 5, 2026 that may be closed by this pull request
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 5 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="src/components/QueryEditor/QueryBuilder/components/QueryBuilderFilters/useFetchFilters.ts">

<violation number="1" location="src/components/QueryEditor/QueryBuilder/components/QueryBuilderFilters/useFetchFilters.ts:36">
P2: The field name cache never invalidates when `query`, `timeRange`, or `field` changes, so the hook can return stale field lists for a different context. Consider resetting the cache when those inputs change or keying the cache by them.</violation>
</file>

<file name="src/language_provider.ts">

<violation number="1" location="src/language_provider.ts:59">
P2: Escape `fieldValueFilter` before embedding it into the LogsQL query; otherwise quotes/backslashes in user input can break the query or inject additional filters.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@arturminchukov arturminchukov merged commit 3903e7b into main Feb 6, 2026
5 checks passed
@arturminchukov arturminchukov deleted the 543-default-limit-field_values-to-1000-in-query-builder branch February 6, 2026 12:45
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.

Default-limit field_values to 1000 in Query Builder

3 participants