Admin dashboard: client activity overview and invitations #4

Closed
opened 2026-10-13 18:53:04 +00:00 by ben · 3 comments
Owner

A dashboard for practice staff.

Scope

  • Client list: status per assigned activity (not started / in progress / complete, last activity time, flagged-card count).
  • View a client's board, notes and flags read-only; export summary (reuse Summary/Share).
  • Invite a new client by email and assign one or more activities; resend/revoke invites.
  • Basic audit log of admin access to client data.

Acceptance

  • Admins can only see clients in their practice; every view is authorised server-side.

Depends on: RBAC, activities split, SMTP.


Handoff context: the app is being prepared so a counselling practice can self-host it (see README and docs/self-hosting.md). Today the app has no auth by design, two hard-coded decks in shared/cards.json, three fixed columns, and Fastify + SQLite + SSE sync (docs/api.md).

A dashboard for practice staff. **Scope** - Client list: status per assigned activity (not started / in progress / complete, last activity time, flagged-card count). - View a client's board, notes and flags read-only; export summary (reuse Summary/Share). - Invite a new client by email and assign one or more activities; resend/revoke invites. - Basic audit log of admin access to client data. **Acceptance** - Admins can only see clients in their practice; every view is authorised server-side. Depends on: RBAC, activities split, SMTP. --- Handoff context: the app is being prepared so a counselling practice can self-host it (see README and docs/self-hosting.md). Today the app has no auth by design, two hard-coded decks in `shared/cards.json`, three fixed columns, and Fastify + SQLite + SSE sync (docs/api.md).
Author
Owner

Every slice is implemented and deployed.

  • fad7716: activity picker (activityIds), invite-and-assign, invite revoke and resend.
  • 8339641: session-scoped definitions; the generic activity route is now active-only; read-only staff review with fail-closed read audit (one row per page, per direct read and per stream admission); access history, where IPs are shown to owners only (maintainer decision). Migration M4 adds audit indexes.
  • d851e6a: progress dashboard (not started, in progress, complete, or no active cards; last activity; flag count) and keyset pagination, replacing the 100-session cap.
  • 478d3e7: Playwright journey from invite to assign to play to audited review, plus docs.
  • Reviews: each slice had a High review plus delta rounds.
  • Decisions: linked counsellors see all staff access rows. Session reassignment and retention purges stay open.

Next: /complete-plan, then close after checking acceptance.

Every slice is implemented and deployed. - **fad7716:** activity picker (activityIds), invite-and-assign, invite revoke and resend. - **8339641:** session-scoped definitions; the generic activity route is now active-only; read-only staff review with fail-closed read audit (one row per page, per direct read and per stream admission); access history, where IPs are shown to owners only (maintainer decision). Migration M4 adds audit indexes. - **d851e6a:** progress dashboard (not started, in progress, complete, or no active cards; last activity; flag count) and keyset pagination, replacing the 100-session cap. - **478d3e7:** Playwright journey from invite to assign to play to audited review, plus docs. - **Reviews:** each slice had a High review plus delta rounds. - **Decisions:** linked counsellors see all staff access rows. Session reassignment and retention purges stay open. Next: /complete-plan, then close after checking acceptance.
Author
Owner

Follow-up fixes landed in 654bca2 and are deployed (live at 8db0a97).

  • Access history: a transient "More history" failure keeps the rows already loaded and retries the same page. A 401, 403 or 404 still clears them, because access was lost. A response for a panel that navigation removed no longer triggers sign-out.
  • The dashboard journey (web/e2e/dashboard.spec.ts, 478d3e7) passes against the merged code.
  • README screenshots now include the client dashboard (8db0a97).

Left: close the dashboard plan, then close this issue after checking its acceptance against the live app.

Follow-up fixes landed in 654bca2 and are deployed (live at 8db0a97). - Access history: a transient "More history" failure keeps the rows already loaded and retries the same page. A 401, 403 or 404 still clears them, because access was lost. A response for a panel that navigation removed no longer triggers sign-out. - The dashboard journey (`web/e2e/dashboard.spec.ts`, 478d3e7) passes against the merged code. - README screenshots now include the client dashboard (8db0a97). Left: close the dashboard plan, then close this issue after checking its acceptance against the live app.
Author
Owner

Acceptance verified, closing.

Admins see only their clients, and every view is authorized on the server.

  • /api/clients, /api/users and /api/sessions filter through the predicates in server/policy.js.
  • Session, definition, history and event routes go through canSeeSession, rechecked inside the audit transaction.
  • Tests:
    • dashboard.test.js: foreign drill-down returns 404, unlinking a client empties the pages, forged cursors are re-filtered;
    • review.test.js: fail-closed read audit and access history;
    • the policy matrix covers every route.
  • web/e2e/dashboard.spec.ts runs invite, then progress, then audited read-only review and export. It passes on main.

The plan docs/plans/2026-10-14-15-11_admin-dashboard-progress-and-invites.md is closed (Status: done).

  • Still open: session reassignment remains CLI-only (assign-session); retention is #8.
  • Minor test gap: no test asserts that the owner's client list includes unlinked clients.
Acceptance verified, closing. **Admins see only their clients, and every view is authorized on the server.** - `/api/clients`, `/api/users` and `/api/sessions` filter through the predicates in `server/policy.js`. - Session, definition, history and event routes go through `canSeeSession`, rechecked inside the audit transaction. - Tests: - `dashboard.test.js`: foreign drill-down returns 404, unlinking a client empties the pages, forged cursors are re-filtered; - `review.test.js`: fail-closed read audit and access history; - the policy matrix covers every route. - `web/e2e/dashboard.spec.ts` runs invite, then progress, then audited read-only review and export. It passes on `main`. The plan `docs/plans/2026-10-14-15-11_admin-dashboard-progress-and-invites.md` is closed (`Status: done`). - **Still open:** session reassignment remains CLI-only (`assign-session`); retention is #8. - **Minor test gap:** no test asserts that the owner's client list includes unlinked clients.
ben closed this issue 2026-10-15 03:20:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ben/career-values-cards#4
No description provided.