Skip to content

Remove retired Electron tooling, bump vitest to 5 - #7

Open
ninedter wants to merge 1 commit into
mainfrom
claude/remove-electron-bump-vitest
Open

ninedter wants to merge 1 commit into
mainfrom
claude/remove-electron-bump-vitest

Conversation

@ninedter

Copy link
Copy Markdown
Owner

Summary

The product is the Docker hub + a browser; the electron/ shell was already retired in the README. This removes it and brings the test toolchain current. Split out of the credit-tracking work on purpose.

  • Electron removed: electron, electron-builder, concurrently, wait-on; the main field, electron:* scripts and the electron-builder build block; electron/ and build/entitlements.mac.plist. Also the Dockerfile ELECTRON_SKIP_BINARY_DOWNLOAD, the .dockerignore / .gitignore / eslint ignores, stale comments, and the README mentions. The lockfile drops about 5.3k lines; the Docker npm ci step now takes about 15s.
  • Titlebar drag regions removed: removed the .titlebar-drag / .titlebar-no-drag CSS and its uses on the Dashboard, Monitor, Analytics and Settings pages. The layout's sticky, transparent h-8 drag spacer had a z-50 layer, so it covered the top 2rem of scrolled content in the browser. It's now pt-8 on the content wrapper. Headers keep the same 40px offset, and Monitor's 100vh-2rem cap still fits (checked in the dev server).
  • vitest ^2.1.9 → ^5 (vite 8). No test or API changes were needed. vitest.config.mts now uses import.meta.dirname because vite 8 warns about __dirname. @types/node goes from ^20 to ^22 to satisfy vitest 5's peer range and match the Node 22 runtime (CI and Docker).
  • test:edge fix (pre-existing): node --test edge/test/ fails on Node 22, because positional args became globs and a directory no longer expands. It now runs npm --prefix edge test → node --test (auto-discovery), which works on both Node 20 (edge engines) and Node 22+.

App dependencies are unchanged in the lockfile: next 16.1.6, react 19.2.3, better-sqlite3, swr, eslint and typescript stay at their versions.

Test plan

  • npx tsc --noEmit
  • npm run lint
  • npm test: 194/194 on vitest 5.0.5, no warnings
  • npm run test:edge: 85 pass (84 tests plus the helpers module, which auto-discovery counts)
  • npm run build in a clean checkout. In a .claude/worktrees/* checkout, Next infers the parent repo's lockfile as workspace root and nests the standalone output, which breaks postbuild. That's environmental and the same on main.
  • docker build . succeeds
  • Monitor page in the dev server: same header offset, feed still scrolls inside the panel

🤖 Generated with Claude Code

- Drop electron, electron-builder, concurrently and wait-on, the "main"
  field, electron:* scripts and the electron-builder "build" block, the
  electron/ directory and build/entitlements.mac.plist; clean the matching
  Dockerfile ENV, .dockerignore/.gitignore/eslint ignores and README text.
- Remove the titlebar-drag/no-drag CSS and classes. The layout's sticky
  Electron drag spacer becomes pt-8 on the content wrapper, so pages keep
  the same top offset and Monitor's 100vh-2rem cap still fits.
- vitest ^2.1.9 -> ^5 (vite 8); @types/node ^20 -> ^22 to satisfy its peer
  range and match the Node 22 runtime. vitest config uses
  import.meta.dirname instead of __dirname (vite native-loader warning).
- test:edge now runs `node --test` from edge/: passing a directory to
  `node --test` only worked on Node 20 and fails on Node 22.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T06:37:35.091984Z 7d4012e PR opened
🔒 Security Review ✅ Completed 2026-10-20T06:37:30.632525Z 7d4012e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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