Repository navigation
fix(space-members): seed popover/dialog count from SSR to avoid 0-flash - #1751
jwalkingjew wants to merge 1 commit into
Conversation
The members and editors popovers (and their Manage… dialogs) were starting from `totalCount = 0` until the first paginated API page resolved, so the footer/header briefly read "0 members" before snapping to the real value. Pass `space.totalMembers` / `space.totalEditors` from the server-rendered parent (already present on the Space DTO) into the client components, and use it as the initial fallback inside `useSpaceParticipantsInfinite`. The live API count overrides it as soon as the first page lands.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Closing as part of a sweep of the open-PR queue. Not a judgement on the work — reopen if you still want it and I will help get it current. Opened 2026-05-01 and now conflicting with master. At this distance a rebase is usually more work than redoing the change against current code, and the surrounding code has moved a long way underneath "fix(space-members): seed popover/dialog count from SSR to avoid 0-flash". @jwalkingjew — if the idea still stands but the branch does not, a fresh PR or a ticket is probably a better route than reviving this one. Nothing is discarded: the branch and its history remain, and reopening costs a click. Context: 74 PRs were open, 25 older than two months, the oldest from February. The point is to make the queue mean something so genuinely ready work is visible rather than buried — #2449 sat ready for three days this week partly because of the noise. Only non-draft, conflicting PRs are in scope; drafts and anything still mergeable are being left alone. |
Summary
Follow-up to #1749. The members/editors popovers (and the Manage… dialogs) briefly rendered "0 members" / "0 editors" on open before the first paginated API page resolved, even though the chip already had the correct number from SSR.
The chip reads
space.totalMembers/space.totalEditorsserver-side (added in #1733). This change threads those same numbers into the popover/dialog asinitialTotalMembers/initialTotalEditors, and the shareduseSpaceParticipantsInfinitehook uses them as the fallback until the live API count arrives.So the count is correct on first paint and only ever "refreshes" if the SSR value and the live API value disagree (which they shouldn't — both come from the same GraphQL
totalCount).Test plan
231 membersimmediately, no flash to 0.231 membersimmediately.