CLUE-589: enable custom comment tags on QA unit - #2932
Conversation
Add allowCustomCommentTags to the QA demo unit so the teacher custom comment tag feature can be exercised in testing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #2932 +/- ##
===========================================
- Coverage 85.86% 69.32% -16.55%
===========================================
Files 957 952 -5
Lines 54527 54503 -24
Branches 14357 14355 -2
===========================================
- Hits 46822 37785 -9037
- Misses 7687 16684 +8997
- Partials 18 34 +16
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-589-qa-custom-comment-tags
|
| Run status |
|
| Run duration | 03m 36s |
| Commit |
|
| Committer | Scott Cytacki |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
4
|
| View all changes introduced in this branch ↗︎ | |
dougmartin
left a comment
There was a problem hiding this comment.
Looks good 👍
Config key is valid (allowCustomCommentTags is declared in src/models/stores/unit-configuration.ts:105 and src/authoring/types.ts:49), configuration-manager.ts:54-55 already forces it false unless showCommentTag is set, and the QA unit exposes the sort-work tab, so the control is reachable manually.
A few non-blocking notes (take or leave):
-
src/public/demo/units/qa/content.json(line 122): the flag is enabled on theqaunit, but every sort-work E2E spec drivesqa-config-subtabs(cypress.config.ts:40clueTestqaConfigSubtabsUnitTeacher6,cypress.config.ts:31qaConfigSubtabsUnitTeacher1, andvisitQaSubtabsUnitincypress/support/visit_params.js:8), and no spec using aqa-unit teacher URL opens thesort-worktab. SinceSortWorkAddTagonly renders in Sort Work under the Strategy sort (src/components/document/sort-work-view.tsx:211), the control stays unreachable from every existing automated path. Consider also setting"allowCustomCommentTags": trueinsrc/public/demo/units/qa-config-subtabs/content.json(it already hasshowCommentTag,commentTags, and"Strategy"insortWorkConfig.sortOptions) so the existing sort-work fixtures can cover it. -
src/public/demo/units/qa/content.json(line 122):src/models/stores/comment-tags.tshasaddTag(line 52) but no remove/delete counterpart, and the QA unit runs against a fixedfakeClass=5, so any tag a tester adds persists atcommentTags/{classHash}/units/{unit}/tagsand merges into the sort sections of every later session on that class. Worth documenting the Firestore cleanup path in the test plan, or adding a cleanup spec alongsidecypress/e2e/cleanup/remove_teacher_comment_spec.js, before section-label assertions likesortWork.checkSectionHeaderLabelsExist([...])(teacher_sort_work_view_4_spec.js:126) start seeing leftover tags.
Not a code issue: the failing codecov/project check is a coverage-upload artifact (the cypress and cypress-regression flags uploaded 0 reports on this head vs 22 on base). codecov/patch, Build, Jest, and the Cypress smoke run all pass, and the PR contains no code lines.
Enables the teacher-created custom comment tags feature on the QA demo unit so it can be exercised in testing.
What changed
Added
"allowCustomCommentTags": truetosrc/public/demo/units/qa/content.json. The QA unit already setsshowCommentTag: trueand definescommentTags, so this is the one flag needed to turn on teacher-added custom tags.Why
Teachers can add their own comment tags only when a unit sets both
showCommentTagandallowCustomCommentTags(the latter defaults tofalseso legacy units are unaffected). No bundled unit setallowCustomCommentTags, so the feature could not be tested from any unit.Gating logic:
src/components/document/sort-work-add-tag.tsx—canAdd = showCommentTag && allowCustomCommentTags && user.isTeacher.Testing
Log in as a teacher against the QA unit and confirm a custom tag can be added and that it merges with the config
commentTags. Custom tags are stored per class + unit in Firestore atcommentTags/{classHash}/units/{unit}/tags.Jira: CLUE-589
🤖 Generated with Claude Code