Skip to content

Commit fbed9e4

Browse files
committed
fix(ui): pin TypeScript inside typescript-eslint's peer range, guard the UI build in CI
#141 bumped TypeScript to ~7.0.2, but typescript-eslint@8.61.1 declares peer typescript '>=4.8.4 <6.1.0' — and no released typescript-eslint supports TS 7. npm ci fails outright with ERESOLVE, so ui/ could not install or build on main. Pin to ~6.0.3, the highest version inside the peer range, and regenerate the lockfile. This merged green because nothing in CI builds the UI: main is source-only and the SPA is built at tag time, so a broken frontend dependency tree stays invisible until a release tag fails or ships a UI-less binary. Add a ui-build job — npm ci --ignore-scripts (matching the release path, and the exact command that fails on an unsatisfiable peer graph), tsc -b + vite build, an assertion that the embedded entrypoint exists, and the vitest suite — on node 24 to match the release environment. Verified locally: clean npm ci, full build (601.9 KB, index.html present, lucide-react 1.33 typechecks so every icon import resolves), and 339 UI tests across 39 files passing.
1 parent 99988fe commit fbed9e4

3 files changed

Lines changed: 45 additions & 369 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,40 @@ jobs:
4848

4949
- name: gate unit tests
5050
run: go test -tags gate -race -timeout 60s ./test/gate/...
51+
52+
ui-build:
53+
name: ui · typecheck · build · test
54+
runs-on: ubuntu-latest
55+
# main is source-only: the SPA is built at tag time and embedded via
56+
# //go:embed. Nothing else in CI installs ui/ dependencies, so a frontend
57+
# dependency tree that cannot resolve — or code that cannot typecheck —
58+
# stays invisible until a release tag fails. That happened: a TypeScript
59+
# bump crossed typescript-eslint's peer bound and broke `npm ci` on main
60+
# while every Go job stayed green. This job is the guard.
61+
steps:
62+
- uses: actions/checkout@v7
63+
- uses: actions/setup-node@v6
64+
with:
65+
node-version: '24' # matches the release workflow's build environment
66+
cache: npm
67+
cache-dependency-path: ui/package-lock.json
68+
69+
# `npm ci` fails outright on an unsatisfiable peer graph, which is the
70+
# failure mode this job exists to catch. --ignore-scripts matches the
71+
# release path (scripts/release.sh, release.yml).
72+
- name: install (exact lockfile, no lifecycle scripts)
73+
run: npm ci --ignore-scripts
74+
working-directory: ui
75+
76+
# `npm run build` is `tsc -b && vite build`: the typecheck catches an API
77+
# that a dependency major removed, the bundle catches a broken import.
78+
- name: typecheck and build
79+
run: npm run build
80+
working-directory: ui
81+
82+
- name: the embedded SPA entrypoint exists
83+
run: test -f internal/ui/dist/index.html
84+
85+
- name: unit tests
86+
run: npx --no-install vitest run
87+
working-directory: ui

0 commit comments

Comments
 (0)