Add person detail page and link people tiles to it #6

Merged
ngu-git-admin merged 1 commit from feature/person-detail into main 2026-09-25 11:13:30 +01:00

Adds a public page for each person at /people/:id. Award and event pages already linked there, but there was no page behind the link.

API

GET /api/people/:id (in server/src/routes/people.js). It returns 404 for a person who is unpublished or doesn't exist.

  • Profile: name, pronouns, tagline, photo, location, public email, the person's primary organization (if it's published), bio, links and socials, and content blocks. public_phone is never sent.
  • Roles: public affiliations at published organizations, including past ones. Current roles come first, then past ones, most recently ended first. If a role's team is unpublished, the role still shows without the team.
  • Events: published events where the person is publicly listed (event_people) or is a host (event_hosts). An event where they're both appears once, listing both roles.
  • Awards: published awards with public citations, with the event where each was presented, if that event is published.

Page

src/pages/PersonDetail.tsx is built the same way as the other detail pages (PageShell, PageState). It has four sections: About, Roles (current, then "Previously" with years), Events, and Awards. A section with nothing in it doesn't render.

People tiles

  • A tile with a people id links to that person's page.
  • A tile that expands into a details panel keeps doing that. The panel gets a "View full profile" link, because a link can't go inside the button.
  • A hand-written tile without an id doesn't link anywhere.

Testing

  • pnpm exec tsc and pnpm build pass.
  • The endpoint was tested against a newly migrated database with sample data. It left out unpublished organizations, private affiliations, draft events and the phone number, and returned 404 for unpublished and missing people.
  • Verified working in browser (Aidan)

🤖 Generated with Claude Code

Adds a public page for each person at `/people/:id`. Award and event pages already linked there, but there was no page behind the link. ## API `GET /api/people/:id` (in `server/src/routes/people.js`). It returns 404 for a person who is unpublished or doesn't exist. - **Profile:** name, pronouns, tagline, photo, location, public email, the person's primary organization (if it's published), bio, links and socials, and content blocks. `public_phone` is never sent. - **Roles:** public affiliations at published organizations, including past ones. Current roles come first, then past ones, most recently ended first. If a role's team is unpublished, the role still shows without the team. - **Events:** published events where the person is publicly listed (`event_people`) or is a host (`event_hosts`). An event where they're both appears once, listing both roles. - **Awards:** published awards with public citations, with the event where each was presented, if that event is published. ## Page `src/pages/PersonDetail.tsx` is built the same way as the other detail pages (`PageShell`, `PageState`). It has four sections: About, Roles (current, then "Previously" with years), Events, and Awards. A section with nothing in it doesn't render. ## People tiles - A tile with a people id links to that person's page. - A tile that expands into a details panel keeps doing that. The panel gets a "View full profile" link, because a link can't go inside the button. - A hand-written tile without an id doesn't link anywhere. ## Testing - `pnpm exec tsc` and `pnpm build` pass. - The endpoint was tested against a newly migrated database with sample data. It left out unpublished organizations, private affiliations, draft events and the phone number, and returned 404 for unpublished and missing people. - Verified working in browser (Aidan) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ngu-git-admin added 1 commit 2026-09-25 11:13:09 +01:00
GET /api/people/:id returns a published person's profile, public
roles (current and past), published events they were billed at or
hosted, and public awards, each under the same visibility rules its
own page applies. public_phone is never sent.

PersonDetail renders it at /people/:id, the route personHref already
pointed at. PeopleTiles links a tile with a people id to that page;
an expandable tile keeps its details panel and the panel carries a
"View full profile" link instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ngu-git-admin merged commit b4b013209b into main 2026-09-25 11:13:30 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: ngu-git-admin/NGU-Web#6
No description provided.