Remove dead PD components and react-with-context dep#73407
Conversation
- SelfPacedPLCatalogExpandedCard.tsx, schoolAutocompleteDropdownWithCustomFields.jsx, and reactRouterStoryDecorator.jsx had zero importers across the repo. - reactRouterStoryDecorator was the sole consumer of react-with-context, so drop the dependency from apps/package.json, apps/yarn.lock, and the dependabot reviewer routing config. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeCLZBHWrhTag4P5yd874H
There was a problem hiding this comment.
💡 Codex Review
https://github.com/code-dot-org/code-dot-org/blob/decee59c413c39c61719e5daa4e67a9f74102392/apps/yarn.lock#L26379
Regenerate the lockfile after dropping react-with-context
On CI/Docker builds that run CI=true yarn install --immutable --silent (k8s/docker/code-dot-org.dockerfile:105), this stale lockfile now aborts. I ran node .yarn/releases/yarn-4.12.0.cjs install --immutable; Yarn's help says --immutable aborts if the lockfile would be modified, and it wants to remove create-react-class@npm:^15.6.0 from the combined create-react-class descriptor left behind after this React 15 entry was deleted, so the build fails before tests. Regenerate apps/yarn.lock so that descriptor no longer includes ^15.6.0.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🖼️ Storybook Visual Comparison Report✅ No Storybook eyes differences detected! |
The previous commit removed react@^15.6.2 from yarn.lock but left ^15.6.0 in the combined create-react-class descriptor. react@^15.6.2 was the only consumer of that range, so `yarn install --immutable` (used by k8s/docker/code-dot-org.dockerfile) aborts. Drop the orphaned range — verified `yarn install --mode=update-lockfile` now completes without further lockfile mutations. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeCLZBHWrhTag4P5yd874H
There was a problem hiding this comment.
What component does the PL catalog use now?
There was a problem hiding this comment.
🎉 we tried to remove this last year but hit some blockers. I did a quick check and I think those blockers were cleared so I'm so excited to get rid of this!
sureshc
left a comment
There was a problem hiding this comment.
I don't think this changes anything that Infrastructure cares about.
Summary
Three source files under
apps/src/code-studio/pd/are not imported anywhere in the repo. Removing them, plus thereact-with-contextdependency that only the third one used.Files removed
apps/src/code-studio/pd/professional_learning/SelfPacedPLCatalogExpandedCard.tsx(145 LOC) — siblingSelfPacedPLCatalogCard.tsxis the live variant; the "Expanded" one has no importers.apps/src/code-studio/pd/components/schoolAutocompleteDropdownWithCustomFields.jsx(144 LOC) — no importers.apps/src/code-studio/pd/reactRouterStoryDecorator.jsx(18 LOC) — Storybook decorator that was never registered in.storybook/and never imported by any story.Dependency removed
react-with-contextwas imported only byreactRouterStoryDecorator.jsx. Removed fromapps/package.json,apps/yarn.lock, and.github/actions/assign-dependabot-reviewer/config/reviewers.mjs. The transitivereact@^15.6.2block in the lockfile was orphaned by this change and removed as well.Verification
For each deleted file I ran:
rg "<basename>" apps/ frontend/ dashboard/ lib/ shared/— only matched self-references inside the file.rg "from ['\"].*<basename>['\"]"— zero matches.apps/webpackEntryPoints.jsand not matched by Storybook globs inapps/.storybook/main.js.dashboard/.react-with-contextconfirmed used only byreactRouterStoryDecorator.jsx.react@^15.6.2inyarn.lockconfirmed to have no other dependents.Pre-commit hook (lint) passes. Typecheck not runnable in this container (no
node_modules); needs CI to confirm.Test plan
Generated by Claude Code