Skip to content

ci: gate PRs on the dashboard Vitest suite#274

Merged
dinndev2 merged 3 commits into
mainfrom
ci/273-frontend-vitest-gate
Jun 25, 2026
Merged

ci: gate PRs on the dashboard Vitest suite#274
dinndev2 merged 3 commits into
mainfrom
ci/273-frontend-vitest-gate

Conversation

@ivndev001

@ivndev001 ivndev001 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

Add a dedicated frontend (vitest) CI job so the dashboard's existing Vitest suite gates PRs. Closes #273.

Why

frontend/package.json defines test: vitest run with 4 committed suites (25 tests), but no workflow runs them — CI only builds the SPA via rake frontend:build (tsc + vite). tsc can typecheck clean while the app null-renders at runtime (exactly how #272's /dead white-screen shipped), so the build step is not a regression gate. Frontend regressions currently merge unblocked.

Changes

  • .github/workflows/test.yml: new frontend (vitest) job, sibling to test / parity / coverage. Node-only (no Ruby/Redis): blacksmith-4vcpu-ubuntu-2404, timeout-minutes: 10, pinned actions/setup-node@v6 (node 24, npm cache on frontend/package-lock.json), npm ci + npm run test in frontend/. Inherits the workflow-level concurrency group and contents: read permissions.

Notes / decisions

Verification

  • Frontend suite locally on this branch: cd frontend && npm ci && npm run test -> 4 files / 25 tests pass (~2.3s, node 24).
  • Workflow YAML is not gated by the repo's Ruby suite, so verified manually: actionlint .github/workflows/test.yml reports only the pre-existing blacksmith-4vcpu-ubuntu-2404 unknown-label warning (identical on the existing test/parity/coverage jobs — actionlint doesn't know Blacksmith's custom runner label; it resolves on the real runner). No other findings. Additive change — existing Ruby gates and the required test (x, y) contexts are unaffected.

Post-merge (admin, ordering-sensitive)

After the frontend (vitest) job reports green once, add frontend (vitest) to main branch-protection required status checks. Do NOT register it before it has reported at least once, or open PRs will hang on a phantom required check.

Summary by CodeRabbit

  • Tests
    • Added automated frontend test coverage on pull requests to help catch dashboard regressions earlier.

The `test` and `coverage` jobs only build the SPA (`rake frontend:build` =
tsc + vite); they never run the committed Vitest suite, so a frontend
regression that typechecks clean (e.g. the #272 /dead null-render) ships
unblocked. Add a dedicated Node-only `frontend (vitest)` job that runs the
existing suite (4 files / 25 tests) on every PR.

Runs unconditionally (no `frontend/**` path filter) so the check is safe to
mark required without the "Expected - waiting" trap on backend-only PRs.

Closes #273.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ivndev001 ivndev001 self-assigned this Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

An error occurred during the review process. Please try again later.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 972876a7-f2e7-4bf4-b138-37483c6321b4

📥 Commits

Reviewing files that changed from the base of the PR and between 206a307 and e660f02.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

📝 Walkthrough

Walkthrough

The PR adds a frontend job to .github/workflows/test.yml. It checks out the repo, sets up Node 24 with npm caching from frontend/package-lock.json, installs dependencies in frontend/, and runs npm run test for the dashboard Vitest suite.

Changes

Frontend Vitest CI job

Layer / File(s) Summary
Frontend Vitest job
.github/workflows/test.yml
Adds a Node 24 frontend CI job that runs npm ci and npm run test in frontend/, with npm caching keyed to frontend/package-lock.json; nearby comments clarify that the existing matrix jobs only build the SPA.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The new workflow adds the Vitest CI gate, but it does not add the required /dead null-error regression test from #273. Add the /dead null-error regression test so the frontend regression also runs and passes in CI.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the PR gates PRs on the dashboard Vitest suite, matching the main CI change.
Out of Scope Changes check ✅ Passed The change stays focused on CI for the frontend Vitest suite and does not introduce unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

📊 Benchmark vs base

benchmark base (i/s) head (i/s) Δ
wurk enqueue 27.57k 26.53k -3.8% 🟡 slower (within noise)
wurk fetch+execute 7.08k 7.73k +9.2% 🟢
wurk hot-path (jobs/1k-alloc) 5 5 +0.0% 🟢
wurk idle scheduler sweep 18.58k 19.05k +2.5% 🟢
wurk push_bulk(1000) 239 259 +8.7% 🟢
wurk swarm boot 159 160 +0.6% 🟢

Regression is flagged when the slowdown exceeds both runs' combined ± noise plus 5.0% (tune via BENCH_REGRESSION_PCT).

@ivndev001

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@dinndev2

Copy link
Copy Markdown
Contributor

@coderabbitai approve

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Comments resolved and changes approved.

@dinndev2 dinndev2 merged commit e25f9f6 into main Jun 25, 2026
14 checks passed
@dinndev2 dinndev2 deleted the ci/273-frontend-vitest-gate branch June 25, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI never runs the frontend vitest suite (no gate on dashboard JS regressions)

2 participants