diff --git a/AGENTS.md b/AGENTS.md index 0bbe95f..674e79e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -268,7 +268,7 @@ gameTick → POST `/api/game-tick/notify` (guarded by `x-game-tick-secret` heade - **UI**: `src/app/(frontend)/wiki/`: `/wiki` index (`WikiIndex`: search, tag filter, category tabs, "New page"), `/wiki/new`, `/wiki/[slug]` (detail: `WikiContent` render + `WikiToolbar` with Edit/History/Lock/Delete; `LockdownBanner` when locked; missing pages show a "Create this page" CTA that prefills `?title=`), `/wiki/[slug]/edit` (redirects to `/wiki/new?title=` for missing pages, shows `LockdownBanner` when locked), `/wiki/[slug]/history` (`RevisionList` with type badges and moderator-only Restore). Tests: `tests/int/wiki.int.spec.ts`. - **Event targets**: `wiki-pages`, `wiki-revisions`, `wiki-templates` added to `GameEventLogs` `TARGET_COLLECTIONS` and `emit.ts` `targetCollection` union. Wiki event types in `eventTypes.ts`. - **Database**: migration batch 28 `src/migrations/20260904_230838_add_wiki_collections.ts`: tables `wiki_pages` (+ `_texts`), `wiki_revisions`, `wiki_templates`, plus the three wiki values added to the `game_event_logs` `target_collection` enum. Dev uses `bun run payload migrate` for schema changes (`push: false`). -- **Gotchas**: image uploads go through the `uploadWikiImage` server action in `src/app/(frontend)/wiki/actions.ts` (any logged-in user, image MIME only, 8 MB cap, stored in `media` with `read: () => true` so images are public; the editor toolbar's "Upload image" button inserts `![alt](/api/media/file/)` — requires `serverActions.bodySizeLimit` (10mb) in `next.config.mjs`); lockdown blocks edit/restore server-side (actions throw `"This page is locked and cannot be edited."`); restore/delete/lock are intelligence-qualification gated; `WikiRevisions` denies create/update/delete outright, so all revision writes go through the service layer with `overrideAccess`. +- **Gotchas**: image uploads go through the `uploadWikiImage` server action in `src/app/(frontend)/wiki/actions.ts` (any logged-in user, image MIME only, 8 MB cap, stored in `media` with `read: () => true` so images are public; the editor toolbar's "Upload image" button inserts `![alt](/api/media/file/)` — requires `experimental.serverActions.bodySizeLimit` (10mb) in `next.config.mjs`); lockdown blocks edit/restore server-side (actions throw `"This page is locked and cannot be edited."`); restore/delete/lock are intelligence-qualification gated; `WikiRevisions` denies create/update/delete outright, so all revision writes go through the service layer with `overrideAccess`. ## Discord Bot diff --git a/next.config.mjs b/next.config.mjs index c7a1cfd..1bab46a 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -12,8 +12,12 @@ const nextConfig = { // Server Actions default to a 1 MB request body limit, which would reject // most image uploads. Bump it so wiki image uploads (capped at 8 MB in the // uploadWikiImage action) pass through with room for multipart overhead. - serverActions: { - bodySizeLimit: "10mb", + // Next 16 keeps serverActions under `experimental` — a top-level key is not + // recognized ("Unrecognized key(s) in object: 'serverActions'"). + experimental: { + serverActions: { + bodySizeLimit: "10mb", + }, }, // Pin the workspace root to this repo dir so the standalone build emits a // flat .next/standalone/server.js (Next otherwise walks up looking for diff --git a/src/components/frontend/wiki/WikiEditorBody.tsx b/src/components/frontend/wiki/WikiEditorBody.tsx index 9882d17..d43e4bc 100644 --- a/src/components/frontend/wiki/WikiEditorBody.tsx +++ b/src/components/frontend/wiki/WikiEditorBody.tsx @@ -283,7 +283,7 @@ export function WikiEditorBody({ value={body} onChange={(event) => onBodyChange(event.target.value)} onKeyDown={handleBodyKeyDown} - placeholder="# Situation\n\nWrite the field guide entry in Markdown..." + placeholder="Write the field guide entry in Markdown." disabled={pending} className="font-mono text-sm" /> diff --git a/src/components/frontend/wiki/WikiStandardsDialog.tsx b/src/components/frontend/wiki/WikiStandardsDialog.tsx index f999353..569d11e 100644 --- a/src/components/frontend/wiki/WikiStandardsDialog.tsx +++ b/src/components/frontend/wiki/WikiStandardsDialog.tsx @@ -32,7 +32,7 @@ export function WikiStandardsDialog({ open, onOpenChange, onAccept }: WikiStanda Contribute content that is authentic, serious, and relevant to the subject at hand.

- This is a legitimate wiki — not a place for jokes, memes, or off-topic entries. Write + This is a legitimate wiki - not a place for jokes, memes, or off-topic entries. Write as if the record will still be read long after today.