Remove CompanyController and its layers

What does this MR do?

Removes CompanyController and the associated /users/sign_up/company registration step, which is now dead code.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/593995

Why now?

The company registration step is no longer routed to:

  • The Unified Lightweight Registration (ULWR) feature flags are at 100% rollout, so no new signups hit this step.
  • Existing in-flight users were migrated off the company step_url by the background migrations tracked in https://gitlab.com/gitlab-org/gitlab/-/issues/593994, both of which have finished running on GitLab.com.

The first backfill (!238748 (merged)) matched step_url by exact string equality and so missed the rows stored with query params (/users/sign_up/company/new?glm_source=...). A prefix-match follow-up (!253722 (merged)) picked those up; a LIKE '/users/sign_up/company%' check on postgres.ai now returns zero rows (https://gitlab.com/gitlab-org/gitlab/-/issues/593994#note_3877111927).

Removing the controller/route strands no one.

Deleted files

  • ee/app/controllers/registrations/company_controller.rb (+ controller spec)
  • ee/app/views/registrations/company/new.html.haml (+ view spec)
  • ee/app/helpers/registrations/company_helper.rb (+ helper spec)
  • ee/app/services/gitlab_subscriptions/create_company_lead_service.rb (+ spec)
  • ee/app/assets/javascripts/pages/registrations/company/new/index.js (JS entrypoint)
  • ee/app/assets/javascripts/registrations/components/company_form.vue (+ frontend spec)
  • ee/spec/features/trial_registrations/company_information_spec.rb

Modified files

  • ee/config/routes/user.rb — removed the resource :company route
  • Regenerated route snapshots (both have CI freshness checks), via their rake tasks:
    • ee/app/assets/javascripts/lib/utils/path_helpers/user.js (gitlab:js:routes)
    • config/routing/gitlab_routes.json (gitlab:cells:routes:generate)
  • Snowplow tracking-verification fixtures trial_regular_signup.yml / trial_sso_signup.yml — removed company page-view and Registrations::CompanyController events
  • ee/spec/support/helpers/saas_registration_helpers.rb — removed the now-orphaned company-form helpers (including company_params, which has no callers left) that mocked CreateCompanyLeadService
  • ee/spec/requests/ee/application_controller_spec.rb — repointed the non-GET onboarding-redirect example from the removed company path to users_sign_up_groups_path, preserving the generic "non-GET requests skip the redirect" coverage
  • ee/app/assets/javascripts/google_tag_manager/index.js (+ spec) — removed the now-dead trackCompanyForm helper (only company_form.vue used it)
  • locale/gitlab.pot — regenerated; the deleted view/component were the last users of a few company/trial strings
  • ee/app/assets/stylesheets/pages/company/new.scss + _index.scss @import — removed the orphaned company stylesheet
  • doc/development/registration_architecture.md — removed the CompanyController bullet
  • Tooling/cleanup entries referencing the deleted files:
    • scripts/verify-tff-mapping
    • .dependency_cruiser_todo/no-imports-from-entrypoints.mjs
    • .rubocop_todo/rspec/rails_controller_testing.yml
    • .rubocop_todo/rspec/example_without_description.yml
    • spec/support/rspec_order_todo.yml (two entries)

Note: several of the modified/tooling files above weren't in the issue's original file list — the issue notes that list "may not be comprehensive." The diff is broader than the issue for that reason.

Out of scope (intentionally left)

Per the issue's scope clarification, this MR does not remove:

  • The onboarding show_company_form_* / redirect_to_company_form? methods, their specs, and status-presenter delegation
  • Onboarding::StatusStepUpdateService (+ spec) — its only caller was CompanyController

These become dead code as a result of this MR and are tracked for removal in #630342.

Note: the AutomaticTrialRegistration model itself stays. It is still returned by Onboarding::UserStatus#registration_type for the free-to-trial conversion path; only its two company-form predicate overrides are dead.

Verification

This is a pure removal. The redirect logic never invoked redirect_to_company_form?, so no live flow targeted the removed endpoint.

Other notes

  • All changes are in ee/.
  • Commit carries Changelog: removed and EE: true.

Why pipeline:skip-router-sync

The paired router MR gitlab-org/cells/http-router!1356 (merged) is merged, but the gate still fails: router main is ahead of master by seven routes pre-landed for other in-flight MRs, so its snapshot matches no GitLab ref. Nothing on this branch can close that gap — cells-routes:up-to-date validates the snapshot against the Rails route table. Removal-only, no routing rule needed.

MR acceptance checklist

  • Backend maintainer review (Ruby: controller/service/helper/route removal)
  • Frontend maintainer review (JS/Vue entrypoint and component removal, HAML view removal)
Edited by David Hamp-Gonsalves

Merge request reports

Loading
Loading