Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7f5fe3f
chore: upgrade vitest to v3, add v8 coverage measurement
AhmedFr Jul 29, 2026
012641b
chore: restore vite specifier to ^5.4.11
AhmedFr Jul 29, 2026
adde376
test: split vitest into node + jsdom projects, add RTL setup
AhmedFr Jul 29, 2026
d7f3dd6
test: typed window.clean bridge mock + useProjects hook tests
AhmedFr Jul 29, 2026
a14f36d
test: make useProjects late-resolve test assert observable state
AhmedFr Jul 29, 2026
40e2ff2
test: subscription hooks (useLicense, useSettings, useUpdater, useSca…
AhmedFr Jul 29, 2026
72e981a
test: fetch/action hooks (useDocker, usePnpmStore, usePackages, usePa…
AhmedFr Jul 29, 2026
90d6782
test: timer/observer hooks (useToast, useLiveProjects, useAutoHeight)
AhmedFr Jul 29, 2026
f6e7a5c
test: useLiveProjects unmount test claims only interval teardown
AhmedFr Jul 29, 2026
6f11ddf
test: project-actions deletion safety (exact trash path, guard, fallb…
AhmedFr Jul 29, 2026
adffc81
test: scan scheduler intervals + threshold notifier crossing semantics
AhmedFr Jul 29, 2026
5f31a29
test: scanner walk/build/dedupe semantics over a real fixture tree
AhmedFr Jul 29, 2026
cd6c1ef
test: abbreviate-home, png encoder header, is.dev env detection
AhmedFr Jul 29, 2026
4ea2c3a
ci: enforce coverage ratchet (auto-updating thresholds) in CI
AhmedFr Jul 29, 2026
8a2144e
docs: testing policy + STATUS update for coverage ratchet work
AhmedFr Jul 29, 2026
d2d609d
test: pin prune busyId sentinel + assert editor launch args
AhmedFr Jul 29, 2026
d180caf
ci: coverage thresholds from CI baseline, manual ratchet (platform va…
AhmedFr Jul 29, 2026
83b4f70
fix: review feedback — abbreviateHome boundary bug, notifier mock, ST…
AhmedFr Aug 3, 2026
1305036
docs: STATUS log — PR #47 review feedback addressed, PR #48 CI flake …
AhmedFr Aug 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,16 @@ jobs:
- name: Typecheck (video)
run: pnpm video:typecheck

- name: Unit tests
run: pnpm test
- name: Unit tests (coverage-gated)
run: pnpm test:coverage

- name: Coverage summary
if: always()
run: |
if [ -f coverage/coverage-summary.json ]; then
echo '### Coverage' >> "$GITHUB_STEP_SUMMARY"
node -e 'const t=require("./coverage/coverage-summary.json").total; for (const k of ["lines","statements","functions","branches"]) console.log(`- ${k}: ${t[k].pct}%`)' >> "$GITHUB_STEP_SUMMARY"
fi

- name: Build
run: pnpm build
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules/
out/
dist/
coverage/
*.log
.DS_Store
.playwright-mcp/
Expand Down
15 changes: 15 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,18 @@ need changes for routine updates.
for the inclusive breakpoints. The residual classes in globals.css
(`lp-nav`, `reveal`, `lp-screen`, `blog-prose`, ...) are behavior hooks or
markdown-facing; keep them stable.

## Testing

- Coverage is ratcheted: CI fails below the thresholds in `vitest.config.ts`.
CI's (Linux) numbers are authoritative — macOS measures slightly higher, so
don't copy local numbers. When a PR raises CI coverage, bump the thresholds
in the same PR; never lower them.
- New logic ships with tests in the same PR. Renderer hook tests use the typed
bridge mock (`src/renderer/src/test/mock-clean-bridge.ts`); it is typed
against `CleanApi`, so preload API changes must update it (the compiler
will insist).
- UI components (`.tsx`) are Storybook's responsibility — no component render
tests, and `.tsx` is excluded from coverage on purpose.
- Two vitest projects: `node` (`src/main|shared|preload`) and `renderer`
(jsdom). Run one file with `pnpm vitest run --project <name> <path>`.
12 changes: 8 additions & 4 deletions STATUS.html

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"lint": "biome check .",
"format": "biome format --write .",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"icon": "node scripts/make-icon.mjs",
"demo": "node scripts/demo-data.mjs",
"package": "electron-vite build && electron-builder --mac --dir",
Expand All @@ -30,18 +31,21 @@
"devDependencies": {
"@biomejs/biome": "2.5.0",
"@remotion/cli": "^4.0.477",
"@testing-library/react": "^16.3.2",
"@types/node": "^22.10.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/semver": "^7.7.1",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/coverage-v8": "^3.2.7",
"electron": "^33.2.0",
"electron-builder": "^25.1.8",
"electron-vite": "^2.3.0",
"jsdom": "^30.0.0",
"remotion": "^4.0.477",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vitest": "^2.1.8"
"vitest": "^3.2.7"
},
"dependencies": {
"electron-updater": "^6.8.9",
Expand Down
Loading
Loading