chore: Remove product page feature flag#3501
Merged
ChristopherChudzicki merged 2 commits intoJun 24, 2026
Merged
Conversation
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
f7f0d98 to
d5fcf78
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the MITx Online product-page feature flag plumbing from the Next.js frontend, simplifying routing/CTA behavior now that product pages are treated as the default.
Changes:
- Removed
MitxOnlineProductPagesfrom theFeatureFlagsenum and eliminated all feature-flag checks/gating tied to it. - Updated resource CTA URL logic to stop rewriting MITx Online URLs and instead use
resource.urldirectly (while keeping existing OCW/podcast behavior). - Updated product page and dashboard UI tests/components to align with always-on product pages.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontends/main/src/page-components/LearningResourceExpanded/CallToActionSection.tsx | Removes MITx Online product-page flag branching and relies on resource.url for MITx Online resources. |
| frontends/main/src/page-components/LearningResourceExpanded/CallToActionSection.test.tsx | Updates CTA URL/UTM expectations to reflect no MITx Online URL rewriting. |
| frontends/main/src/common/feature_flags.ts | Removes MitxOnlineProductPages flag constant. |
| frontends/main/src/app-pages/ProductPages/ProgramPage.tsx | Removes flag gating; page renders (or notFound) based on data presence only. |
| frontends/main/src/app-pages/ProductPages/ProgramPage.test.tsx | Removes tests asserting flag-gated notFound behavior. |
| frontends/main/src/app-pages/ProductPages/ProgramAsCoursePage.tsx | Removes flag gating; page renders (or notFound) based on data presence only. |
| frontends/main/src/app-pages/ProductPages/ProgramAsCoursePage.test.tsx | Removes flag mock setup tied to the removed gating. |
| frontends/main/src/app-pages/ProductPages/CoursePage.tsx | Removes flag gating; retains other feature flags (e.g., course outline section). |
| frontends/main/src/app-pages/ProductPages/CoursePage.test.tsx | Removes tests/mocks related to the removed gating. |
| frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/ProgramAsCourseCard.tsx | Always links “View Course Details” to product pages (no flag-based legacy link). |
| frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/ProgramAsCourseCard.test.tsx | Simplifies tests to assert product-page details link unconditionally. |
zamanafzal
approved these changes
Jun 23, 2026
zamanafzal
left a comment
Contributor
There was a problem hiding this comment.
LGTM. I have verified changes locally.
Product pages render without the feature flag. Confirmed the following load correctly:
/courses/course-v1:MITxT+0.003x
/programs/program-v1:MITx+DEDP
/courses/p/program-v1:UAI+B2C.1
…rite CallToActionSection rewrote MITx Online course/program URLs to Learn product-page paths client-side (coursePageView/programPageView). The backend MITx Online ETL now populates resource.url with those same Learn product URLs (gated on has_product_page), so the rewrite is a duplicate. Drop the MITx Online branch in getResourceUrl and let those resources fall through to resource.url like every other resource. The result is behavior-preserving for published resources (same path, same-origin so still internal/no-UTM and client-navigated), and resources without a product page now correctly get no link rather than a dead product-page path derived from readable_id. ProgramAsCourseCard keeps its programPageView rewrite: its data comes straight from the MITx Online dashboard API and has no resource.url. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d5fcf78 to
260d5cc
Compare
This was referenced Jun 24, 2026
Closed
Closed
Closed
Merged
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.
What are the relevant tickets?
Part of https://github.com/mitodl/hq/issues/11286
Description (What does it do?)
Removes product page feature flags
How can this be tested?