Skip to content

Remove Ruby code that nothing references - #13064

Merged
iHiD merged 2 commits into
mainfrom
remove-unused-ruby-code
Nov 18, 2026
Merged

iHiD merged 2 commits into
mainfrom
remove-unused-ruby-code

Conversation

@iHiD

@iHiD iHiD commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

This PR removes Ruby code that nothing in the app references any more. I checked each item by its full constant, its short name, its method name and its snake_case form across app, lib, config, db, bin, scripts, docs and test. Only its own tests referenced each one.

Removed items:

  • Solution::SearchCommunitySolutions and its test. Solution::SearchViaRepresentations replaced it in Representation search UI #6123. The destroy-account test used it to check the solution index, so that test now reads the index document directly with get_opensearch_doc.
  • Submission::Analysis::Cancel and Submission::Representation::Cancel and their tests. ToolingJob::Cancel replaced both in 2020.
  • Github::Team and its test. Github::TeamMember replaced it in Store github team members #3271.
  • SerializeSubmissions and its test. Its last caller went when the iteration block moved to React in Move iteration block in exercise page to React #552.
  • SerializeMentorDiscussionsForStudent and its test. Its last caller went with the new solution timeline in Add a new solution timeline #6492.
  • SerializeAuthorOrContributors and its test. Its last caller went with the build page changes in Improve build page #6443.
  • lib/http_authentication_token.rb, its test and its require in the Rack::Attack initializer. Rack::Attack has matched the Bearer header with its own regex since 0fa9488.
  • LayoutHelper#css_packs. Its last caller went with the Rails 7 tooling upgrade in Upgrade to Rails 7 and latest JS/CSS Tooling #2290.
  • EmailHelper#email_button_to, which was the only method in EmailHelper. This removes the empty helper file and the helper :email line in ApplicationMailer.
  • ViewComponents::Concept and ViewComponents::ConceptProgressBar. Their last callers went in the 2021 journey and track page reworks.
  • ViewComponents::Tab. Its last caller went when the journey page was unified in Unify journey page #933. The .c-tab CSS stays, because other markup uses it.
  • ViewComponents::DonateWithCrypto and its components.donate_with_crypto locale key. Its last caller went when the crypto donation option was removed in Remove crypto donation option #7082.
  • ViewComponents::UserActivity, its components/user_activities templates and their locale file. Its last caller went when the track feed was reworked in Rework the track feed #473. The User::Activity models and their STI locale files in config/locales/user_activities/ stay.
  • nav_dropdown_tracks_view, nav_dropdown_mentoring_view and nav_dropdown_challenge_48in24_view in NavSubmenus, with the components.nav_submenus.views locale key. The nav renders layouts/nav/<view> templates through nav_dropdown_view instead.
  • app/views/layouts/nav/challenge_48in24.html.haml and its layouts.nav.challenge_48in24 locale keys. No nav item names that view any more.
  • SendUserMailshotJob and its test. Nothing has ever enqueued it. Mailshots go out through Mailshot::SendToAudienceSegment, which calls User::Mailshot::Send directly. The old console recipe at the top of User::Mailshot::Send goes too.

This also removes the entries for the deleted tests from .github/test-timings.json.

🤖 Generated with Claude Code

iHiD and others added 2 commits November 18, 2026 16:01
This removes commands, serializers, view components, helpers and
templates whose last callers went in earlier refactors, along with
their tests and the locale keys only they used. The destroy-account
test now checks the solution search index directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing has ever enqueued this job. Mailshots are sent from the admin
pages through Mailshot::SendToAudienceSegment, which calls
User::Mailshot::Send directly. This also removes the old console recipe
at the top of User::Mailshot::Send, which passed a slug from before
mailshots were stored in the database.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ihid-assistant
ihid-assistant Bot force-pushed the remove-unused-ruby-code branch from 446ae10 to 336cf44 Compare November 18, 2026 07:01
@iHiD
iHiD merged commit 5382f12 into main Nov 18, 2026
31 checks passed
@iHiD
iHiD deleted the remove-unused-ruby-code branch November 18, 2026 07:06
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