MineContext icon indicating copy to clipboard operation
MineContext copied to clipboard

fix: Adopt Electron's single instance lock

Open Frank-whw opened this issue 1 month ago • 0 comments

fix: Adopt Electron's single instance lock to fix the issues of multiple background instances and timeline overlap.(#270)

Description

Implement Electron’s single-instance control in the main process so subsequent launches do not create new app instances or backend processes. Files changed:frontend/src/main/index.ts:41–54 adds single-instance lock and second-instance handler Closes: #270

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

After the first instance is running, launching npm run dev again causes the second process to exit immediately and brings the existing instance to the foreground (restored and focused). image

Frank-whw avatar Nov 21 '25 06:11 Frank-whw