Conversation
## 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
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because
packages/fxa-content-server/app/scriptsare not reachable from either webpack entry. Nothing inserver/,Gruntfile.js,grunttasks/, orwebpack.config.jsrefers to them.This pull request
app/scripts.app/tests/specand theirrequirelines inapp/tests/test_start.js.Issue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-14372
Checklist
Put an
xin the boxes that applyHow to review (Optional)
app/tests/test_start.js, then skim the deletions.createViewHandler('pair/index'). A static import graph misses those, so I grepped each basename acrossapp/,server/,Gruntfile.js,grunttasks/, andwebpack.config.js.Screenshots (Optional)
No user interface change.
Other information (Optional)
Ten of the 34 files stay. Each one still has a live referrer:
lib/channels/null.js,lib/channels/receivers/null.js,lib/channels/senders/null.jsspec/lib/channels/duplex.js,spec/lib/channels/notifier.js, andspec/models/auth_brokers/fx-ios-v1.jsimport them. Those specs cover live code, and editing them is out of scope here.lib/jquery.jswebpack.config.jsunderappDependencies, and it setswindow.jQueryandwindow.$formodalandchosen-js. Deleting it breaks the build.models/attached-client.jsspec/models/user.jsandspec/models/account.jsimport it. Both are specs for live models.lib/glean/accountBanner.js,accountPref.js,deleteAccount.js,error.js,promoQrMobile.jsfxa-shared/metrics/glean/fxa-ui-pings.yamlandfxa-ui-metrics.yaml. The same yaml generatesfxa-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 nextyarn 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 buildinpackages/fxa-content-serverpasses. 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-serverpasses. Thelinttarget runslint-gleanfirst, so the glean yaml is clean.npx tsc --noEmitinpackages/fxa-content-serverpasses.npx nx build fxa-content-serverdoes not complete. It fails inpayments-stripe:build-tsandpayments-metrics:glean-lint, which fail the same way without this change. I ran the content-server build script directly instead.test-unittarget, and the Backbone mocha suite underapp/testsdoes not run in CI.Expect the
extractcheck to go red. It fails on any pull request that changes extractable strings: the extraction succeeds, then the "New changes found, adding reviewer" branch callsghand gets HTTP 401. This pull request deletes templates. The break is in the infrastructure, not here.