Release 0.65.1#3265
Closed
odlbot wants to merge 7 commits into
Closed
Conversation
* Update dependency sharp to v0.34.5 * update yarn --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: shankar ambady <ambady@mit.edu>
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/scop/pre-commit-shfmt: v3.12.0-2 → v3.13.1-1](scop/pre-commit-shfmt@v3.12.0-2...v3.13.1-1) - [github.com/astral-sh/ruff-pre-commit: v0.15.1 → v0.15.12](astral-sh/ruff-pre-commit@v0.15.1...v0.15.12) * fix lint --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: shankar ambady <ambady@mit.edu>
* order by position and id * add migration * adding pytest repeat plugin * moving pytest-repeat to dev dependency
* add context menu and series certificate button to program as course card Co-authored-by: Copilot <copilot@github.com> * don't need double program enrollment status * Also display certificate link button on program dashboard page Co-authored-by: Copilot <copilot@github.com> * add tests * remove some code duplication Co-authored-by: Copilot <copilot@github.com> * correct program as course card context menu behavior Co-authored-by: Copilot <copilot@github.com> * add tests for context menu in program as course card * fix type check * address sentry feedback about trailing slashes Co-authored-by: Copilot <copilot@github.com> * don't show the unenroll option on crogram cards for verified enrollments Co-authored-by: Copilot <copilot@github.com> * Only specify necessary style overrides on cert button * open program cert links in the same tab Co-authored-by: Copilot <copilot@github.com> * use api cert link in tests too --------- Co-authored-by: Copilot <copilot@github.com>
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Comment on lines
+315
to
+318
| NiceModal.show(UnenrollProgramDialog, { | ||
| title, | ||
| enrollment: resource.readable_id, | ||
| }) |
There was a problem hiding this comment.
Bug: The UnenrollProgramDialog is called with the wrong prop name (enrollment instead of programId) and wrong type (string readable_id instead of numeric id), breaking unenrollment.
Severity: HIGH
Suggested Fix
In ProgramAsCourseCard.tsx, update the call to NiceModal.show(UnenrollProgramDialog, ...). Change the prop enrollment: resource.readable_id to programId: resource.id to match the props expected by the UnenrollProgramDialog component.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/ProgramAsCourseCard.tsx#L315-L318
Potential issue: When a user attempts to unenroll from a program displayed as a course,
the `onClick` handler calls `NiceModal.show` with incorrect props for the
`UnenrollProgramDialog`. It passes a string `resource.readable_id` under the prop name
`enrollment`. The dialog component expects a numeric `programId`. As a result,
`programId` is `undefined` within the dialog, causing the subsequent API call to
`destroyProgramEnrollment.mutateAsync` to fail when the user confirms the action. This
will prevent users from unenrolling from these specific program types.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
Anastasia Beglova
Carey P Gumaer
Shankar Ambady
pre-commit-ci[bot]
renovate[bot]