AI Assistant: Integration leftovers#33585
Open
dmirgaev wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR cleans up leftovers from the AI Assistant integration: it consolidates the getGridExtraContext/getGridColumnExtraContext extension hooks into direct buildContext/buildColumnContext overrides, caches controller references, removes stale TODOs, and adds extensive test coverage including a new DataGrid integration test file.
Changes:
- Refactor
AIAssistantIntegrationControllerto cachedataController/columnsControllerand replace the "extra context" hooks with overridablebuildContext/buildColumnContextmethods. - Remove stale
// TODOcomments and unneededas unknown astest casts. - Significantly expand Jest coverage for AI assistant controllers (failure paths, headerText formatting, dispose behavior, second-request rejection) and add new DataGrid integration controller test file.
Reviewed changes
Copilot reviewed 8 out of 8 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/commands/index.ts | Removed obsolete TODO comment. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_integration_controller.ts | Cached controller refs; replaced extra-context hooks with overridable buildContext/buildColumnContext. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_integration_controller.integration.test.ts | Dropped unnecessary as unknown cast in test setup. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_controller.test.ts | Added tests for failure paths, header formatting, dispose, and request rejection. |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/commands/index.ts | Removed obsolete TODO comment. |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/ai_assistant_integration_controller.ts | Switched DataGrid overrides to new buildContext/buildColumnContext API. |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/tests/ai_assistant_integration_controller.integration.test.ts | New integration test file for DataGrid AI assistant controller. |
| packages/devextreme/js/__internal/grids/data_grid/ai_assistant/tests/ai_assistant_controller.test.ts | New unit tests for DataGridAIAssistantController. |
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.