Skip to content

chore(content-server): remove unreachable Backbone code - #21073

Open
vbudhram wants to merge 1 commit into
mainfrom
fxa-14372
Open

chore(content-server): remove unreachable Backbone code#21073
vbudhram wants to merge 1 commit into
mainfrom
fxa-14372

Conversation

@vbudhram

Copy link
Copy Markdown
Contributor

Because

  • 34 files under packages/fxa-content-server/app/scripts are not reachable from either webpack entry. Nothing in server/, Gruntfile.js, grunttasks/, or webpack.config.js refers to them.
  • Most are leftovers from when Settings lived in content-server.
  • This is a warm-up step for the Backbone removal series. No behaviour change, no feature flag.

This pull request

  • Deletes 24 unreachable modules and templates from app/scripts.
  • Deletes the 9 matching spec files under app/tests/spec and their require lines in app/tests/test_start.js.
  • Keeps 10 of the 34 files the ticket names. Reasons are below.

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14372

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • Key files/areas to focus on: the table of kept files below. Everything else is a plain deletion.
  • Suggested review order: read the table, then app/tests/test_start.js, then skim the deletions.
  • Risky or complex parts: this codebase imports views by string, for example createViewHandler('pair/index'). A static import graph misses those, so I grepped each basename across app/, server/, Gruntfile.js, grunttasks/, and webpack.config.js.

Screenshots (Optional)

No user interface change.

Other information (Optional)

Ten of the 34 files stay. Each one still has a live referrer:

File Why it stays
lib/channels/null.js, lib/channels/receivers/null.js, lib/channels/senders/null.js spec/lib/channels/duplex.js, spec/lib/channels/notifier.js, and spec/models/auth_brokers/fx-ios-v1.js import them. Those specs cover live code, and editing them is out of scope here.
lib/jquery.js It is an entry item in webpack.config.js under appDependencies, and it sets window.jQuery and window.$ for modal and chosen-js. Deleting it breaks the build.
models/attached-client.js spec/models/user.js and spec/models/account.js import it. Both are specs for live models.
lib/glean/accountBanner.js, accountPref.js, deleteAccount.js, error.js, promoQrMobile.js Generated from fxa-shared/metrics/glean/fxa-ui-pings.yaml and fxa-ui-metrics.yaml. The same yaml generates fxa-shared/metrics/glean/web/index.ts, which defines all five categories, and fxa-settings uses them. The yaml cannot change, so these files come back on the next yarn glean-generate.

The ticket asked for the glean yaml definitions to be removed too. I left the yaml alone for the reason above. Whoever owns the Backbone removal series can pick these ten up separately.

Verification:

  • NODE_ENV=production grunt build in packages/fxa-content-server passes. It runs grunt then webpack, so a missing template or module is a hard failure. This is the main evidence.
  • npx nx lint fxa-content-server passes. The lint target runs lint-glean first, so the glean yaml is clean.
  • npx tsc --noEmit in packages/fxa-content-server passes.
  • npx nx build fxa-content-server does not complete. It fails in payments-stripe:build-ts and payments-metrics:glean-lint, which fail the same way without this change. I ran the content-server build script directly instead.
  • content-server has no test-unit target, and the Backbone mocha suite under app/tests does not run in CI.

Expect the extract check to go red. It fails on any pull request that changes extractable strings: the extraction succeeds, then the "New changes found, adding reviewer" branch calls gh and gets HTTP 401. This pull request deletes templates. The break is in the infrastructure, not here.

## Because

- 34 files under `packages/fxa-content-server/app/scripts` are not reachable from either webpack entry. Nothing in `server/`, `Gruntfile.js`, `grunttasks/`, or `webpack.config.js` refers to them.
- Most are leftovers from when Settings lived in content-server.
- This is a warm-up step for the Backbone removal series. No behaviour change, no feature flag.

## This pull request

- Deletes 24 unreachable modules and templates from `app/scripts`.
- Deletes the 9 matching spec files under `app/tests/spec` and their `require` lines in `app/tests/test_start.js`.
- Keeps 10 of the 34 files the ticket names. Reasons are below.

## Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-14372
@vbudhram
vbudhram requested a review from a team as a code owner August 19, 2026 17:52
Copilot AI balanced review requested due to automatic review settings August 19, 2026 17:52
@vbudhram vbudhram added the auto label Aug 19, 2026

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

Removes unreachable legacy Backbone code from fxa-content-server as preparation for broader Backbone removal.

Changes:

  • Deletes 24 unused modules and templates.
  • Deletes nine associated specs.
  • Removes deleted specs from the test bootstrap.

Reviewed changes

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

Show a summary per file
File Description
app/tests/test_start.js Removes deleted spec imports.
app/tests/spec/views/mixins/signed-out-notification-mixin.js Deletes obsolete spec.
app/tests/spec/views/mixins/session-verified-notification-mixin.js Deletes obsolete spec.
app/tests/spec/views/mixins/modal-panel-mixin.js Deletes obsolete spec.
app/tests/spec/views/mixins/last-checked-time-mixin.js Deletes obsolete spec.
app/tests/spec/views/mixins/email-autocomplete-domains-mixin.js Deletes obsolete spec.
app/tests/spec/views/mixins/account-by-uid-mixin.js Deletes obsolete spec.
app/tests/spec/models/security-events.js Deletes obsolete spec.
app/tests/spec/models/email.js Deletes obsolete spec.
app/tests/spec/models/attached-clients.js Deletes obsolete spec.
app/scripts/views/sub_panels.js Deletes unused panel view.
app/scripts/views/mixins/upgrade-session-redirect-mixin.js Deletes unused mixin.
app/scripts/views/mixins/signed-out-notification-mixin.js Deletes unused mixin.
app/scripts/views/mixins/settings-panel-mixin.js Deletes unused mixin.
app/scripts/views/mixins/session-verified-notification-mixin.js Deletes unused mixin.
app/scripts/views/mixins/recovery-key-mixin.js Deletes unused mixin.
app/scripts/views/mixins/modal-panel-mixin.js Deletes unused mixin.
app/scripts/views/mixins/last-checked-time-mixin.js Deletes unused mixin.
app/scripts/views/mixins/email-autocomplete-domains-mixin.js Deletes unused mixin.
app/scripts/views/mixins/account-by-uid-mixin.js Deletes unused mixin.
app/scripts/views/elements/recovery-key-input.js Deletes unused input adapter.
app/scripts/templates/sub_panels.mustache Deletes unused template.
app/scripts/templates/settings/account_recovery/recovery_key_print_template.mustache Deletes unused recovery template.
app/scripts/templates/settings/account_recovery/confirm_password.mustache Deletes unused settings template.
app/scripts/templates/security_events.mustache Deletes unused Backbone template.
app/scripts/templates/pp.mustache Deletes unused privacy template.
app/scripts/templates/partial/settings-header.mustache Deletes unused partial.
app/scripts/templates/partial/email-autocomplete-domains.mustache Deletes unused partial.
app/scripts/models/security-events.js Deletes unused model.
app/scripts/models/email.js Deletes unused model.
app/scripts/models/cropper-image.js Deletes unused model.
app/scripts/models/attached-clients.js Deletes unused collection.
app/scripts/lib/key-stretch-experiment-mixin.js Deletes unused experiment mixin.
app/scripts/lib/experiments/grouping-rules/TEMPLATE.js Deletes obsolete scaffold.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants