fix: disable Electron file watchers - #151
Merged
Merged
Conversation
regnull
commented
Sep 25, 2026
regnull
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed PR #151 against the pushed diff. The Electron-only Vite environment flag is scoped to the launcher, normal browser development retains its watcher, and backend reload is removed only from the Electron launcher. The existing dedicated ports/proxy and process-group cleanup remain consistent. The added regression coverage verifies the key source-level wiring.
No correctness blockers found. Ready to merge after QA confirms the reported checks.
— Reviewer - @Reviewer
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.
Problem
Electron development launched both Uvicorn reload watchers and Vite's file watcher. Repository changes—including activity in unrelated worktrees,
.venv, or frontend dependency trees—could trigger expensive watcher work and freeze the Electron UI while a message was being sent. The intended behavior is restart-to-update for Electron.Solution
--reloadand--reload-dirfrom the Electron backend launcher.ELECTRON_DEV=1mode and configure Vite withserver.watch: nullin that mode.Users can restart the Electron app to pick up source changes; message sending, API routing, readiness checks, and explicit app behavior remain unchanged.
Changed files
scripts/electron-dev.shfrontend/vite.config.tsELECTRON_DEV=1.frontend/electron/main.test.tsRoot cause
The Electron launcher enabled two independent file-change update mechanisms: Uvicorn's
--reloadprocess and Vite's development watcher. Those watchers monitored repository files while the Electron UI was active; large or unrelated repository changes could consume resources and interfere with normal message interaction.Verification
make lint— passed (7 pre-existing Oxlint warnings, 0 errors).make test— passed: 457 backend tests; frontend Vitest and typecheck passed.make build— passed.pnpm vitest run electron/main.test.ts— 12 tests passed.bash -n scripts/electron-dev.shandgit diff --check— passed.Related conventions
The browser
make devworkflow retains live development behavior. Only the Electron launcher is restart-to-update, as requested.