chore(dev): hot-reload dev mode for the Electron shell + fast Vite script - #45
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
PANDDA_DEV_URLgate. When set, skip spawning the frozen backend, wait for the Vite dev server, load it (HMR) and open DevTools. Preload attached regardless, sowindow.panddaDesktopworks in dev. Vite proxies/apito amanage.py runserveron :8000. Packaged app unaffected.dev:electron(servers run separately) anddev(one command: runserver + Vite + Electron via a process-group trap that tears all three down on quit — no new deps).dev:fast— Vite HMR without the 67 MB MoorhenAssets re-copy (self-heals to a full copy when assets are absent).Prereq:
npm installat the repo root and an activated Python env for runserver.🤖 Generated with Claude Code