import { chromium } from 'playwright'; const browser = await chromium.launch({ headless: true }); const page = await browser.newPage(); await page.goto('http://localhost:5173'); await page.waitForTimeout(3000); const info = await page.evaluate(async () => { return await new Promise((resolve) => { const req = indexedDB.open('ka-note'); req.onsuccess = (e) => { const db = e.target.result; const stores = Array.from(db.objectStoreNames); const tx = db.transaction('historyEntries', 'readonly'); const all = tx.objectStore('historyEntries').getAll(); all.onsuccess = () => resolve({ stores, totalHistory: all.result.length, sample: all.result.slice(0, 3).map(r => ({ id: r.id, text: r.text })) }); }; req.onerror = () => resolve({ error: 'db open failed' }); }); }); console.log(JSON.stringify(info, null, 2)); await browser.close();