Skip to content

chore: Remove product page feature flag#3501

Merged
ChristopherChudzicki merged 2 commits into
mainfrom
cc/remove-feature-flag-mitxonline-product-pages
Jun 24, 2026
Merged

chore: Remove product page feature flag#3501
ChristopherChudzicki merged 2 commits into
mainfrom
cc/remove-feature-flag-mitxonline-product-pages

Conversation

@ChristopherChudzicki

Copy link
Copy Markdown
Contributor

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?

  1. Check product pages load
  2. Check that MITxOnline resources in the resource drawer still point to the product pages

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown

OpenAPI Changes

No changes detected

View full changelog

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

@ChristopherChudzicki ChristopherChudzicki force-pushed the cc/remove-feature-flag-mitxonline-product-pages branch from f7f0d98 to d5fcf78 Compare June 18, 2026 18:47
@ChristopherChudzicki ChristopherChudzicki marked this pull request as ready for review June 18, 2026 20:59
Copilot AI review requested due to automatic review settings June 18, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 MitxOnlineProductPages from the FeatureFlags enum 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.url directly (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 zamanafzal self-assigned this Jun 22, 2026

@zamanafzal zamanafzal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

ChristopherChudzicki and others added 2 commits June 24, 2026 12:03
…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>
@ChristopherChudzicki ChristopherChudzicki force-pushed the cc/remove-feature-flag-mitxonline-product-pages branch from d5fcf78 to 260d5cc Compare June 24, 2026 16:04
@ChristopherChudzicki ChristopherChudzicki merged commit d3716bf into main Jun 24, 2026
13 checks passed
@ChristopherChudzicki ChristopherChudzicki deleted the cc/remove-feature-flag-mitxonline-product-pages branch June 24, 2026 18:57
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