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_urlby 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 theresource :companyroute- 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 andRegistrations::CompanyControllerevents ee/spec/support/helpers/saas_registration_helpers.rb— removed the now-orphaned company-form helpers (includingcompany_params, which has no callers left) that mockedCreateCompanyLeadServiceee/spec/requests/ee/application_controller_spec.rb— repointed the non-GET onboarding-redirect example from the removed company path tousers_sign_up_groups_path, preserving the generic "non-GET requests skip the redirect" coverageee/app/assets/javascripts/google_tag_manager/index.js(+ spec) — removed the now-deadtrackCompanyFormhelper (onlycompany_form.vueused it)locale/gitlab.pot— regenerated; the deleted view/component were the last users of a few company/trial stringsee/app/assets/stylesheets/pages/company/new.scss+_index.scss@import— removed the orphaned company stylesheetdoc/development/registration_architecture.md— removed theCompanyControllerbullet- 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.ymlspec/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 wasCompanyController
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: removedandEE: 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)