Follow-up to the N+1 fix. The person page fetched the entire tree on every open — all persons (name map + relative pickers) and all events (partnership events). Now it loads only what it shows.
Frontend
Relationship & spouse pickers use the backend fuzzy pg_trgm search (debounced, typo-tolerant) instead of substring-filtering a preloaded array. PersonCombobox gained an onSearch server mode (client people mode still supported).
Drops the all-persons + all-events fetches; resolves just the relatives' names via GET /persons?ids=..., and reads partnership events from the per-person events endpoint.
Backend
GET /trees/{id}/persons?ids=a,b,c — batch by id (privacy-filtered, names batched).
list_events_for_person (member path) now also returns the person's partnership events.
Verification: adversarial review (frontend-logic + backend/privacy lenses) found 0 issues; suite 105 passing; frontend type-checks clean. No migration.
Follow-up to the N+1 fix. The person page fetched the **entire tree** on every open — all persons (name map + relative pickers) and all events (partnership events). Now it loads only what it shows.
**Frontend**
- Relationship & spouse pickers use the backend fuzzy `pg_trgm` search (debounced, typo-tolerant) instead of substring-filtering a preloaded array. `PersonCombobox` gained an `onSearch` server mode (client `people` mode still supported).
- Drops the all-persons + all-events fetches; resolves just the relatives' names via `GET /persons?ids=...`, and reads partnership events from the per-person events endpoint.
**Backend**
- `GET /trees/{id}/persons?ids=a,b,c` — batch by id (privacy-filtered, names batched).
- `list_events_for_person` (member path) now also returns the person's partnership events.
**Verification:** adversarial review (frontend-logic + backend/privacy lenses) found **0 issues**; suite **105 passing**; frontend type-checks clean. No migration.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The person page fetched the entire tree on every open — all persons (to build a
name map + power the relative pickers) and all events (to find partnership
events). On a 2k-person tree that's a ~230KB person list + ~600KB event list per
view. Now it loads only what the page shows:
Frontend:
- The relationship & spouse pickers use the backend's fuzzy pg_trgm search
(debounced, typo-tolerant) instead of substring-filtering a preloaded array —
better search, and no need to preload every person. PersonCombobox gained an
`onSearch` server mode (client `people` mode still works).
- The page drops the all-persons and all-events fetches; it resolves just this
person's relatives' names via GET /persons?ids=..., and reads partnership
events from the per-person events endpoint.
Backend:
- GET /trees/{id}/persons?ids=a,b,c — batch by id (privacy-filtered, names
batched), for relative-name display.
- list_events_for_person (member path) now also returns the person's partnership
events, so the page needn't scan every event in the tree.
Adversarial review (frontend logic + backend/privacy) found no issues. Suite 105
passing.
Signed-off-by: Justin Paul <[email protected]>
justin
merged commit e7115023e1 into main2026-06-11 08:29:33 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to the N+1 fix. The person page fetched the entire tree on every open — all persons (name map + relative pickers) and all events (partnership events). Now it loads only what it shows.
Frontend
pg_trgmsearch (debounced, typo-tolerant) instead of substring-filtering a preloaded array.PersonComboboxgained anonSearchserver mode (clientpeoplemode still supported).GET /persons?ids=..., and reads partnership events from the per-person events endpoint.Backend
GET /trees/{id}/persons?ids=a,b,c— batch by id (privacy-filtered, names batched).list_events_for_person(member path) now also returns the person's partnership events.Verification: adversarial review (frontend-logic + backend/privacy lenses) found 0 issues; suite 105 passing; frontend type-checks clean. No migration.
🤖 Generated with Claude Code
The person page fetched the entire tree on every open — all persons (to build a name map + power the relative pickers) and all events (to find partnership events). On a 2k-person tree that's a ~230KB person list + ~600KB event list per view. Now it loads only what the page shows: Frontend: - The relationship & spouse pickers use the backend's fuzzy pg_trgm search (debounced, typo-tolerant) instead of substring-filtering a preloaded array — better search, and no need to preload every person. PersonCombobox gained an `onSearch` server mode (client `people` mode still works). - The page drops the all-persons and all-events fetches; it resolves just this person's relatives' names via GET /persons?ids=..., and reads partnership events from the per-person events endpoint. Backend: - GET /trees/{id}/persons?ids=a,b,c — batch by id (privacy-filtered, names batched), for relative-name display. - list_events_for_person (member path) now also returns the person's partnership events, so the page needn't scan every event in the tree. Adversarial review (frontend logic + backend/privacy) found no issues. Suite 105 passing. Signed-off-by: Justin Paul <[email protected]>