Activity-coverage page: content hidden under fixed menu bar; user scope requires raw KeycloakUserId #616

Closed
opened 2026-07-16 16:43:27 +00:00 by spikerj · 0 comments
Owner

Two problems on https://learn.spikersoft.com/admin/activity-coverage, plus a role gap:

  1. Layout — the page's :host is missing the padding-top offset every other page uses to clear the fixed app-menu-bar, so the header/filters render under the menu. The sibling /admin/platform-adoption page has the identical omission.

  2. User scoping UX — "Scope to user" is a free-text field expecting a raw KeycloakUserId, which forces a trip through the keycloak-admin UI (whose landing list doesn't even show user IDs — the ID is only visible after clicking into a user). It should be a searchable picker showing real name + username (two-line, with a toggle for which is primary), searching either field.

  3. Parent access — parents should be able to use this same screen to see what their kids have been doing, picking between their linked children by name. Requires: route access beyond staff (no "Parent" Keycloak role exists — parenthood is a profile fact), and server-side authorization on GET /api/activity/coverage so a non-staff caller can only query users linked to them via parental controls.

Also closes two smaller gaps while in there:

  • platform-adoption deep-links to /admin/activity-coverage?userId=... but the page never read the query param;
  • selecting a user now auto-fetches (previously the userId field only applied on manual Refresh).

Fixes span both repos (backend: slim GET api/User/search endpoint + coverage authz; frontend: @spikersoft/ui-user-picker + @spikersoft/domain-users libs, StaffOrParentGuard, page rewire).

Two problems on https://learn.spikersoft.com/admin/activity-coverage, plus a role gap: 1. **Layout** — the page's `:host` is missing the `padding-top` offset every other page uses to clear the fixed `app-menu-bar`, so the header/filters render under the menu. The sibling `/admin/platform-adoption` page has the identical omission. 2. **User scoping UX** — "Scope to user" is a free-text field expecting a raw KeycloakUserId, which forces a trip through the keycloak-admin UI (whose landing list doesn't even show user IDs — the ID is only visible after clicking into a user). It should be a searchable picker showing real name + username (two-line, with a toggle for which is primary), searching either field. 3. **Parent access** — parents should be able to use this same screen to see what their kids have been doing, picking between their linked children by name. Requires: route access beyond staff (no "Parent" Keycloak role exists — parenthood is a profile fact), and server-side authorization on `GET /api/activity/coverage` so a non-staff caller can only query users linked to them via parental controls. Also closes two smaller gaps while in there: - platform-adoption deep-links to `/admin/activity-coverage?userId=...` but the page never read the query param; - selecting a user now auto-fetches (previously the userId field only applied on manual Refresh). Fixes span both repos (backend: slim `GET api/User/search` endpoint + coverage authz; frontend: `@spikersoft/ui-user-picker` + `@spikersoft/domain-users` libs, StaffOrParentGuard, page rewire).
Sign in to join this conversation.