Skip to content

Conversation

@hirokiterashima
Copy link
Member

@hirokiterashima hirokiterashima commented Jan 22, 2026

Notes

Please style as you see fit

Changes

For units with AI enabled (see "Test Prep" below), in the CM for any OpenResponse item:

  • Show "Generate Student Summary" button if there is at least one response for the period selected (includes when "All Periods" is selected)
    • Clicking on the button generates summary and displays it.
      • Show spinner while waiting
      • Shows summary in the same language as the prompt
      • Show (# responses) after summary
    • Summary is saved in localStorage. Coming back to the component should re-display the summary
    • Clicking on the button again generates new summary and overwrites the existing one.
  • Show "No student responses" if there is no response for the period selected

Test Prep

Add top-level json field in the unit to enable this feature:

{
...
"ai": { "enabled": true }
...
}

Test

  • Changes work as described above
  • Units that don't have AI enabled do not show the OR summarizer

@hirokiterashima hirokiterashima self-assigned this Jan 22, 2026
@hirokiterashima hirokiterashima added the enhancement New feature of any size or improvement (UI, performance, security) label Jan 22, 2026
@qltysh
Copy link

qltysh bot commented Jan 22, 2026

❌ 1 blocking issue (1 total)

Tool Category Rule Count
qlty Structure Function with many parameters (count = 6): constructor 1

private cRaterService: CRaterService,
private dataService: TeacherDataService,
private projectService: ProjectService,
private summaryService: SummaryService
Copy link

Choose a reason for hiding this comment

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

Function with many parameters (count = 6): constructor [qlty:function-parameters]

@qltysh
Copy link

qltysh bot commented Jan 22, 2026

Qlty

Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (3)

RatingFile% DiffUncovered Line #s
New file Coverage rating: F
src/app/services/localStorageService.ts30.0%10-40
New file Coverage rating: A
...nse-summary-display/open-response-summary-display.component.ts100.0%
New file Coverage rating: F
...torComponents/component-summary/component-summary.component.ts0.0%54-88
Total72.6%
🤖 Increase coverage with AI coding...

In the `cm-or-summarize-responses` branch, add test coverage for this new code:

- `src/app/services/localStorageService.ts` -- Line 10-40
- `src/assets/wise5/classroomMonitor/classroomMonitorComponents/component-summary/component-summary.component.ts` -- Line 54-88

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@hirokiterashima hirokiterashima marked this pull request as ready for review January 23, 2026 00:07
Copy link
Member

@breity breity left a comment

Choose a reason for hiding this comment

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

Looks great. 👍
I updated styles and added date/time display of latest summary.

@hirokiterashima hirokiterashima changed the base branch from develop to cm-component-ai-summarizer January 27, 2026 21:48
@hirokiterashima hirokiterashima merged commit 1e1682f into cm-component-ai-summarizer Jan 27, 2026
1 check was pending
@hirokiterashima hirokiterashima deleted the cm-or-summarize-responses branch January 27, 2026 21:49
@hirokiterashima
Copy link
Member Author

I created a feature branch (cm-component-ai-summarizer) instead of merging this PR to develop. I'll create another PR for discussion component summarizer to be merged into this feature branch

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

Labels

enhancement New feature of any size or improvement (UI, performance, security)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants