Skip to content

People lists page and search; people are picked from the organization only - #2099

Merged
davidmckayv merged 1 commit into
mainfrom
slice8-people-search-app
Nov 24, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
slice8-people-search-app

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

Organizations can have any number of people, so every list of them now pages and searches the way Admin's People already does, and a person is only ever picked from inside the organization.

Lists that page and search

Organization settings' Members and Invitations, the Teams list and a team's people each show one page (the API's 50), with:

  • a search box above the rows that asks the server as you type (250 ms debounce): "sar" finds Sarah, Sara and Sarita, anywhere in the name or address, whatever the case. Members and a team's people search by name or address, Invitations by address, Teams by name;
  • Show more only while the server returns a nextCursor;
  • No matches with the search icon when a search finds nobody, in Admin's People's words.

Each search is its own infinite query under the list's existing key (organizations/members/<org>, organizations/sent-invitations/<org>, teams/list, teams/members/<team>), so every existing write's invalidation still refreshes them. Screens that need every team (parent picker, grants, sharing, approvals) and Activity's id-to-address lookup keep reading the whole list.

A team's page no longer reads the whole team either: Leave comes from the person's own row, and Add person marks who is in the team already from the team's own search with the same words, then checks again just before adding, so a maintainer is never added over as a member. The Teams list names a parent team that is off the loaded page by reading that one team.

People are picked from the organization only

One type-ahead over the organization's own members (listOrganizationMembers with search, a short page at a time) now serves every place a person is picked:

  • adding somebody to a team (already a type-ahead; now shared);
  • adding somebody to a group conversation (was a free email box);
  • choosing who a Bot is published to (was comma-separated addresses).

Somebody already there is listed as such and can't be chosen. Nothing searches or shows anyone outside the organization. Inviting somebody new stays a plain email box with no suggestions.

Tests

app/tests/people-lists.test.tsx draws the real screens in a real browser against the API's shapes (people-lists-api.ts: 50 a page by default, cursors bound to their list and search and refused otherwise, nextCursor null at the end, search matched anywhere ignoring case), and is added to CI's WebKit job, which runs it in Chromium and WebKit:

  • each of the four lists shows 50, Show more loads the last 5 and goes away, "sar" and "SAR" are sent to the server and narrow the rows to the three, and "zzz" says No matches;
  • each of the three pickers offers exactly Sarah, Sara and Sarita for "sar", marks the one already there, never shows the other organization's people, sends every search to this organization's members (and, for a team, its own members), and sends the right write for the person chosen;
  • every screen at 1440 and 390, light and dark, never scrolls sideways.

Before this change the list and picker tests fail (all 55 rows drawn at once, no search box, no type-ahead in the group or Publish dialogs); after it, 102 pass in Chromium and WebKit. The happy-dom tests for the group dialog, Sharing and Organization settings are updated to the new controls.

@davidmckayv
davidmckayv force-pushed the slice8-people-search-app branch 4 times, most recently from 3938527 to aa9f478 Compare November 24, 2026 01:46
… only

Organization settings' Members and Invitations, the Teams list and a team's people now show a page at a time, as Admin's People does: a search box above the rows that asks the server as you type (250 ms debounce), Show more only while the server says there is another page, and No matches when a search finds nobody. Typing "sar" finds Sarah, Sara and Sarita, anywhere in the name or address, whatever the case. Each search is its own cache entry under the list's existing key, so every write that refreshed a list still does. Pickers that need every team (parents, grants, sharing) keep reading the whole list.

Adding somebody to a team, to a group conversation, or to who a Bot is published to is one type-ahead over the organization's own members, a short page at a time. The group dialog's email box and the Publish dialog's comma-separated addresses are gone; nobody outside the organization can be found or added. Inviting somebody new stays a plain email box with no suggestions.

A team's Add person no longer reads the whole team to mark who is in it already: it asks the team's own search with the same words, and checks again just before adding, so a maintainer is never added over as a member. A team's Leave comes from the person's own row, and the Teams list names a parent team that is off the loaded page by reading that team.

people-lists.test.tsx draws each screen in a real browser against the API's shapes (50 a page, cursors bound to their search, nextCursor null at the end) and runs in CI's WebKit job in Chromium and WebKit.
@davidmckayv
davidmckayv force-pushed the slice8-people-search-app branch from aa9f478 to 309d3b7 Compare November 24, 2026 02:08
@davidmckayv
davidmckayv merged commit 3744fc9 into main Nov 24, 2026
35 checks passed
@davidmckayv
davidmckayv deleted the slice8-people-search-app branch November 24, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant