From 57221f4e57ca284bdb59492a9fd02697694dd27f Mon Sep 17 00:00:00 2001 From: iliya Date: Fri, 20 Mar 2026 14:20:14 +0200 Subject: [PATCH] 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. --- src/main/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 50e17246..ade86e3c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1064,10 +1064,10 @@ function createWindow(): void { preload: join(__dirname, '../preload/index.js'), nodeIntegration: false, contextIsolation: true, - // In development, avoid persistent Chromium storage locks (IndexedDB/Quota) - // when multiple dev instances are started or ports rotate (5173 -> 5174, etc). - // This keeps startup resilient and prevents "LOCK" contention. - ...(isDev ? { partition: `temp:dev-${process.pid}` } : {}), + // In development, use a persistent partition so that renderer-side storage + // (localStorage, IndexedDB — used by comment read state, etc.) survives + // app restarts. A fixed name is used instead of per-PID to keep data stable. + ...(isDev ? { partition: 'persist:dev' } : {}), }, backgroundColor: '#1a1a1a', ...(useNativeTitleBar ? {} : { titleBarStyle: 'hidden' as const }),