Skip to content

chore(dev): hot-reload dev mode for the Electron shell + fast Vite script - #45

Merged
martinemnoble1 merged 1 commit into
mainfrom
chore/dev-mode-hot-reload
Jun 19, 2026
Merged

chore(dev): hot-reload dev mode for the Electron shell + fast Vite script#45
martinemnoble1 merged 1 commit into
mainfrom
chore/dev-mode-hot-reload

Conversation

@martinemnoble1

Copy link
Copy Markdown
Owner

Run the desktop shell (with its filesystem access — ingest_path, native pickers) against the live dev stack instead of a frozen backend + built client, so renderer edits hot-reload and no PyInstaller freeze is needed.

  • electron/main.js: PANDDA_DEV_URL gate. When set, skip spawning the frozen backend, wait for the Vite dev server, load it (HMR) and open DevTools. Preload attached regardless, so window.panddaDesktop works in dev. Vite proxies /api to a manage.py runserver on :8000. Packaged app unaffected.
  • package.json: dev:electron (servers run separately) and dev (one command: runserver + Vite + Electron via a process-group trap that tears all three down on quit — no new deps).
  • client/package.json: dev:fast — Vite HMR without the 67 MB MoorhenAssets re-copy (self-heals to a full copy when assets are absent).

Prereq: npm install at the repo root and an activated Python env for runserver.

🤖 Generated with Claude Code

…ript

Run the desktop shell (with its filesystem access — ingest_path, native
pickers) against the live dev stack instead of a frozen backend + built client,
so renderer edits hot-reload and no PyInstaller freeze is needed.

- electron/main.js: PANDDA_DEV_URL gate. When set, skip spawning the frozen
  backend, wait for the Vite dev server, load it (HMR) and open DevTools. The
  preload is attached regardless, so window.panddaDesktop works in dev. Vite
  proxies /api to a `manage.py runserver` on :8000. Packaged app unaffected.
- package.json: `dev:electron` (servers run separately) and `dev` (one command:
  runserver + Vite + Electron via a process-group trap that tears all three
  down on quit — no new deps).
- client/package.json: `dev:fast` — Vite HMR without the 67 MB MoorhenAssets
  re-copy (self-heals to a full copy when assets are absent).

Prereq: `npm install` at the repo root (electron not yet installed locally) and
an activated Python env for runserver.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@martinemnoble1
martinemnoble1 merged commit 202bdf9 into main Jun 19, 2026
4 checks passed
@martinemnoble1
martinemnoble1 deleted the chore/dev-mode-hot-reload branch June 19, 2026 10:52
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