Full 'pnpm test' previously hung indefinitely (killed at CI walls, misdiagnosed as teardown slowness). Two root causes found and fixed: 1. RightInspector.test.tsx called setSubject() during render with a fresh object every pass -> infinite synchronous render loop (100% CPU spin, blocks the event loop so no timeout can fire). Moved into useEffect. 2. Test QueryClients used retry:false but default gcTime (5 min) -> a live GC timer per cached query kept workers from exiting. New shared createTestQueryClient() with gcTime:0 adopted across all 7 test files. Hardening so any future leak fails loudly instead of hanging: - vite.config.ts: testTimeout/hookTimeout 10s, teardownTimeout 5s - useManagedTimeout hook owns previously-bare setTimeouts in DigestBadge, MetadataTable, RatificationCommandPanel (4 sites), CommandPalette focus First-ever frontend CI lane (.github/workflows/workbench-ui.yml): path-filtered to workbench-ui/** AND the workflow file itself, pnpm install --frozen-lockfile + build + vitest, timeout-minutes 15. Honesty fix: KeyboardHelp no longer advertises j/k, /, Enter (unbuilt until R0d restores them registry-backed). Route conformance test (ADR-0162 §6, executable): empty/error/loading contracts asserted for Chat/Proposals/Evals/Replay; fixed the two gaps it caught (ReplayRoute bare-div error branch -> ErrorState contract; ArtifactList empty state gained a next action). Result: 27 files / 181 tests pass, suite EXITS in 4.9s wall-clock (was: indefinite hang).
58 lines
1.4 KiB
YAML
58 lines
1.4 KiB
YAML
name: workbench-ui
|
|
|
|
# Frontend verification lane (Wave R brief R0a). Before this workflow,
|
|
# workbench-ui changes merged with no frontend CI at all — smoke.yml and
|
|
# full-pytest.yml are Python-only.
|
|
#
|
|
# The path filter includes this workflow file itself so changes to the
|
|
# lane are validated by the lane.
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "workbench-ui/**"
|
|
- ".github/workflows/workbench-ui.yml"
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "workbench-ui/**"
|
|
- ".github/workflows/workbench-ui.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: workbench-ui-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: build + vitest
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
defaults:
|
|
run:
|
|
working-directory: workbench-ui
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
# version comes from package.json "packageManager" (pnpm@9.15.0)
|
|
|
|
- name: set up node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
cache-dependency-path: workbench-ui/pnpm-lock.yaml
|
|
|
|
- name: install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: build (tsc + vite)
|
|
run: pnpm build
|
|
|
|
- name: vitest (full suite must pass AND exit)
|
|
run: pnpm test
|