Add a Before launch placeholder check to admin

Lists pages still showing built-in wording, notes holding placeholder
text, unpublished posts and live notes missing the field their page is
built around, each linked to its editor.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012aSbo2D1qP8cMFQCykf7kx
This commit is contained in:
Claude
2026-10-18 16:52:56 +00:00
parent 2a3a15d7ac
commit 02437358cf
7 changed files with 115 additions and 0 deletions
+3
View File
@@ -19,6 +19,7 @@ import * as inbox from "./inbox.ts";
import * as posts from "./posts.ts";
import * as editor from "./editor.ts";
import { sitePagesView } from "./sitepages.ts";
import { launchCheck, launchPage } from "./launch.ts";
import { suggestionChange, suggestionsPanel } from "./suggestions.ts";
const css = readFileSync(new URL("../public/admin.css", import.meta.url), "utf8");
@@ -134,6 +135,8 @@ export function createAdminServer(api: ContentApi, opts: { now?: () => Date } =
const singles = new Map(all.slice(1).flatMap((l) => (l[0] ? [[l[0].type, l[0]] as const] : [])));
return { title: "Site pages", body: sitePagesView(all[0]!, singles) };
}
case "/launch":
return { title: "Before launch", body: launchPage(launchCheck(await api.allNotes())) };
case "/edit": {
const note = await api.note(required(q, "path"));
if (note.type === "post") return new Redirect(posts.editHref(note.path));