diff --git a/index.html b/index.html index bad515e..b1bbe6f 100644 --- a/index.html +++ b/index.html @@ -851,7 +851,24 @@ let appSearch = ''; async function loadData(forceFile = false) { if (!forceFile) { const raw = localStorage.getItem(STORAGE_KEY); - if (raw) { try { data = JSON.parse(raw); return; } catch (_) {} } + if (raw) { + try { + data = JSON.parse(raw); + // Merge any new apps added to roadmap.json that aren't in localStorage yet + const res = await fetch('/roadmap.json'); + const fresh = await res.json(); + const existingIds = new Set(data.apps.map(a => a.id)); + let changed = false; + for (const app of fresh.apps) { + if (!existingIds.has(app.id)) { + data.apps.push(app); + changed = true; + } + } + if (changed) persist(); + return; + } catch (_) {} + } } const res = await fetch('/roadmap.json'); data = await res.json();