Skip to content

fix(checkin): section the check-in list by the grouping mode - #299

Merged
luflow merged 2 commits into
mainfrom
claude/checkin-list-grouping-4b0866
Oct 9, 2026
Merged

luflow merged 2 commits into
mainfrom
claude/checkin-list-grouping-4b0866

Conversation

@luflow

@luflow luflow commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • The check-in list ignored the grouping mode ([Bug] Error grouping participants #212, reported again by a user for the mobile app): GET /api/appointments/{id}/checkin-data still shipped every Nextcloud group as userGroups and every group of a user in groups whenever the whitelist was empty — the old fan-out that feat(summary): make response-summary grouping an explicit mode #222 removed from the response summary. The web view only uses userGroups as a filter dropdown, so it looked right there; the mobile app sections the list by it and showed arbitrary account groups.
  • One rule for which groups section a list: ConfigService::sectionGroups() (static, so the service tests with a mocked ConfigService stay untouched) now drives the response summary, the export and the check-in data alike: the admin's list in "specific" mode, otherwise a restricted appointment's own groups ([Bug] Restricting access disables grouping in answers #199), otherwise all groups in "all" mode and none in "none".
  • Per-user groups carries only the sections the user belongs to, spelled as the section list spells them (matched case-insensitively). Clients render it without intersecting again. Wire-compatible: old mobile builds already keep only groups listed in userGroups and fall back to a single "Others" section when the list is empty.
  • Web: the group filter in the check-in view hides when no groups come back.
  • e2e: resetAdminSettings() resets both grouping modes; the guests spec sends the mode explicitly like the admin UI does; the mode-switching check-in filter test lives in a new sequential-admin spec (41-checkin-group-filter.spec.js), and goToCheckin() moved into the fixtures.

Paired mobile PR: luflow/attendance-flutter#115 (renders a headerless list and no group filter when userGroups is empty).

Follow-ups noted, not in this PR: the "Others" sentinel appears in userGroups only in "all" mode; ResponseSummaryService::isGroupAllowedCached() could read the shared rule too.

Test plan

  • ./scripts/check.sh green (eslint, stylelint, php-cs-fixer, psalm, PHPUnit, vite build, l10n checks, OpenAPI spec)
  • New CheckinServiceTest cases: "none" ships a flat list without touching getAllGroupIds(), "all" sections by every group, "specific" by the admin's list (its spelling wins), a restricted appointment by its own groups
  • e2e against an isolated local server: checkin.spec.js, 41-checkin-group-filter.spec.js, 5-export, 6-visibility-groups, 16-guests-integration pass; the remaining suite runs in CI

🤖 Generated with Claude Code

luflow added 2 commits October 9, 2026 13:25
The check-in data still shipped every Nextcloud group when the admin
chose "No grouping", so the mobile app sectioned the list by arbitrary
account groups (#212). The web only used the list as a filter, which is
why it looked right there.

The rule deciding which groups section a list (specific: the admin's
list; otherwise a restricted appointment's own groups; otherwise all or
none) now lives once in ConfigService::sectionGroups() and drives the
response summary, the export and the check-in data alike. Each user
carries only the sections they belong to, spelled as the list spells
them, so clients match them without normalising. The web hides the
group filter when nothing comes back; old mobile builds fall back to a
single "Others" section with the new payload.

e2e: resetAdminSettings() now also resets both grouping modes, so the
guests spec sends the mode explicitly like the admin UI does; the
mode-switching check-in filter test lives in its own sequential-admin
spec.
…mode

Two "Group Select Field Behavior" tests expected the whitelist picker
right after loading the page. It was only there because an earlier test
had switched the row to "Specific groups" and the reset never undid it.
Now that resetAdminSettings() resets the mode, the tests select the mode
themselves, and the API-driven order tests send it along as the admin
UI does.
@luflow
luflow merged commit 9c4d786 into main Oct 9, 2026
6 checks passed
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