Skip to content

Dev: set OK_INSTANCE=<name> to run multiple desktop dev instances in…#274

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 25, 2026
Merged

Dev: set OK_INSTANCE=<name> to run multiple desktop dev instances in…#274
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Dev: set OK_INSTANCE=<name> to run multiple desktop dev instances in parallel. Electron keys its single-instance lock on the userData directory, so two electron-vite dev processes normally collide and the second quits. OK_INSTANCE relocates each launch's userData to a named sibling directory (Open Knowledge (<name>)), giving every instance its own lock and its own isolated Chromium storage and recents. Honored only on unpackaged builds; packaged releases are unaffected.

Electron keys its single-instance lock on the userData directory, so a
second electron-vite dev process fails requestSingleInstanceLock() and
quits. Setting OK_INSTANCE=<name> on an unpackaged build relocates that
launch's userData to a named sibling directory, giving each instance its
own lock plus isolated Chromium storage and recents so two builds run
side by side. Packaged releases ignore it.

Adds the pure deriveInstanceUserDataDir/sanitizeInstanceName helper with
unit tests, wires it before requestSingleInstanceLock(), passes
OK_INSTANCE through Turbo's strict env filter, and documents the workflow
in the desktop README.

GitOrigin-RevId: 45234d6e4d2840f1c3248130cf70124e0b3037a7

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28195100168). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync
inkeep-oss-sync Bot merged commit b30d691 into main Jun 25, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch June 25, 2026 19:29
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