Skip to content

Remove unused backend helpers - #1510

Merged
skyfallwastaken merged 1 commit into
mainfrom
cleanup/backend-dead-code
Aug 3, 2026
Merged

skyfallwastaken merged 1 commit into
mainfrom
cleanup/backend-dead-code

Conversation

@skyfallwastaken

Copy link
Copy Markdown
Member

Summary of the problem

The backend accumulated isolated helpers and constants that no longer had callers. Keeping these definition-only symbols made the server code harder to navigate and obscured the active implementations.

Describe your changes

  • Remove unused controller and concern helpers for authorization, dashboard data, settings options, and currently-hacking props.
  • Remove unused leaderboard cache, heartbeat import, and import dump client methods.
  • Remove an unused flavor-text method and the authorization constant orphaned by this cleanup.
  • Preserve all routes, middleware, generated code, dynamic entry points, and external HTTP APIs.

Verification included repo-wide direct-reference and dynamic-dispatch searches, a post-rebase symbol scan, and git diff --check. The full bin/ci suite could not run locally because the Amp orb does not provide Docker or Ruby; GitHub Actions is expected to provide full-suite coverage for this PR.

Screenshots / Media

Not applicable; there are no visual changes.

Copilot AI review requested due to automatic review settings August 3, 2026 15:43

Copilot AI 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.

Pull request overview

This PR removes backend helper methods/constants that no longer have any callers, reducing navigation noise and keeping the active server implementation surface area clearer.

Changes:

  • Removed unused “flavor text” and Inertia/shared-props helpers.
  • Simplified service helpers by deleting unused cache/import client methods and an unused heartbeat-counting helper.
  • Removed unused dashboard/settings/auth convenience helpers/constants.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/flavor_text.rb Removes an unused rare_compliment method.
app/services/leaderboard_cache.rb Drops unused timezone key + fetch helpers, leaving only the used read/write/key API.
app/services/heartbeat_import_service.rb Removes an unused count_heartbeats helper (import logic still counts during SAX parsing).
app/services/heartbeat_import_dump_client.rb Removes an unused base_url_for class helper.
app/controllers/settings/base_controller.rb Removes an unused options_props wrapper helper.
app/controllers/inertia_controller.rb Removes an unused currently_hacking_props helper (other callers still invoke the job directly).
app/controllers/concerns/dashboard_data.rb Removes an unused dashboard_filters helper.
app/controllers/concerns/auth_helpers.rb Removes an unused superadmin constant/method, keeping only the used admin helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skyfallwastaken
skyfallwastaken merged commit 0af027e into main Aug 3, 2026
20 checks passed
@skyfallwastaken
skyfallwastaken deleted the cleanup/backend-dead-code branch August 3, 2026 15:47
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.

2 participants