Repository navigation
Conversation
Because: - The Nx upgrade moved the four fxa-admin-panel build steps into dependsOn targets with no cache settings, so Nx reran them on every build in CI and in start-services.sh. This commit: - Adds cache, inputs and outputs to build-css, build-react, build-ts-client and build-ts-server in the nx.targets block. Closes FXA-14727
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Moderate cache correctness issues remain unresolved.
1 open finding
What changed in this PR
Adds Nx caching for the admin-panel CSS, React, and TypeScript build targets to reduce repeated CI and Playwright builds.
Changes:
- Configures caching inputs and outputs for four build sub-targets.
- Tracks generated CSS, React assets, and TypeScript outputs.
- Adds the CSS dependency to the React build target.
| File | Summary |
|---|---|
packages/fxa-admin-panel/package.json |
Adds caching configuration. Findings: two moderate issues regarding TypeScript test/story inputs and incomplete public/ outputs, plus one nit regarding redundant NODE_ENV input. |
🧠 Review effort: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+168
to
+169
| "production", | ||
| "^production" |
vbudhram
approved these changes
Oct 12, 2026
vbudhram
left a comment
Contributor
There was a problem hiding this comment.
Improvement that only impacts admin panel
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
build-css,build-react,build-ts-clientandbuild-ts-serverintodependsOnofbuild, with no cache settings.start-services.shon each Playwright node.This pull request
cache: true,inputsandoutputsto the four sub-targets in thenx.targetsblock ofpackages/fxa-admin-panel/package.json.build-cssis a new entry.Issue that this pull request solves
Closes: FXA-14727
Checklist
Put an
xin the boxes that applyHow to review (Optional)
nx.targetsblock ofpackages/fxa-admin-panel/package.json. Thescriptsblock andnx.jsonare unchanged.build-css,build-react, then the twobuild-ts-*targets.build/is not declared as a whole, because webpack cleansbuild/but keepslibs/andpackages/(the servertscoutput).build-reactdeclaresindex.html,favicon.icoandstatic.build-cssandbuild-reactuseNODE_ENVas an input, becausetailwind.config.jsbranches on it.productioninput excludes test and story files. A change to only those files is a cache hit onbuild-ts-clientand skips its type check. (b)build-reactlists the twopublic/files by name. A new file inpublic/must also be added to its outputs. Do you accept both?Screenshots (Optional)
Other information (Optional)
This change has no test files. This is what I ran in the VM with
/fxa-verify --plan. All checks passed.nx show project fxa-admin-panel --jsonshowscache: trueand the inputs and outputs above on all four targets.NODE_ENV=test nx run fxa-admin-panel:buildtook all four sub-targets from cache (15 s).rm -rf build src/styles/tailwind.out.css, a cached build restoredbuild/index.html,build/favicon.ico,build/static,build/libs,build/packagesandtailwind.out.css(16 s).build/plustailwind.out.css. I compared a cache-restored build with a fresh--skip-nx-cacherun of each sub-target. Both lists have 65 files and are identical. For examplebuild/index.htmlstarts with16f8fc1c7099andbuild/favicon.icowith05f3b705513a.NODE_ENVfromtesttodevelopment, with a fresh isolated Nx cache:build-cssandbuild-reactran.build-ts-clientandbuild-ts-servercame from cache.PROXY_STATIC_RESOURCES_FROM. Output:GET / 200,index.html assets match build/,GET /static/css/main.1cfb0b2e.css 200,GET /static/js/main.cad72f5a.js 200.packages/functional-tests/tests/admin/adminPanel.spec.tsagainst that server: 3 passed ("admin panel loads and renders navigation", "admin panel heartbeat is healthy", "admin server heartbeat is healthy").Not run in the VM, left to CI:
adminPanel.spec.ts. In the VM the API test got 500 because the admin server cannot reach Stripe. The UI test got 403 because a production bundle sends no test-user headers (getExtraHeadersinsrc/lib/config.tssends them only whenNODE_ENVis development). The byte compare shows the cache does not change the bundle.start-servicestimings. The baseline is CI job 714508: 81 s for the Build step and 38 s for thestart-servicesbuild. The CI run of this PR gives the new numbers.admin-adminPanel-Admin-Pan-8aff4-oads-and-renders-navigation-local.webm