Skip to content

Conversation

@cnbrenci
Copy link
Contributor

@cnbrenci cnbrenci commented Dec 18, 2025

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

  • This AI Settings page is behind an experiment

Follow-up work

  • Add logic for only showing the "essential" toggle when the section has essential ai assigned
  • Add the access level to Section model and plumb through redux and the backend

@cnbrenci cnbrenci requested review from a team, Erin007 and drizco December 18, 2025 01:23
Copy link
Contributor

@drizco drizco left a comment

Choose a reason for hiding this comment

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

lgtm!

@cnbrenci
Copy link
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link

To use Codex here, create a Codex account and connect to github.

@cnbrenci cnbrenci requested a review from Copilot December 18, 2025 18:06
Copy link
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 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 AiChatAccessControls component with toggle and checkbox controls for managing AI chat access levels
  • Defined AI_CHAT_ACCESS_LEVELS constants (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.

@cnbrenci cnbrenci merged commit 154d071 into staging Dec 19, 2025
6 checks passed
@cnbrenci cnbrenci deleted the cassi/tutor/permissions/sections-settings-ui branch December 19, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants