feat: remove the legacy library viewing and editing page#3080
feat: remove the legacy library viewing and editing page#3080salman2013 wants to merge 5 commits into
Conversation
|
Thanks for the pull request, @salman2013! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3080 +/- ##
==========================================
- Coverage 95.61% 95.55% -0.07%
==========================================
Files 1391 1391
Lines 33075 33057 -18
Branches 7680 7667 -13
==========================================
- Hits 31626 31588 -38
- Misses 1384 1401 +17
- Partials 65 68 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Removes the legacy library (V1) tab, routes, and associated UI from Studio Home. The migration wizard (/libraries-v1/migrate) is preserved to allow users to migrate existing legacy library content to V2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
debb76c to
dfebf78
Compare
The /libraries-v1 route was removed when the legacy library viewing and editing page was removed. The migration wizard exit button was still navigating to that removed route, causing a 404 error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR removes the legacy (v1) libraries experience from Studio Home, leaving only the v2 libraries tab and v2 library creation flow, and updates navigation/tests accordingly.
Changes:
- Removed the legacy libraries tab, route handling, and related props/state.
- Updated migration exit navigation to return to the v2 libraries area.
- Simplified/updated tests to reflect the removal of v1 libraries UI and routes.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/studio-home/tabs-section/index.tsx | Removes legacy libraries tab/state and simplifies tab routing to v2 libraries only. |
| src/studio-home/tabs-section/TabsSection.test.tsx | Deletes legacy libraries tests and updates navigation expectations to /libraries. |
| src/studio-home/hooks.tsx | Stops exposing librariesV1Enabled from the studio home hook. |
| src/studio-home/StudioHome.tsx | Removes v1 library button logic and always navigates to v2 create page. |
| src/studio-home/StudioHome.test.tsx | Removes tests covering v1-only/v2-only button behavior and legacy create navigation. |
| src/legacy-libraries-migration/LegacyLibMigrationPage.tsx | Changes “Exit” navigation target from /libraries-v1 to /libraries. |
| src/legacy-libraries-migration/LegacyLibMigrationPage.test.tsx | Updates expectation for exit navigation to /libraries. |
| src/index.jsx | Removes /libraries-v1 and /libraries-v1/create routes and legacy create import. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Route path="/home" element={<StudioHome />} /> | ||
| <Route path="/libraries" element={<StudioHome />} /> | ||
| <Route path="/libraries-v1" element={<StudioHome />} /> | ||
|
|
||
| <Route path="/libraries-v1/migrate" element={<LegacyLibMigrationPage />} /> | ||
| <Route path="/libraries-v1/create" element={<CreateLegacyLibrary />} /> | ||
| <Route path="/library/create" element={<CreateLibrary />} /> |
There was a problem hiding this comment.
Good suggestion but i believe that as we already deprecated the legacy library with warnings, so now this edge case does not need to fix.
- Inline librariesV2Enabled directly instead of showV2LibraryURL alias - Fall back to courses tab in initTabKeyState when librariesV2Enabled is false, preventing blank tab when /libraries is visited with libraries disabled - Add test for librariesV2Enabled: false to prevent regressions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| @@ -9,7 +9,6 @@ import { getConfig } from '@edx/frontend-platform'; | |||
| import { useIntl } from '@edx/frontend-platform/i18n'; | |||
There was a problem hiding this comment.
The import of BaseFilterState, Filter, and LibrariesList from ./libraries-tab is removed here, but the libraries-tab directory itself does not appear to be deleted in this PR. If nothing else imports from it, this is now dead code. Worth either deleting the directory in this PR or filing a follow-up to keep the codebase clean.
There was a problem hiding this comment.
The libraries-tab directory is still actively used — LegacyLibMigrationPage.tsx imports Filter and LibrariesList from it for the migration
wizard (/libraries-v1/migrate route), which we intentionally preserved. It will be cleaned up in a future PR when the migration wizard itself
is removed (after the platform-side V1 removal tracked in openedx/openedx-platform#38057).
| @@ -75,9 +74,8 @@ const App = () => { | |||
| <Route> | |||
| <Route path="/home" element={<StudioHome />} /> | |||
There was a problem hiding this comment.
Nit: a stray blank line was left where the /libraries-v1 route was removed. Worth cleaning up for readability.
There was a problem hiding this comment.
blank line has removed.
|
Two template housekeeping items: Testing instructions are empty — the "## Testing instructions" section has no content. Given the scope of what changed (tab removed, routes removed, exit navigation updated), reviewers need guidance on how to verify the happy path (V2 tab still works, migration flow still exits correctly) and the removed paths (legacy tab is gone, old routes 404 or redirect). Best Practices Checklist is unchecked — all boxes are |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@kdmccormick, @feanil Just a question should we also remove the Migrate legacy library
The Migrate legacy library page access from the legacy library tab, which has been removed in this PR.
|
This reverts commit 7e05210.
|
I think it makes sense to remove the |


Description
Removes the legacy library (V1) tab, routes, and associated UI from Studio Home. The migration wizard (/libraries-v1/migrate) is preserved to allow users to migrate existing legacy library content to V2.
Testing instructions
** Legacy Library Tab should not show on the studio home page**
** Library Tab (Library v2) should work properly:**
/home)./libraries.Legacy routes are removed:
/libraries-v1— confirm it returns a 404 / "not found" page./libraries-v1/create— confirm it also returns a 404 / "not found" page.Migration wizard exit navigates correctly:
/libraries-v1/migratefor a legacy library./libraries(V2 libraries list), not/libraries-v1.Best Practices Checklist
We're trying to move away from some deprecated patterns in this codebase. Please
check if your PR meets these recommendations before asking for a review:
.ts,.tsx). (N/A — no new files added)propTypesanddefaultPropsin any new or modified code. (N/A — no new props introduced)src/testUtils.tsx(specificallyinitializeMocks) (N/A — existing tests updated, no new test files)apiHooks.tsin this repo for examples. (N/A — no new API calls)messages.tsfiles have adescriptionfor translators to use. (N/A — no new i18n messages)../in import paths. To import from parent folders, use@src, e.g.import { initializeMocks } from '@src/testUtils';instead offrom '../../../../testUtils'(N/A — no new imports added)Settings