fix: ensure demo community visibility is always public on startup
The demo Automerge doc had visibility: "private" from initial creation. ensureDemoCommunity now forces visibility to "public" on every startup if it drifted. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
90d511077c
commit
f2c3245240
|
|
@ -14,6 +14,7 @@ import {
|
|||
getDocumentData,
|
||||
loadCommunity,
|
||||
markShapesSeeded,
|
||||
updateSpaceMeta,
|
||||
} from "./community-store";
|
||||
|
||||
// ── Alpine Explorer 2026 — Demo Scenario ──────────────────────────
|
||||
|
|
@ -780,6 +781,12 @@ export async function ensureDemoCommunity(): Promise<void> {
|
|||
console.log("[Demo] Created demo community with visibility: public");
|
||||
} else {
|
||||
await loadCommunity("demo");
|
||||
// Ensure visibility stays "public" (older docs may have been created as "private")
|
||||
const doc = getDocumentData("demo");
|
||||
if (doc?.meta?.visibility !== "public") {
|
||||
updateSpaceMeta("demo", { visibility: "public" });
|
||||
console.log("[Demo] Fixed demo visibility → public");
|
||||
}
|
||||
}
|
||||
|
||||
// Check if already seeded (has shapes or was previously seeded then cleared)
|
||||
|
|
|
|||
Loading…
Reference in New Issue