Skip to content

CATROID-1665 Add Settings toggle to enable/disable the AI Tutor#5219

Open
harissabil wants to merge 3 commits into
dev-ai-tutorfrom
ai-tutor-settings-toggle
Open

CATROID-1665 Add Settings toggle to enable/disable the AI Tutor#5219
harissabil wants to merge 3 commits into
dev-ai-tutorfrom
ai-tutor-settings-toggle

Conversation

@harissabil

@harissabil harissabil commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

Adds a top-level "AI Tutor extension" checkbox to Settings so users can turn the AI Tutor on or off.

  • New setting_ai_tutor CheckBoxPreference (off by default) in preferences.xml, gated by the BuildConfig.FEATURE_AI_ASSIST_ENABLED build flag (entry removed when the feature isn't shipped).
  • SettingsFragment.isAiTutorSharedPreferenceEnabled() helper for runtime reads.
  • The AI Assist button now shows only when both the build flag and the user preference are enabled; re-evaluated in onResume so toggling takes effect on return.
  • Flips FEATURE_AI_ASSIST_ENABLED to true so the toggle is visible.
  • Extends SettingsFragmentTest.basicSettingsTest() to cover the new toggle.

Screenshot

AI Tutor extension setting

Your checklist for this pull request

Please review the contributing guidelines and wiki pages of this repository.

  • Include the name of the Jira ticket in the PR’s title
  • Include a summary of the changes plus the relevant context
  • Choose the proper base branch (develop)
  • Confirm that the changes follow the project’s coding guidelines
  • Verify that the changes generate no compiler or linter warnings
  • Perform a self-review of the changes
  • Verify to commit no other files than the intentionally changed ones
  • Include reasonable and readable tests verifying the added or changed behavior
  • Confirm that new and existing unit tests pass locally
  • Check that the commits’ message style matches the project’s guideline
  • Stick to the project’s gitflow workflow
  • Verify that your changes do not have any conflicts with the base branch
  • After the PR, verify that all CI checks have passed
  • Post a message in the catroid-stage or catroid-ide Slack channel and ask for a code reviewer

@harissabil harissabil requested a review from spipau June 17, 2026 08:06
Add SETTINGS_AI_TUTOR_ENABLED to the allSettings list so it is set and restored with the other toggles, and assert it in basicSettingsTest via the existing checkPreference helper, mirroring the NFC/Arduino entries.
@sonarqubecloud

Copy link
Copy Markdown

@harissabil harissabil self-assigned this Jun 17, 2026
@harissabil harissabil changed the title Add Settings toggle to enable/disable the AI Tutor CATROID-1665 Add Settings toggle to enable/disable the AI Tutor Jun 28, 2026
@harissabil harissabil requested review from reichli and removed request for spipau June 30, 2026 07:16
@reichli reichli added the GSoC-2026 This ticket is assigned to the GSoC contributor. label Jul 9, 2026

@reichli reichli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good - thank you!

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

Labels

GSoC-2026 This ticket is assigned to the GSoC contributor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants