Skip to content

AI Assistant: validate filter field existence for filter command#33830

Merged
anna-shakhova merged 1 commit into
DevExpress:26_1from
anna-shakhova:26_1__ai_assistant_filter_column
Jun 4, 2026
Merged

AI Assistant: validate filter field existence for filter command#33830
anna-shakhova merged 1 commit into
DevExpress:26_1from
anna-shakhova:26_1__ai_assistant_filter_column

Conversation

@anna-shakhova
Copy link
Copy Markdown
Contributor

No description provided.

@anna-shakhova anna-shakhova self-assigned this Jun 4, 2026
Copilot AI review requested due to automatic review settings June 4, 2026 08:43
@anna-shakhova anna-shakhova requested a review from a team as a code owner June 4, 2026 08:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens validation for the Grid AI Assistant’s filterValue command by ensuring every basic filter expression targets an existing grid column, preventing invalid filter sync behavior.

Changes:

  • Validate expr.field by resolving the corresponding column via columnOption, and fail the command when the column does not exist.
  • Use the resolved column’s dataType when normalizing filter values (instead of querying dataType directly).
  • Add Jest coverage for unknown fields and for filtering on hidden-but-existing columns.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/filtering.ts Adds column existence validation for basic filter nodes and updates the command description to require existing columns.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/tests/filtering.test.ts Adds tests ensuring unknown fields fail without applying filterValue, and hidden columns still allow filtering.

@anna-shakhova anna-shakhova merged commit b9f2b29 into DevExpress:26_1 Jun 4, 2026
103 checks passed
@anna-shakhova anna-shakhova deleted the 26_1__ai_assistant_filter_column branch June 4, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants