Skip to content

feat: tutor workload visibility, richer assignment detail context - #69

Merged
michaelokolo merged 1 commit into
mainfrom
feat/tutor-workload-and-detail-context
Aug 8, 2026
Merged

feat: tutor workload visibility, richer assignment detail context#69
michaelokolo merged 1 commit into
mainfrom
feat/tutor-workload-and-detail-context

Conversation

@michaelokolo

Copy link
Copy Markdown
Contributor

Summary

  • Tutor workload in the picker: tutor Select options now show active student count ("2 active students" / "No students yet") alongside subjects, so an admin can see caseload before assigning another student. Computed client-side from the assignments list the create form already fetches -- no new endpoint.
  • assignedBy on Assignment: schema/repository/controller/types gain a denormalized assignedBy: { id, name } (the relation already existed on the Prisma model, just wasn't joined/exposed). Shown as "Assigned by X on <date>" under the detail page's hero.
  • AssignmentDetail redesign (per the approved "Stacked sections" mockup): hero -> bordered facts row (Subjects/Assigned/Ended) -> "<tutor> is also tutoring" card (their other current students) -> "History for <student>" card (a timeline of every assignment that student has had, current and past). All derived from the existing GET /assignments list, cross-referenced client-side -- same pattern as the reassignment warning from the last PR.

Test plan

  • pnpm -r typecheck / pnpm -r lint clean across the whole monorepo
  • pnpm --filter web test -- 109/109 passing (new coverage for workload meta, assignedBy, the "also tutoring" card, and the history timeline)
  • pnpm --filter api test -- 127/127 passing (assignedBy join covered in service/route tests)
  • pnpm --filter web build / pnpm --filter api build clean
  • Manual: open the tutor picker and confirm student counts show; assign/reassign a student and check the ended assignment's "History" card and the tutor's "also tutoring" card both update correctly

Surface tutor caseload before assigning, and give the detail page real
context instead of just a hero and a field grid:

- Tutor picker options now show active student count ("2 active
  students" / "No students yet") next to subjects, computed client-side
  from the assignments list already fetched -- no new endpoint.
- Assignment schema gains a denormalized `assignedBy: { id, name }`
  (repository/controller/types), shown as "Assigned by X on <date>" under
  the detail page's pairing hero.
- AssignmentDetail redesigned per the approved stacked-sections mockup:
  hero -> a bordered facts row (Subjects/Assigned/Ended) -> "<tutor> is
  also tutoring" (their other active students, cross-referenced from the
  full assignments list) -> "History for <student>" (a timeline of every
  assignment that student has had, not just the one being viewed).
@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
brightpath-marketing Ready Ready Preview Aug 8, 2026 7:11pm
brightpath-web Ready Ready Preview Aug 8, 2026 7:11pm

@michaelokolo
michaelokolo merged commit 15b0a68 into main Aug 8, 2026
4 checks passed
@michaelokolo
michaelokolo deleted the feat/tutor-workload-and-detail-context branch August 8, 2026 19:12
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