Skip to content

Make the frontend build and validate it in CI#605

Merged
koppor merged 2 commits into
mainfrom
ci-frontend-build
Jul 15, 2026
Merged

Make the frontend build and validate it in CI#605
koppor merged 2 commits into
mainfrom
ci-frontend-build

Conversation

@koppor

@koppor koppor commented Jul 14, 2026

Copy link
Copy Markdown
Member

🤖

  • What kind of change does this PR introduce?

CI + build fix. It makes the frontend build again and adds that build to the Check workflow.

  • What is the current behavior?

./gradlew check (the only CI gate) compiles the backend and runs its empty test suite — it never touches the frontend. And the frontend has not actually been buildable for a long time: its source is an Angular 4 app (HttpModule from @angular/http, NgbModule.forRoot(), rxjs/add imports, core-js/es6/* polyfills, the ngx-uploader 2 API, and a CLI-1.x .angular-cli.json workspace with no angular.json), but Dependabot bumped the version numbers in package.json / npm-shrinkwrap.json up to @angular/cli 12 / @angular/core 10 with no source migration. The result is an incoherent manifest that cannot build:

  • @angular/cli 12 requires angular.json; the repo only has .angular-cli.json (CLI ≤ 5 format).
  • @angular/* packages straddled majors 4 / 7 / 10.
  • core-js 3 removed the es6/* paths polyfills.ts imports.
  • ngx-uploader 4 renamed the API the source still calls (NgUploaderModule / NgUploaderOptions).

Because CI never built the frontend, breaking Dependabot bumps for the frontend (the only ecosystem Dependabot updates here, besides GitHub Actions) could sail through unnoticed.

  • What is the new behavior (if this is a feature change)?

    1. The frontend builds again. Dependencies are reconciled to the last hand-authored, source-matching versions (the manifest at 001a3de), with two toolchain adjustments needed to install/build on the Node 8 ABI the app targets: @angular/cli1.4.10 and typescript2.4.2. The docs-site tooling (wintersmith / wintersmith-sassy) is dropped — its transitive node-sass 3.x has no Node 8 prebuilt and aborted npm install, and it is unrelated to ng build. The stale yarn.lock is removed (the build uses npm; npm-shrinkwrap.json is the lockfile that is actually consumed).
    2. CI builds the frontend. The Check workflow is split into a backend job (the existing ./gradlew check, unchanged) and a frontend job that runs npm ci + npm run build on Node 8.

Verified locally: a clean npm ci + npm run build on Node 8.17 produces dist/ with zero compile errors.

  • Other information:

    • This intentionally lowers many version numbers. Those versions never existed in a building frontend — they were mechanical Dependabot bumps on top of un-migrated source. Restoring a coherent, compiling baseline is the prerequisite for CI to be meaningful. With a green build now gating them, Dependabot can re-propose the framework-independent security bumps (jquery, lodash, underscore, etc.) one at a time and CI will catch the ones that break.
    • Relation to automerge: the frontend job only protects automerge once it is a required status check in branch protection on main. Right now main is unprotected, so this job runs but does not yet block a merge — configuring branch protection to require backend and frontend is the follow-up that actually makes Dependabot automerge safe.
    • UI tests: none are added here. There are no spec files in the tree; this PR only guarantees the app compiles. Real ng test / e2e coverage is a separate, larger effort.

koppor and others added 2 commits July 14, 2026 18:23
The frontend source is an Angular 4 app: it uses HttpModule from
@angular/http, NgbModule.forRoot(), rxjs 5 "rxjs/add" imports, core-js 2
polyfill paths (core-js/es6/*), the ngx-uploader 2 API
(NgUploaderModule/NgUploaderOptions), and a CLI-1.x .angular-cli.json
workspace (there is no angular.json). Over time Dependabot bumped the version
numbers in package.json/npm-shrinkwrap.json as far as @angular/cli 12 /
@angular/core 10 with no accompanying source migration, producing an
internally incoherent manifest that cannot build: CLI 12 needs angular.json,
the @angular/* packages straddled majors 4/7/10, core-js 3 dropped the es6/*
paths, and ngx-uploader 4 renamed the API the source still calls.

Reconcile the dependencies back to the last hand-authored, source-matching
versions (the manifest at 001a3de), then make just the two toolchain
adjustments needed to install and build on the Node 8 ABI the app targets:
pin @angular/cli to 1.4.10 and typescript to 2.4.2. Drop the docs-site
tooling (wintersmith / wintersmith-sassy) whose transitive node-sass 3.x has
no Node 8 prebuilt and aborted `npm install`; it is unused by `ng build`.
Remove the stale yarn.lock — the build uses npm, and npm-shrinkwrap.json is
the lockfile that is actually consumed.

Verified with `npm ci` + `npm run build` on Node 8.17: dist/ is produced with
zero compile errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`./gradlew check` compiles only the backend and runs its (empty) test suite;
it never builds the frontend, so a breaking frontend dependency bump could
pass CI unnoticed. Split the Check workflow into a `backend` job (the existing
gradle check, unchanged) and a `frontend` job that runs `npm ci` +
`npm run build` on Node 8, so the frontend is compiled on every push and pull
request. Node 8 is required because the app's stack (Angular 4 / @angular/cli
1.4, node-sass 4.14) only supports that ABI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@koppor koppor merged commit 4c82480 into main Jul 15, 2026
3 checks passed
@koppor koppor deleted the ci-frontend-build branch July 15, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant