Skip to content

Release 0.65.5#3279

Merged
odlbot merged 4 commits into
releasefrom
release-candidate
May 4, 2026
Merged

Release 0.65.5#3279
odlbot merged 4 commits into
releasefrom
release-candidate

Conversation

@odlbot
Copy link
Copy Markdown
Contributor

@odlbot odlbot commented May 1, 2026

Carey P Gumaer

Danielle Frappier

gumaerc and others added 4 commits May 1, 2026 10:17
* temporarily switch to development build of mitxonline-api-clients

* add the language options dropdown to the b2b contract page

Co-authored-by: Copilot <copilot@github.com>

* add language picker functionality to B2C programs in the dashboard

Co-authored-by: Copilot <copilot@github.com>

* add language_options to the course factory

* swap out static text on the b2b contract and b2c program pages based on language selection

Co-authored-by: Copilot <copilot@github.com>

* add tests to ensure language picker isn't shown when there is only one option

* switch back to official API package

* fix nextjs build errer

Co-authored-by: Copilot <copilot@github.com>

* fix typecheck error

* wrap enrollment re-fetch in try catch

Co-authored-by: Copilot <copilot@github.com>

* add missing diacritics in static translations

Co-authored-by: Copilot <copilot@github.com>

* use SimpleSelectField for accessible label

Co-authored-by: Copilot <copilot@github.com>

* fix language select label display issue after moving to simpleselectfield with label prop and fix order mapping issue

Co-authored-by: Copilot <copilot@github.com>

* add error handling to enrollment re-fetch

Co-authored-by: Copilot <copilot@github.com>

* add error handling to enrollment refetch in just in time dialog

Co-authored-by: Copilot <copilot@github.com>

* fix flaky test pattern

Co-authored-by: Copilot <copilot@github.com>

* use copied array instead of in-place sort

Co-authored-by: Copilot <copilot@github.com>

* language picker should not be shown if there is only one option

Co-authored-by: Copilot <copilot@github.com>

* add a test to mke sure b2b contract runs are still enrollable when they should be

* fix flaky test

* flaky test fix attempt 2

Co-authored-by: Copilot <copilot@github.com>

* strip out static translations

Co-authored-by: Copilot <copilot@github.com>

* move the language selection dropdown on b2b contract pages for the top and use it in every program on the page

Co-authored-by: Copilot <copilot@github.com>

* correct tests based on new b2b page language dropdown location

* correct spelling for latin american spanish

* auto-width for the dropdown

Co-authored-by: Copilot <copilot@github.com>

* get rid of url rewriting in dashboard card that was added as a debugging step originally

Co-authored-by: Copilot <copilot@github.com>

* simplify language run resolution

Co-authored-by: Copilot <copilot@github.com>

* fix unenrolled run selection for languages and add some hopefully reasonable comments

Co-authored-by: Copilot <copilot@github.com>

* fix brittle ordering tests

Co-authored-by: Copilot <copilot@github.com>

* update comment on getResolvedRunForSelectedLanguage to be more relevant

* add a debug marker for synthetic course runs

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
…#3253)

* fix: wrap My Learning course/module titles in heading tags for screen reader accessibility

* fix Prettier issue

* test: assert h3 heading level in dashboard course/program title tests

* fix: use h4 for module titles nested under ProgramAsCourseCard
#3276)

* use the new courseware_url on language_options, filter language_options course runs by is_enrollable

Co-authored-by: Copilot <copilot@github.com>

* fix is_enrollable check, add back in synthetic run with courseware_url because it's still necessary

Co-authored-by: Copilot <copilot@github.com>

* fix test

* move back to released mitxonline api client

* fix ts error

* fix typecheck

* remove unnecessary refetching of enrollments from JIT dialog

Co-authored-by: Copilot <copilot@github.com>

* remove more unnecessary refetching of enrollments

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Comment on lines 844 to 850
const isContractPageResource = Boolean(b2bContractId)

const hasEnrollableRuns = isCourse
? (resource.data.courseruns ?? []).some((run) => run.is_enrollable)
? (courseRun?.is_enrollable ?? false)
: true

const disableEnrollment = isCourse && !hasEnrollableRuns
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The enrollment button may be incorrectly disabled for courses with a contractId if no runs match that contract, even when other enrollable runs are available.
Severity: MEDIUM

Suggested Fix

The calculation for hasEnrollableRuns should be decoupled from the getBestRun logic when a contractId is present. Instead, it should check if any of the course's runs are enrollable, similar to the original implementation: (resource.data.courseruns ?? []).some((run) => run.is_enrollable). This ensures the button's visibility is not incorrectly tied to the contract-specific run selection.

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/DashboardCard.tsx#L844-L850

Potential issue: The logic to determine if a course has enrollable runs has been
changed. Previously, it checked if any run within a course was enrollable. The new logic
uses `getBestRun` with `enrollableOnly: true` and a `contractId`. If a `contractId` is
provided but there are no enrollable runs matching that specific contract, `getBestRun`
returns `undefined`. This causes the `hasEnrollableRuns` flag to become `false`,
disabling the enrollment button, even if other enrollable runs (not matching the
contract) exist for the course. This is a regression from the previous behavior.

Did we get this right? 👍 / 👎 to inform future reviews.

@odlbot odlbot merged commit f06f71b into release May 4, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants