fix(inbox): refetch + virtualize + server-search the people pickers#2616
fix(inbox): refetch + virtualize + server-search the people pickers#2616Twixes wants to merge 1 commit into
Conversation
The inbox scope ("Entire project") selector kept its people query mounted
permanently, so it never re-fetched on open and went stale until the 60s
background refetch — the reported "assignee listing doesn't re-fetch" bug.
Rework both people pickers (Reviewers + inbox scope) onto a shared,
virtualized `PeoplePickerList`:
- The list now lives in a Popover whose content only mounts while open, so
the query re-fetches on every open.
- Search is server-side via the `available_reviewers` `?query=` param
(shared `useReviewerPickerOptions` hook), debounced.
- Rows are virtualized so large orgs stay responsive.
- An empty result surfaces a hint to connect a GitHub profile, linking to
the PostHog personal settings page.
Generated-By: PostHog Code
Task-Id: 0bc8b5f0-0480-4c5e-8791-1a4a9736a6e7
|
React Doctor could not complete this scan.
Reviewed by React Doctor for commit |
|
Problem
The inbox assignee / "Entire project" scope selector broke: it didn't re-fetch, so the people list went stale (reported by Olly/Rafa in Slack). While in there, the PostHog/code people listings in both Reviewers and Entire project also needed: a virtualized list, server-side search, and a helpful empty state.
Changes
PeoplePickerList— a searchable, virtualized people list (only visible rows mount, so it stays responsive for large orgs) with the empty-state hint.useReviewerPickerOptionshook driving server-side search through theavailable_reviewers?query=param (debounced), and pinning "me" only on the unfiltered base list.SuggestedReviewersSection) and inbox scope picker (InboxScopeSelect) both rewired onto the shared list./settings/user).How did you test this?
pnpm build(all packages) — green.pnpm --filter @posthog/ui typecheck— green.biome checkon the changed/added files — clean.Automatic notifications
Created with PostHog Code from a Slack thread