fix(reliability): stabilize sync rendering and offline recovery

This commit is contained in:
Codex committed 2026-10-12 19:46:53 -06:00
1 parent 3877d4f986
commit eaa4894894
15 files changed
+131 -27

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ assert.ok(syncCode.includes("function changes("));
const values = new Map();
const storage = { getItem: key => values.get(key) ?? null, setItem: (key, value) => values.set(key, String(value)) };
const client = vm.createContext({
localStorage: storage, window: {}, fetch: async (path, options = {}) => worker.fetch(
localStorage: storage, window: { LifeOSLocalDB: { mode: () => 'cloud' } }, navigator: { onLine: true }, fetch: async (path, options = {}) => worker.fetch(
new Request("https://life-os.test" + path, { ...options, headers: { ...options.headers, ...headers } }), { DB: db }),
clearTimeout, setTimeout, confirm: () => false, t: key => key,
toast: () => {}, document: { createElement() {}, body: { append() {} } }