Skip to content

DataGrid - ✨AI: AI assistant - AIChat: Implement the disabled state#33462

Open
Alyar666 wants to merge 3 commits intoDevExpress:26_1from
Alyar666:datagrid_ai_assistant_disabled_state_26_1
Open

DataGrid - ✨AI: AI assistant - AIChat: Implement the disabled state#33462
Alyar666 wants to merge 3 commits intoDevExpress:26_1from
Alyar666:datagrid_ai_assistant_disabled_state_26_1

Conversation

@Alyar666
Copy link
Copy Markdown
Contributor

No description provided.

@Alyar666 Alyar666 self-assigned this Apr 30, 2026
Copilot AI review requested due to automatic review settings April 30, 2026 02:24
@Alyar666 Alyar666 requested a review from a team as a code owner April 30, 2026 02:24
@Alyar666 Alyar666 added the 26_1 label Apr 30, 2026
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

Implements a disabled/busy state for the DataGrid AI Assistant chat UI so user input/actions can be blocked while an AI request is in progress.

Changes:

  • Added setDisabled/isDisabled to AIChat, disabling message input, speech-to-text, clear-chat, and regenerate actions while busy.
  • Updated AI Assistant view/controller flow to disable chat during sendRequestToAI and re-enable on completion.
  • Added Jest coverage and SCSS styling for the disabled state.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/grid_core/m_utils.ts Minor safe-access refactor in getWidgetInstance.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/const.ts Added disabled-related class names/selectors for AIChat.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.ts Implemented disabled state toggling and UI disabling hooks.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.test.ts Added tests for AIChat disabled behavior (widgets/buttons/regenerate).
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts Disabled chat while an AI request is running, re-enabled on completion.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_controller.ts Changed sendRequestToAI to return a Promise for request lifecycle tracking.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view.test.ts Added tests ensuring chat disable/enable behavior around requests.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_controller.test.ts Updated/added tests for Promise resolve/reject behavior.
packages/devextreme-scss/scss/widgets/base/gridBase/layout/aiChat/_index.scss Added styling to visually/interaction-disable parts of the chat UI.

Comment thread packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.ts Outdated
Comment thread packages/devextreme/js/__internal/grids/grid_core/ai_chat/const.ts Outdated
Copilot AI review requested due to automatic review settings April 30, 2026 09:32
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

Implements a disabled state for the DataGrid AI Assistant chat UI to prevent user interaction while an AI request is being processed, and wires the disabled lifecycle to the async request flow.

Changes:

  • Added setDisabled/isDisabled to AIChat, disabling relevant controls (textarea, speech-to-text, clear chat) and guarding regenerate actions.
  • Updated AIAssistantView to disable the chat while sendRequestToAI is in-flight, re-enabling it on completion.
  • Changed AIAssistantController.sendRequestToAI to return a Promise<void> and expanded unit tests + styling for the new behavior.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/devextreme/js/__internal/grids/grid_core/m_utils.ts Makes getWidgetInstance use optional chaining for safer access.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/const.ts Adds new class constants used for disabled state and element targeting.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.ts Implements disabled state behavior, including disabling embedded widgets and guarding regenerate clicks.
packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.test.ts Adds Jest coverage for disabled state behavior in AIChat.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts Disables chat during async AI requests using the new Promise-returning controller API.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_controller.ts Changes sendRequestToAI to return a Promise to support async UI state handling.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view.test.ts Adds/updates tests validating disable/enable behavior around request execution.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_controller.test.ts Updates tests to account for the Promise-based controller API.
packages/devextreme-scss/scss/widgets/base/gridBase/layout/aiChat/_index.scss Adds CSS styling for the disabled state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants