Summary
With the React-based Studio MFE (frontend-app-authoring) now fully handling all Studio pages, the LEGACY_STUDIO_* waffle flags and the API endpoint that served them can be removed from openedx-platform.
Parent epic: (link TBD — openedx/public-engineering)
Frontend sub-task: openedx/frontend-app-authoring#3063
Background
The GET /api/contentstore/v1/course_waffle_flags endpoint was added so the MFE could fetch server-side waffle flag state and conditionally route users to either the new React pages or the legacy Django-rendered Studio pages. That conditional routing is being removed on the frontend side; once shipped, this endpoint will receive zero traffic.
Implementation Details
1. Remove the API endpoint
File: cms/djangoapps/contentstore/rest_api/v1/urls.py
- Remove the URL pattern for
course_waffle_flags
File: cms/djangoapps/contentstore/rest_api/v1/views/course_waffle_flags.py (or equivalent)
- Delete the view class/function
File: cms/djangoapps/contentstore/rest_api/v1/serializers/ (if applicable)
- Delete the
CourseWaffleFlagsSerializer or equivalent
2. Remove waffle flag definitions
File: cms/djangoapps/contentstore/toggles.py
- Delete
LEGACY_STUDIO_* flag constants (e.g., LEGACY_STUDIO_UNIT_PAGE, LEGACY_STUDIO_COURSE_OUTLINE_PAGE, etc.)
- Delete helper functions:
use_new_unit_page(), use_new_course_outline_page(), use_new_home_page(), use_new_updates_page(), use_new_files_uploads_page(), use_new_video_uploads_page(), use_new_certificates_page(), use_new_textbooks_page(), use_new_custom_pages(), use_new_import_page(), use_new_export_page(), use_new_pdf_editor()
3. Clean up callers
Search for all call sites of the removed helper functions and remove them:
cms/djangoapps/contentstore/utils.py — likely has URL-generation helpers conditioned on these flags
cms/djangoapps/contentstore/views/component.py — may gate redirect logic on use_new_unit_page()
- Any remaining Django views that conditionally render legacy templates vs. redirect to MFE
4. Update tests
- Delete tests that specifically exercise the legacy routing paths (they test dead code)
- Remove
override_waffle_flag / @override_waffle_switch decorators that set these flags in test setup
- Update API tests to expect 404 on the removed endpoint
5. OEP-0058 / Toggles annotation cleanup
If any of these flags are listed in cms/djangoapps/contentstore/toggles.rst or annotated via code_owner / toggle_name, remove those entries.
Flags Being Removed
| Python helper |
Waffle flag name |
use_new_home_page() |
contentstore.new_studio_mfe.use_new_home_page |
use_new_course_outline_page() |
contentstore.new_studio_mfe.use_new_course_outline_page |
use_new_unit_page() |
contentstore.new_studio_mfe.use_new_unit_page |
use_new_updates_page() |
contentstore.new_studio_mfe.use_new_updates_page |
use_new_files_uploads_page() |
contentstore.new_studio_mfe.use_new_files_uploads_page |
use_new_video_uploads_page() |
contentstore.new_studio_mfe.use_new_video_uploads_page |
use_new_certificates_page() |
contentstore.new_studio_mfe.use_new_certificates_page |
use_new_textbooks_page() |
contentstore.new_studio_mfe.use_new_textbooks_page |
use_new_custom_pages() |
contentstore.new_studio_mfe.use_new_custom_pages |
use_new_import_page() |
contentstore.new_studio_mfe.use_new_import_page |
use_new_export_page() |
contentstore.new_studio_mfe.use_new_export_page |
use_new_pdf_editor() |
contentstore.new_studio_mfe.use_new_pdf_editor |
Acceptance Criteria
Summary
With the React-based Studio MFE (
frontend-app-authoring) now fully handling all Studio pages, theLEGACY_STUDIO_*waffle flags and the API endpoint that served them can be removed fromopenedx-platform.Parent epic: (link TBD — openedx/public-engineering)
Frontend sub-task: openedx/frontend-app-authoring#3063
Background
The
GET /api/contentstore/v1/course_waffle_flagsendpoint was added so the MFE could fetch server-side waffle flag state and conditionally route users to either the new React pages or the legacy Django-rendered Studio pages. That conditional routing is being removed on the frontend side; once shipped, this endpoint will receive zero traffic.Implementation Details
1. Remove the API endpoint
File:
cms/djangoapps/contentstore/rest_api/v1/urls.pycourse_waffle_flagsFile:
cms/djangoapps/contentstore/rest_api/v1/views/course_waffle_flags.py(or equivalent)File:
cms/djangoapps/contentstore/rest_api/v1/serializers/(if applicable)CourseWaffleFlagsSerializeror equivalent2. Remove waffle flag definitions
File:
cms/djangoapps/contentstore/toggles.pyLEGACY_STUDIO_*flag constants (e.g.,LEGACY_STUDIO_UNIT_PAGE,LEGACY_STUDIO_COURSE_OUTLINE_PAGE, etc.)use_new_unit_page(),use_new_course_outline_page(),use_new_home_page(),use_new_updates_page(),use_new_files_uploads_page(),use_new_video_uploads_page(),use_new_certificates_page(),use_new_textbooks_page(),use_new_custom_pages(),use_new_import_page(),use_new_export_page(),use_new_pdf_editor()3. Clean up callers
Search for all call sites of the removed helper functions and remove them:
cms/djangoapps/contentstore/utils.py— likely has URL-generation helpers conditioned on these flagscms/djangoapps/contentstore/views/component.py— may gate redirect logic onuse_new_unit_page()4. Update tests
override_waffle_flag/@override_waffle_switchdecorators that set these flags in test setup5. OEP-0058 / Toggles annotation cleanup
If any of these flags are listed in
cms/djangoapps/contentstore/toggles.rstor annotated viacode_owner/toggle_name, remove those entries.Flags Being Removed
use_new_home_page()contentstore.new_studio_mfe.use_new_home_pageuse_new_course_outline_page()contentstore.new_studio_mfe.use_new_course_outline_pageuse_new_unit_page()contentstore.new_studio_mfe.use_new_unit_pageuse_new_updates_page()contentstore.new_studio_mfe.use_new_updates_pageuse_new_files_uploads_page()contentstore.new_studio_mfe.use_new_files_uploads_pageuse_new_video_uploads_page()contentstore.new_studio_mfe.use_new_video_uploads_pageuse_new_certificates_page()contentstore.new_studio_mfe.use_new_certificates_pageuse_new_textbooks_page()contentstore.new_studio_mfe.use_new_textbooks_pageuse_new_custom_pages()contentstore.new_studio_mfe.use_new_custom_pagesuse_new_import_page()contentstore.new_studio_mfe.use_new_import_pageuse_new_export_page()contentstore.new_studio_mfe.use_new_export_pageuse_new_pdf_editor()contentstore.new_studio_mfe.use_new_pdf_editorAcceptance Criteria
GET /api/contentstore/v1/course_waffle_flagsreturns 404LEGACY_STUDIO_*toggle constants are removed fromtoggles.pyuse_new_unit_page(), etc.) are deleted with no remaining callers