feat: migrates Course Optimizer from Redux to React Query. - #3204
feat: migrates Course Optimizer from Redux to React Query.#3204navinkarkera wants to merge 3 commits into
Conversation
|
Thanks for the pull request, @navinkarkera! 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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3204 +/- ##
==========================================
- Coverage 95.93% 95.93% -0.01%
==========================================
Files 1397 1395 -2
Lines 33622 33506 -116
Branches 7700 7696 -4
==========================================
- Hits 32256 32144 -112
+ Misses 1323 1319 -4
Partials 43 43 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I'm not super familiar with the course optimizer code. When this is ready, could you please check the PRs or git blame to see if one of the main authors may want to review it? If they decline and/or in any case, me or Chris can give the necessary ✅ though. |
8c10778 to
2f5c30e
Compare
Replace the optimizer page's Redux state (slice, thunks, selectors) with React Query hooks for all data fetching, polling, and mutation state. Migrate the page and ScanResults components to the new hooks, convert the optimizer test suite to TypeScript, handle stale-operation detection in the hooks layer, and remove the Redux wiring.
After starting a rerun update, poll until the status endpoint reflects the new operation before accepting a terminal result. The backend commits the new operation's status before the POST response returns, so with no cached previous status an immediately terminal response is accepted; a terminal response equal to the cached previous one is rejected until a new status is observed.
2b473b8 to
dc573ba
Compare
Description
This removes the old Redux slice, selectors, and thunks. It also improves scan status polling and stale-result handling.
This affects Course Authors and Instructors who can edit course content. There is no intended UI change.
Supporting information
Testing instructions
/optimizerto url from outline.Best Practices Checklist
.ts,.tsx).propTypesanddefaultPropsin any new or modified code.src/testUtils.tsx.../in import paths.