1
0
Fork 0

fix(wiki): update placeholder text and improve clarity in wiki editor and standards dialog

This commit is contained in:
Jason Fraley 2026-09-05 02:07:35 -04:00
parent 93f61d5ef8
commit 5430c02fbc
4 changed files with 9 additions and 5 deletions

View file

@ -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/<filename>)` — 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/<filename>)` — 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

View file

@ -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

View file

@ -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"
/>

View file

@ -32,7 +32,7 @@ export function WikiStandardsDialog({ open, onOpenChange, onAccept }: WikiStanda
Contribute content that is authentic, serious, and relevant to the subject at hand.
</p>
<p>
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.
</p>
<p>