Repository navigation
[access] refactor(people): split PeopleWidgetService directory paging, candidates and account fields into named steps - #1080
Open
rubenvdlinde wants to merge 2 commits into
Open
rubenvdlinde wants to merge 2 commits into
rubenvdlinde wants to merge 2 commits into
Conversation
…d account fields before the split Assisted-by: ClaudeCode:claude-opus-5-5
…tes and account fields into named steps Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
WilcoLouwerse,
bbrands02 and
rjzondervan
as code owners
November 11, 2026 18:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Five
PeopleWidgetServiceunits that decide which people and fields the People widget shows read as named steps. This PR touches different methods than the open birthdate /listUserssplit of the same file and merges cleanly with it.collectDisplayNamePagestreams the directory in chunks (displayNameBatch) into a newDisplayNamePageCollector, a small final run object built for one page: disabled users skipped when asked, the window's offset skipped, users taken until the page is full, then stopping on an exhausted backend, as before.searchCandidates→directoryMatches→withFieldMatches(profile-field matches the viewer may see, merged after the name matches; UIDs that no longer resolve left out), thenwithinGroupsfor a group filter.resolveCandidates→groupFilterMembers;collectGroupMembers→groupUsers, keeping each user's first place.buildAccountFields→shownProperties(no birthdate when birthdays are off, so it is not even read) →accountField/birthdateField.Which people are listed and which fields a viewer sees are unchanged, with the same backend calls in the same order.
Characterisation tests
tests/Unit/Service/PeopleWidgetVisibilityGoldenTest.phpwas committed first, against the old code, and passes before and after: directory pages with and without disabled users, offsets inside and past the directory, an empty directory, and chunked streaming that stops when the page is full or the backend is exhausted (with the exact backend calls); group members de-duplicated in order with malformed ids and missing groups dropped; every candidate filter shape; the search merge order with its exact calls and the group intersection; and the account fields for visible, private, birthday-off and unparsable values, a failing account lookup and the unread birthdate. Mutation check: no longer skipping disabled users on the old code turned four goldens red; restored before committing.What ran
vendor/bin/phpunit -c phpunit.xml --no-coverage tests/Unit: 2764 tests OK (13 skipped, as on development).vendor/bin/phpcsandvendor/bin/phpstan analyseon the touched lib files: clean.vendor/bin/phpmdonPeopleWidgetService: one new finding,TooManyMethods(27 methods against a limit of 25), the cost of turning long methods into named private steps;composer phpmdis already red on development for other classes.Figures (touched files
lib/Service/PeopleWidgetService.php,lib/Service/DisplayNamePageCollector.php)listUsers, split in the other open PR)App-wide: unit complexity 4.02 → 4.08, unit size 3.40 → 3.42.
Maintainability floor: compare against development holds.
AI-assisted: prepared with Claude Code (claude-opus-5-5); reviewed by a maintainer before merge.
Generated by Claude Code