Skip to content

Conversation

@EugeneOYZ1203n
Copy link
Contributor

@EugeneOYZ1203n EugeneOYZ1203n commented Apr 9, 2025

Description

Creates a generate AI comments field in the Grading editor and workspace, also includes fields to enable LLM Grading and add a course specific API key in the course configuration panels.

Type of change

  • Added a AI Comment generation box in the Grading Editor and Workspace for Programming questions
  • Added enable LLM Grading and LLM API Key fields to course configuration with buttons in the Dropdown Create Course UI and in the Course Configuration Panel
  • Added 3 functions in Request Saga to link to backend

How to test

Nil. I don't know how to test frontend, do advise on what I should include.

Checklist

Do advise as well on how to update the documentation. Thanks

  • I have tested this code
  • I have updated the documentation

@coveralls
Copy link

coveralls commented Apr 17, 2025

Pull Request Test Coverage Report for Build 19938701985

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 17 (11.76%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.04%) to 39.773%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/dropdown/DropdownCreateCourse.tsx 0 2 0.0%
src/pages/academy/adminPanel/subcomponents/CourseConfigPanel.tsx 0 5 0.0%
src/commons/sagas/RequestsSaga.ts 2 10 20.0%
Files with Coverage Reduction New Missed Lines %
src/pages/academy/adminPanel/subcomponents/CourseConfigPanel.tsx 1 5.56%
Totals Coverage Status
Change from base Build 19938043923: -0.04%
Covered Lines: 4847
Relevant Lines: 11272

💛 - Coveralls

@RichDom2185 RichDom2185 self-requested a review April 17, 2025 19:51
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

Is there a backend PR to accompany this frontend PR?

@RichDom2185 RichDom2185 added the blocked Something else needs pass review first label Apr 17, 2025
@EugeneOYZ1203n
Copy link
Contributor Author

Is there a backend PR to accompany this frontend PR?

This is the accompanying backend PR:
source-academy/backend#1248

@Tkaixiang Tkaixiang self-assigned this Sep 8, 2025
@RichDom2185
Copy link
Member

@sentry review

@RichDom2185
Copy link
Member

LLM Key should never be put in session state, let alone persisted, let alone in the frontend. Paste the plain text once upon course creation, it's sent to BE and encrypted forever (you can't view it again). You should not be able to view it again, only change it subsequently via the dialog.

@RichDom2185 RichDom2185 removed the blocked Something else needs pass review first label Dec 4, 2025
@RichDom2185 RichDom2185 enabled auto-merge (squash) December 4, 2025 17:45
Copy link
Member

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! Let's try this out and fix bugs if any are to be discovered

@RichDom2185 RichDom2185 merged commit 7bad56b into master Dec 4, 2025
9 checks passed
@RichDom2185 RichDom2185 deleted the eugene-grading-comment-selector branch December 4, 2025 17:56
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.

6 participants