Skip to content

Remove unused frontend code - #13065

Merged
iHiD merged 1 commit into
mainfrom
remove-unused-frontend-code
Nov 18, 2026
Merged

iHiD merged 1 commit into
mainfrom
remove-unused-frontend-code

Conversation

@iHiD

@iHiD iHiD commented Nov 12, 2026

Copy link
Copy Markdown
Member

This PR removes frontend code that nothing in the app references. Each item was checked against imports (including type imports, barrel re-exports, the @/ alias, dynamic import() and lazy()), pack registrations against Ruby and HAML usage, the jest config, package.json scripts and docs/.

Mount points and their Ruby helpers

  • community-stories-grid: the helper, the pack registration and lazy import, components/community/stories-grid/, components/community/index.ts and the storiesGrid.* keys in the components/community i18n file.
  • profile-avatar-selector: the helper, the pack registration and the lazy import in application.tsx. components/profile/AvatarSelector.tsx stays, because PhotoForm and NewProfileForm use it.
  • ReactComponents::Track::Credits and the .c-react-wrapper-track-credits rule in pages/article.css. No pack registers track-credits, and the views use ReactComponents::Common::Credits.
  • settings-bootcamp-free-coupon-form: the helper, BootcampFreeCouponForm.tsx, its i18n file and its entries in packs/internal.tsx. The form was the only caller of the bootcamp_free_coupon_code API route, so this also removes the route, its controller action, User::GenerateBootcampFreeCouponCode and its test. The bootcamp_free_coupon_code column stays. The affiliate coupon form and its endpoint stay, because the bootcamp dashboard renders the form.

Hooks, utils and other JS

  • The hooks use-stateful-tooltip, use-content-query, use-did-mount-effect, use-logger and use-scroll-to-top, plus their lines in hooks/index.ts.
  • esbuild-helpers/ (7 files).
  • ClientSideTestRunner/jsTestRunner.ts and editor/testComponents/TestList.tsx. The rest of ClientSideTestRunner stays, because Editor.tsx imports it dynamically.
  • channels/index.ts and channels/latestIterationStatusChannel.ts.
  • utils/capitalize.ts, and utils/name-for-locale.ts with its test.
  • common/AccordionHeader.tsx, common/StaticTooltip.tsx, impact/TopLearningCountries.tsx, impact/chart-elements/NumberOfStudentsLabel.tsx, journey/overview/learning-section/LearningStats.tsx, journey/contribution-results/OrderSwitcher.tsx, the track welcome modal's ButtonContainer.tsx, theme-preference-form/DisabledTooltip.tsx, MentoringRequestFormComponents/types.ts, donations/stripe-form/constants.ts and dig-deeper-components/mock-snippet.ts, along with their re-exports, the commented-out JSX that named them and their i18n files or keys.
  • The barrel files components/{community-solutions,journey,notifications,perks,track}/index.ts. components/mentoring/index.ts stays, because a test imports it.
  • The i18n files for components/settings/useSettingsMutation.tsx and components/student/ExerciseStatusDot.tsx (both empty), and components/student/MentoringSession.tsx, whose namespace no component uses.

CSS

  • highlighters/highlightjs-light.css and the commented-out highlighter imports in website.css. highlightjs-dark.css stays, because SerializeHighlightjsTheme reads it by path.
  • components/completed-heading.css, which nothing imports.
  • components/track/concept-nav.css, components/explainer.css, pages/maintaining/track.css, components/mentor-discussion-post-editor.css and components/spinner.css, with their @import lines. No view, component, serializer or markdown renderer uses their classes or IDs.

Follow-up

The Ruby LatestIterationStatusChannel and the broadcast to it in Solution are still in place. Nothing on the frontend subscribes to the channel any more, so a separate PR can remove them.

Checks

yarn i18n-check, yarn test, yarn build and yarn build:css all pass. The user preferences controller tests and the affiliate coupon command test pass.

🤖 Generated with Claude Code

@iHiD
iHiD requested a review from dem4ron as a code owner November 12, 2026 04:15
This removes React mount points, components, hooks, utils, barrel files,
i18n files and CSS that nothing in the app references any more. It also
removes the bootcamp free coupon endpoint and command, because the
deleted form was their only caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ihid-assistant
ihid-assistant Bot force-pushed the remove-unused-frontend-code branch from 403b1a8 to fc9aa96 Compare November 18, 2026 07:07
@iHiD
iHiD merged commit 982cc44 into main Nov 18, 2026
31 checks passed
@iHiD
iHiD deleted the remove-unused-frontend-code branch November 18, 2026 07:16
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.

1 participant