Revert "fix(electron): prevent beforeunload prompt by using autosave (#642)" (#646)

This reverts commit e7c29fb410.

The PR introduced an IndexedDB error: 'Failed to execute transaction on IDBDatabase: The database connection is closing.'
This commit is contained in:
Dayuan Jiang
2026-01-27 09:20:42 +09:00
committed by GitHub
parent e7c29fb410
commit cb0c0fbcda
4 changed files with 20 additions and 71 deletions

View File

@@ -75,18 +75,6 @@ export function isIndexedDBAvailable(): boolean {
}
}
// Check if IndexedDB is actually usable (not just present).
export async function isIndexedDBUsable(): Promise<boolean> {
if (!isIndexedDBAvailable()) return false
try {
const db = await getDB()
db.close()
return true
} catch {
return false
}
}
// CRUD Operations
export async function getAllSessionMetadata(): Promise<SessionMetadata[]> {
if (!isIndexedDBAvailable()) return []