Skip to content

Remove dead PD components and react-with-context dep#73407

Open
levadadenys wants to merge 2 commits into
stagingfrom
claude/funny-pasteur-tkaqn4
Open

Remove dead PD components and react-with-context dep#73407
levadadenys wants to merge 2 commits into
stagingfrom
claude/funny-pasteur-tkaqn4

Conversation

@levadadenys

Copy link
Copy Markdown
Contributor

Summary

Three source files under apps/src/code-studio/pd/ are not imported anywhere in the repo. Removing them, plus the react-with-context dependency that only the third one used.

Files removed

  • apps/src/code-studio/pd/professional_learning/SelfPacedPLCatalogExpandedCard.tsx (145 LOC) — sibling SelfPacedPLCatalogCard.tsx is 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-context was imported only by reactRouterStoryDecorator.jsx. Removed from apps/package.json, apps/yarn.lock, and .github/actions/assign-dependabot-reviewer/config/reviewers.mjs. The transitive react@^15.6.2 block 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.
  • Confirmed the files are not registered as webpack entries in apps/webpackEntryPoints.js and not matched by Storybook globs in apps/.storybook/main.js.
  • Confirmed no Ruby/HAML/ERB references in dashboard/.
  • react-with-context confirmed used only by reactRouterStoryDecorator.jsx. react@^15.6.2 in yarn.lock confirmed 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

  • CI passes (drone)
  • No Storybook regressions
  • No PD page regressions on the Self-Paced PL catalog or workshop signup flows

Generated by Claude Code

- 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
@levadadenys levadadenys requested a review from a team as a code owner June 23, 2026 08:16

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

https://github.com/code-dot-org/code-dot-org/blob/decee59c413c39c61719e5daa4e67a9f74102392/apps/yarn.lock#L26379
P1 Badge 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".

@github-actions

Copy link
Copy Markdown

🖼️ 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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What component does the PL catalog use now?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 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 sureshc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this changes anything that Infrastructure cares about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants