feat: update development partitioning for persistent storage
- Changed the development partitioning strategy to use a fixed name ('persist:dev') instead of a per-PID approach. This allows renderer-side storage (localStorage, IndexedDB) to survive app restarts, improving data stability during development.
This commit is contained in:
parent
01a1472e4c
commit
57221f4e57
1 changed files with 4 additions and 4 deletions
|
|
@ -1064,10 +1064,10 @@ function createWindow(): void {
|
||||||
preload: join(__dirname, '../preload/index.js'),
|
preload: join(__dirname, '../preload/index.js'),
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
// In development, avoid persistent Chromium storage locks (IndexedDB/Quota)
|
// In development, use a persistent partition so that renderer-side storage
|
||||||
// when multiple dev instances are started or ports rotate (5173 -> 5174, etc).
|
// (localStorage, IndexedDB — used by comment read state, etc.) survives
|
||||||
// This keeps startup resilient and prevents "LOCK" contention.
|
// app restarts. A fixed name is used instead of per-PID to keep data stable.
|
||||||
...(isDev ? { partition: `temp:dev-${process.pid}` } : {}),
|
...(isDev ? { partition: 'persist:dev' } : {}),
|
||||||
},
|
},
|
||||||
backgroundColor: '#1a1a1a',
|
backgroundColor: '#1a1a1a',
|
||||||
...(useNativeTitleBar ? {} : { titleBarStyle: 'hidden' as const }),
|
...(useNativeTitleBar ? {} : { titleBarStyle: 'hidden' as const }),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue