GridCommands: implement paging, filter, group commands#33457
Open
anna-shakhova wants to merge 5 commits intoDevExpress:26_1from
Open
GridCommands: implement paging, filter, group commands#33457anna-shakhova wants to merge 5 commits intoDevExpress:26_1from
anna-shakhova wants to merge 5 commits intoDevExpress:26_1from
Conversation
0438e87 to
ede0f1f
Compare
b24ef3a to
a1ca750
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the internal Grid AI Assistant command surface by adding paging, filtering/searching, and DataGrid-specific grouping commands, along with a small typing refactor to infer executor argument types directly from each command’s Zod schema.
Changes:
- Refined
GridCommandtyping so command executor args are inferred from the Zod schema (including treating empty-object schemas as no-arg commands). - Added new grid-core AI assistant commands: paging (
paging,pageSize,pageIndex) and filtering (filterValue,clearFilter,searching), with Jest coverage. - Added DataGrid AI assistant module entrypoint and DataGrid-specific grouping commands (
grouping,clearGrouping) with Jest coverage.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/types.ts | Refactors GridCommand to infer executor argument types from the Zod schema (and collapse empty schemas to no-arg executors). |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/sorting.ts | Migrates sorting commands to defineGridCommand and updates the command description. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/defineGridCommand.ts | Adds a typed helper to preserve schema-based inference when defining commands. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/paging.ts | Introduces paging-related commands (paging, pageSize, pageIndex). |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/filtering.ts | Introduces filtering/search commands (filterValue, clearFilter, searching) including a recursive filter-expression schema. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/tests/sorting.test.ts | Small adjustment in an error-throwing test case. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/tests/paging.test.ts | Adds Jest coverage for paging commands (schema, execution, default messages). |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/commands/tests/filtering.test.ts | Adds Jest coverage for filtering/search commands (schema, execution, default messages). |
| packages/devextreme/js/__internal/grids/data_grid/m_widget.ts | Switches DataGrid to import the new AI assistant module entrypoint. |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/ai_assistant.ts | Adds the DataGrid aiAssistant module registration (controllers/views + default options). |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/grouping.ts | Adds DataGrid-specific grouping commands (grouping, clearGrouping). |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/tests/grouping.test.ts | Adds Jest coverage for DataGrid grouping commands (schema, execution, default messages). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.