feat: remove the legacy library viewing and editing page#3080
feat: remove the legacy library viewing and editing page#3080salman2013 wants to merge 3 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 />} /> |
- 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>
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
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).propTypesanddefaultPropsin any new or modified code.src/testUtils.tsx(specificallyinitializeMocks)apiHooks.tsin this repo for examples.messages.tsfiles have adescriptionfor translators to use.../in import paths. To import from parent folders, use@src, e.g.import { initializeMocks } from '@src/testUtils';instead offrom '../../../../testUtils'