Skip to content

Remove the account merger interface - #1684

Merged
skyfallwastaken merged 1 commit into
mainfrom
remove-account-merger
Sep 6, 2026
Merged

skyfallwastaken merged 1 commit into
mainfrom
remove-account-merger

Conversation

@skyfallwastaken

@skyfallwastaken skyfallwastaken commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary of the problem

Account merges are now performed through the Rails console, so the web interface is redundant and exposes a destructive workflow that is no longer used.

Describe your changes

Remove the Account Merger controller, routes, navigation entry, Inertia page and its controller and system tests.

This is PR 1 of 3 in a stacked change. The next PR is #1685.

Screenshots / Media

Not applicable. The interface is removed.

@greptile-apps

greptile-apps Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the ultraadmin account-merger routes, navigation entry, Inertia page, controller and associated tests. However, the deleted controller also owns the only implementation of the underlying merge operation, so the proposed Rails-console replacement is not present in this revision.

  • Removes the destructive account-merger web surface.
  • Removes its route exports and ultraadmin navigation entry.
  • Removes both controller and browser coverage.
  • Also removes the transactional account-merging implementation without a console-callable replacement.

Confidence Score: 4/5

This PR is not safe to merge until the underlying account-merge operation is preserved in a console-callable owner or an equivalent replacement is included.

The route and UI removal is internally consistent, but deleting the controller also deletes the only coordinated implementation for transferring account data, revoking credentials and deleting the superseded user, leaving the stated console workflow unavailable in this revision.

Files Needing Attention: app/controllers/admin/account_merger_controller.rb

Important Files Changed

Filename Overview
app/controllers/admin/account_merger_controller.rb Deletes both the HTTP interface and the repository's sole transactional account-merge implementation.
config/routes.rb Cleanly removes the ultraadmin account-merger page, search and merge routes.
app/controllers/inertia_controller.rb Removes the obsolete account-merger entry from ultraadmin navigation.
app/javascript/pages/Admin/AccountMerger.svelte Removes the corresponding destructive Inertia and Svelte interface.
test/controllers/admin/account_merger_controller_test.rb Removes controller coverage together with the implementation it exercised.
test/system/admin/account_merger_test.rb Removes end-to-end coverage for the deleted web workflow.

Comments Outside Diff (1)

  1. app/controllers/admin/account_merger_controller.rb

    P1 Merge Operation Removed

    Removing this controller also removes the repository's only implementation of the account merge operation, not just its web interface. The deleted methods handled the transaction that transfers heartbeats, goals and API keys, reconciles import sources, revokes credentials and deletes the newer account. No service, model method, task or console command preserves that operation in this revision, so operators cannot perform the stated Rails-console merge safely. Preserve the operation in a console-callable owner before deleting the controller.

    Knowledge Base Used: User identity and account lifecycle

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: app/controllers/admin/account_merger_controller.rb
    Line: 60-108
    
    Comment:
    **Merge Operation Removed**
    
    Removing this controller also removes the repository's only implementation of the account merge operation, not just its web interface. The deleted methods handled the transaction that transfers heartbeats, goals and API keys, reconciles import sources, revokes credentials and deletes the newer account. No service, model method, task or console command preserves that operation in this revision, so operators cannot perform the stated Rails-console merge safely. Preserve the operation in a console-callable owner before deleting the controller.
    
    **Knowledge Base Used:** [User identity and account lifecycle](https://app.greptile.com/mahadk/-/custom-context/knowledge-base/hackclub/hackatime/-/docs/user-identity-and-account-lifecycle.md)
    
    ---
    
    For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Prompt To Fix All With AI
### Issue 1
app/controllers/admin/account_merger_controller.rb:60-108
**Merge Operation Removed**

Removing this controller also removes the repository's only implementation of the account merge operation, not just its web interface. The deleted methods handled the transaction that transfers heartbeats, goals and API keys, reconciles import sources, revokes credentials and deletes the newer account. No service, model method, task or console command preserves that operation in this revision, so operators cannot perform the stated Rails-console merge safely. Preserve the operation in a console-callable owner before deleting the controller.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "Remove the account merger interface" | Re-trigger Greptile

@skyfallwastaken
skyfallwastaken merged commit a216002 into main Sep 6, 2026
19 checks passed
@skyfallwastaken
skyfallwastaken deleted the remove-account-merger branch September 6, 2026 12:04
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