-
Notifications
You must be signed in to change notification settings - Fork 524
Tutor Permissions: UI for ai chat tools permissions on sections #70097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutor Permissions: UI for ai chat tools permissions on sections #70097
Conversation
drizco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
There was a problem hiding this 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 introduces the UI components for managing AI chat tool permissions at the class section level through the teacher dashboard. The implementation adds toggles and checkboxes that allow teachers to control student access to AI chat features, including an "essential only" mode for curriculum-required AI tools. The backend logic and Redux integration are intentionally deferred to a follow-up PR.
Key Changes:
- Added new
AiChatAccessControlscomponent with toggle and checkbox controls for managing AI chat access levels - Defined
AI_CHAT_ACCESS_LEVELSconstants (enabled, disabled, essential_only) in shared constants - Added placeholder API handler and analytics events for access level updates
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/cdo/shared_constants.rb | Defines AI_CHAT_ACCESS_LEVELS constant with three access states |
| apps/src/templates/teacherNavigation/TeacherNavigationRouter.tsx | Updates import to use new AiChatAccessControls component |
| apps/src/metrics/events.ts | Adds AI_SETTINGS_UPDATE_SECTION_ACCESS_FAIL metric event |
| apps/src/metrics/AnalyticsConstants.js | Adds AI_CHAT_SECTION_ACCESS_LEVEL_UPDATED analytics event |
| apps/src/aichat/views/accessControls/ai-chat-access-controls.module.scss | Defines styles for access controls UI layout and elements |
| apps/src/aichat/views/accessControls/AiChatAccessControls.tsx | Implements main UI component with toggle/checkbox logic for access levels |
| apps/src/aichat/types/index.ts | Exports accessControls types |
| apps/src/aichat/types/accessControls.ts | Defines AiChatAccessLevel type |
| apps/src/aichat/accessControlsApi.ts | Provides placeholder API handler for updating section access levels |
| apps/script/generateSharedConstants.rb | Includes AI_CHAT_ACCESS_LEVELS in generated constants |
| apps/i18n/common/en_us.json | Adds localized strings for AI settings UI labels and tooltips |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR includes just the UI for controlling access to ai chat tools for a class section via teacher dashboard, with redux and backend changes coming in a separate follow-up.
Links
Testing story
Screen.Recording.2025-12-17.171456.mp4
Deployment strategy
Follow-up work