Tidy the admin editor's text: previews, blank options, no em-dashes

Your wording pass on adminSchema.ts and fields.tsx: "Default: ..."
blank options, "eg." examples, "URL ID" for slugs, and relabelled
front page sections, stat sources and hero fields.

On top of it:

- Content block row titles end with an ellipsis when the paragraph
  is cut. preview() in src/lib/text.ts does it for anything that
  shortens text: it collapses whitespace, cuts on a word and adds
  "..." only when it actually shortened.
- No em-dashes in the editor, front end or server: placeholders
  ("Internal note: ..."), the Organizations blurb, the URL ID help,
  empty table cells (now "-"), the Award dropdown ("Torch Award
  (NGU)" in OPTION_QUERIES), a boot error message, and every comment
  in the admin files. Also cleared from the files added this branch
  (QR page, directory route, embeds, hero, migration 024), and the
  QR page's team labels read "Board (NGU)".
- A few comments where removing the dash had run two sentences
  together get a comma, colon or parentheses back.
- docs/updating-data-in-code.md matches the new labels and gains a
  "Writing text in the editor" section with these conventions;
  CLAUDE.md lists them under Rules and gotchas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-26 19:38:24 -05:00
parent e35d09b172
commit 54bf649b8d
31 changed files with 239 additions and 187 deletions

View file

@ -12,7 +12,7 @@
feedback routes. Both sit under the same requireAuth.
:entity is matched against the descriptor map, never
interpolated into SQL from the URL — an unknown name is a 404
interpolated into SQL from the URL; an unknown name is a 404
before anything touches the database.
═══════════════════════════════════════════════════════════════ */

View file

@ -90,7 +90,7 @@ admin.get("/feedback", (c) => {
});
/* ── PATCH /api/admin/feedback/:id ───────────────────────────────
{ status?, admin_note? } — either, both, partial.
{ status?, admin_note? }: either, both, partial.
───────────────────────────────────────────────────────────── */
admin.patch("/feedback/:id", requireRole("editor"), async (c) => {

View file

@ -1,5 +1,5 @@
/* ═══════════════════════════════════════════════════════════════
DIRECTORY ROUTE — read-only, mounted under /api
DIRECTORY ROUTE: read-only, mounted under /api
GET /directory every public record that has a page

View file

@ -1,12 +1,12 @@
/* ═══════════════════════════════════════════════════════════════
PANEL ROUTES — server/src/routes/panel.js
PANEL ROUTES: server/src/routes/panel.js
GET /api/admin/panel/overview
PATCH /api/admin/panel/users/:id role, is_active
DELETE /api/admin/panel/users/:id/sessions sign out everywhere
Everything here is superadmin-only, enforced once at the top
rather than per route — there's no read here that an ordinary
rather than per route; there's no read here that an ordinary
admin should have either. Account records and live session
counts are a different class of thing from content.
@ -88,7 +88,7 @@ panel.get("/overview", (c) => {
});
/* A table that hasn't been created yet shouldn't take the whole
page down — the panel is where you go when something is wrong. */
page down: the panel is where you go when something is wrong. */
function count(db, table, where) {
try {
const sql = `SELECT COUNT(*) AS n FROM ${table}${where ? ` WHERE ${where}` : ""}`;