Clean up code found in the audit

- Replace every em-dash in src and server/src with a colon, comma or hyphen
- Give every relative import its file extension (.jsx imports of .tsx fixed)
- Delete old-historyMock.ts, unused exports, unused CSS utilities, the
  unused @ alias and the fallback option nothing passed
- One copy each of initials, capitalize, byName and the server's marks()
- Move the organization, chapter and event hooks from src/data to src/lib
- Schema sync always throws on a mismatch (strict was never turned off)
- Replace the placeholder README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-28 22:02:03 -05:00
parent 4066e9ec61
commit 5274e09571
75 changed files with 282 additions and 688 deletions

View file

@ -1,12 +1,12 @@
/* ═══════════════════════════════════════════════════════════════
PEOPLE ROUTES — read-only, mounted under /api
PEOPLE ROUTES: read-only, mounted under /api
GET /teams/:id/people current public members of a team
GET /people?ids=a,b,c named people, any order
GET /people/:id one person's page
The team route reads v_org_leadership, which already decides who
counts as current and public — affiliation still open, marked
counts as current and public, affiliation still open, marked
public, person published. Restating those conditions here is how
they drift apart.
@ -21,7 +21,7 @@
import { Hono } from "hono";
import { asBool, loadBlocks, loadLinks, paragraphs, splitLinks } from "../shape.js";
import { asBool, loadBlocks, loadLinks, marks, paragraphs, splitLinks } from "../shape.js";
const people = new Hono();
@ -29,7 +29,6 @@ const CACHE = "public, max-age=60, stale-while-revalidate=300";
const json = (c, body) => c.json(body, 200, { "Cache-Control": CACHE });
const marks = (n) => Array(n).fill("?").join(",");
/* How many slugs one request may name. Keeps the URL sane. */
const MAX_IDS = 50;
@ -55,7 +54,7 @@ function shapePerson(row) {
}
/* people.bio is one run of prose with blank lines between
paragraphs — unrelated to shape.js's paragraphs(), which turns
paragraphs, unrelated to shape.js's paragraphs(), which turns
content_block rows into text. */
function splitParagraphs(text) {
if (!text) return null;
@ -144,7 +143,7 @@ people.get("/people", (c) => {
the same visibility rules its own page applies: a role needs a
public affiliation and a published organization, an event must
be published, an award must be published and the citation
public. A hidden team drops its name rather than the role —
public. A hidden team drops its name rather than the role,
the seat is still real, it just has no page to link to.
Roles are current and past. v_org_leadership only knows