chore: retire the authoring choice between text and image for AI evaluation (CLUE-371) - #2993
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2993 +/- ##
=======================================
Coverage 86.40% 86.40%
=======================================
Files 1001 1002 +1
Lines 57023 57098 +75
Branches 15129 15165 +36
=======================================
+ Hits 49268 49333 +65
- Misses 7735 7745 +10
Partials 20 20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
collaborative-learning
|
||||||||||||||||||||||||||||
| Project |
collaborative-learning
|
| Branch Review |
CLUE-371-retire-summarizer-setting
|
| Run status |
|
| Run duration | 03m 38s |
| Commit |
|
| Committer | Ethan McElroy |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
4
|
| View all changes introduced in this branch ↗︎ | |
Curriculum authors could choose what got sent to the AI for evaluation: a text summary of the document or a screenshot of it. That choice was stored as aiPrompt.summarizer and shown in the authoring app as a select labelled "Format Of Content Sent To AI". Every evaluation now sends both representations and the document's own content decides which ones go, so the analysis functions no longer read the setting and the select no longer means anything. Remove it. aiPrompt.summarizer is still accepted in stored configuration and ignored. Published unit JSON in the wild carries it, and those units must keep loading. The field stays declared on IAiPrompt and on AIPromptModel, in both cases demoted to a plain string and commented as ignored. Saving the AI Settings form now drops the property from the unit's configuration. Each authoring page writes the configuration through its own updater, so saving a different page leaves it in place. Add a test file for the AI Settings form, which had none. Its four cases cover the behaviour most likely to regress: the select is absent, saving deletes the property, saving leaves the other aiPrompt fields alone, and saving a config that had no aiPrompt creates one without the property. This must not merge before the mixed-mode change (CLUE-371-ai-feedback-text-and-images), and must not reach a production release before those functions are deployed. Until they are, an author who saved this form would drop the property and the old function would fall back to its "image" default, silently turning a text-only custom unit into an image-only one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
emcelroy
force-pushed
the
CLUE-371-retire-summarizer-setting
branch
from
September 2, 2026 01:48
75b028a to
6b90407
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused compatibility-preserving cleanup is complete and adequately tested.
Pull request overview
Removes the obsolete AI content-format authoring choice while preserving compatibility with legacy unit configurations.
Changes:
- Removes the summarizer selector and associated types.
- Deletes legacy
summarizervalues when AI Settings are saved. - Adds regression coverage for rendering and configuration cleanup.
File summaries
| File | Description |
|---|---|
src/models/stores/unit-configuration.ts |
Documents legacy model compatibility. |
src/authoring/types.ts |
Retires the constrained summarizer type. |
src/authoring/components/workspace/ai-settings.tsx |
Removes the control and cleans saved configuration. |
src/authoring/components/workspace/ai-settings.test.tsx |
Tests removal and cleanup behavior. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was previously deployed
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.
CLUE-371
Follows: #2988 (
CLUE-371-ai-feedback-text-and-images), already merged to masterWhat this changes
Curriculum authors could choose what got sent to the AI for evaluation: a text summary of the document, or a screenshot of it. The choice was stored as
aiPrompt.summarizerand shown on the AI Settings authoring page as a select labelled "Format Of Content Sent To AI".That choice no longer means anything. Every evaluation now sends both representations, and the document's own content decides which of the two actually go. The analysis functions stopped reading
aiPrompt.summarizerin #2988. This removes the authoring control that still wrote it, along with theSummarizertype and thesummarizerslist that described it as meaningful.What is kept
aiPrompt.summarizeris still accepted in stored configuration and ignored. Published unit JSON in the wild carries it, and those units have to keep loading. The field stays declared in two places —IAiPromptin the authoring types andAIPromptModelin the unit configuration — demoted to a plain string in both, with a comment saying it is ignored.The property is dropped from a unit's configuration the next time an author saves the AI Settings form. Each authoring page writes the configuration through its own updater, so saving a different page leaves the property in place. This is opportunistic cleanup, not a migration.
Testing
New file:
src/authoring/components/workspace/ai-settings.test.tsx. The AI Settings form had no test file; this follows the four sibling forms in the same directory. Four cases, covering the behavior most likely to regress:aiPromptthat hassummarizerdeletes the propertyaiPromptfield survives that submit unchangedaiPromptcreates one withoutsummarizerAll four fail against the pre-change component, so they are testing what they claim to.
npm test,npm run lint,npm run build, andnpm run check:typesall pass.Verified by hand rather than by test
The tests above mock the persistence layer, so the save path was also checked end to end in the real authoring app, running against local Firebase emulators (Realtime Database, Auth, and the
authoring-apifunction).A unit whose
aiPromptcarriedsummarizer: "text"alongside all five prompt fields was loaded on the AI Settings page. The form rendered with no errors, the format select was gone — the only select left is "AI Evaluation Method" — and all five prompt fields showed their stored values. After saving, the stored configuration had lostsummarizerand kept every other field.One thing to know if you repeat that check: saving this form also writes
showIdeasButtonand rewritesaiPrompt.categoriesfrom the unit'scommentTags. Both are pre-existing behavior of the form, unchanged by this PR.Not in scope
Removing
summarizerfrom the stored configuration format or from the MST model; the mixed-mode pipeline itself; staging verification and rollout; Cypress coverage of the authoring forms.