3.4 KiB
Development, Verification, and Release Workflows
Local Development
npm install
npm run dev
This runs:
- Vite renderer dev server on
http://localhost:3006 - Electron app pointed at that dev server
The app uses MemoryRouter, so browser URL routing behavior does not match a normal web app.
Build Verification
Renderer build:
npm run build
Electron main/preload bundle:
npm run build:electron
Run both for most cross-process changes.
Known existing build warnings:
- A warning around
true || j.close_dateinsrc/components/pages/admin/admin.page.jsx. - Vite chunk-size warnings for large bundles.
Do not treat those as newly introduced unless your change touches them.
Packaging Check
Use:
npm run pack
This runs:
electron-builder --dir --publish never --config electron-builder.pack-check.cjs
It is the preferred "does it package?" check because it avoids publishing.
Publishing
Publishing is configured through electron-builder S3 settings in package.json. The updater checks periodically.
Do not run publishing scripts unless explicitly requested:
npm run distp- Any direct
electron-builder --publish always
If asked to release:
- Confirm the version in
package.json. - Run
npm run build. - Run
npm run build:electron. - Run a no-publish package check first.
- Only then run the requested publish command.
Auto Updates
Main process:
- Uses
electron-updater. autoUpdater.autoDownload = true.- Checks every 30 minutes after app ready.
- Sends update events/progress to renderer through IPC.
- Renderer
UpdateManagerOrganismhandles UI.
Release notes:
- Stored in
electron/changelog.json. - Main process reads
require("./changelog.json")[app.getVersion()]. - Store key
showChangeLogcontrols initial display.
Hasura
Hasura config and migrations live under hasura/.
Be careful with migrations:
- Current migrations are under
hasura/migrations/default/. hasura/migrations_backup/is historical backup material.- Metadata under
hasura/metadata/should match Hasura's generated layout.
When changing GraphQL queries, verify the Hasura metadata/schema supports selected fields.
Sentry Source Maps
Script:
npm run sentry:sourcemaps
Requires a valid .sentryclirc/token and should only be run when intentionally uploading source maps.
Troubleshooting
Electron backend console DevTools noise:
Autofill.enableandAutofill.setAddresseserrors are Chromium DevTools protocol noise.- They can appear when Chrome DevTools or React DevTools are open.
Electron circular dependency warning:
- Do not import
mainWindowfrommain-src.jsin other Electron modules. - Use
BrowserWindow.fromWebContents(event.sender)for dialogs.
AntD theme/static feedback warning:
- Use
antdMessage/antdNotificationfromsrc/util/antdFeedback.js. - Ensure
AntdFeedbackBridgeis mounted inside AntD<App>.
Apollo cache replacement warning:
- Confirm field policies in
GraphQLClient.js. - Add/adjust merge policies for newly paginated fields.
Search pagination crash:
- Guard
prev?.search_jobsandfetchMoreResult?.search_jobsbefore spreading.
Git ignore of generated files:
.gitignoreincludes/dist-electron/.- If generated files still show in status, they are probably already tracked; remove from index with
git rm --cached -r dist-electronafter confirming the local files can stay.