Skip to content

Show the student's own data on the dashboard - #143

Merged
HarryRandall merged 3 commits into
mainfrom
feat/dashboard-live-metrics
Sep 26, 2026
Merged

HarryRandall merged 3 commits into
mainfrom
feat/dashboard-live-metrics

Conversation

@HarryRandall

Copy link
Copy Markdown
Owner

Summary

The dashboard showed hard-coded sample cards in development (NODE_ENV === "development") and older, unstyled real-data cards in production. Both now show one set of cards built from the student's plan.

  • Academic row: GPA by semester, grade distribution, estimated tuition by study year, and the average mark per semester, with arrows to step through semesters.
  • Planning row: the next three university key dates, planning coverage by study year, and the load of each upcoming semester against the 24-unit standard.
  • Degree progress: two rings cut into semesters, completed outside and enrolled or planned inside. The hovered segment grows and a tooltip appears beside it. The status bar grows the hovered part and highlights its legend entry.
  • Requirements: the header drops the programme line, uses the same rings and puts its figures in columns when narrow.
  • Course table: courses are listed in the order they are taken with full semester names and coloured grade chips. Status chips use tints in dark mode.
  • Data fixes:
    • GPA ignored every result that carried a grade code other than PS, NCN or WN, so recorded results never counted.
    • Tuition was never fed fee data. Plan courses now carry their latest published domestic fee, taken as listed.
  • States: empty cards show a muted outline of their chart, and the loading screen pulses the same outlines. Charts draw in once the page has hydrated. Tooltips keep to one line.
  • Local review: pnpm db:seed:dashboard <empty|first-year|midway|final-year> seeds a local student into a known state. It only runs against loopback databases.
  • Cleanup: the old metric card system and its chart helpers are removed now that nothing uses them.

Verification

  • pnpm verify
  • Browser smoke test: checked by hand on the local dashboard and requirements page, using the seeded states, in light and dark mode
  • Supabase migration, generated types and adviser checks: not applicable, no schema changes

New unit tests cover grade-code GPA, per-semester marks and GPA, and the domestic-fee tuition estimate.

Deployment notes

None. The dashboard page now also loads the published university calendar (this year and next) for key dates. If the calendar fails to load, that card shows its empty state and the rest of the page still loads.

Grade point average skipped every result carrying a grade code other than
PS, NCN or WN, so recorded HD to N results never counted. A mark still
decides the points; the code covers results without one.

Plan courses now carry their latest published domestic fee, taken as
listed. The tuition estimate sums those fees across the plan, splits them
by study year and counts the priced courses per year. Academic terms also
report their GPA and each marked course, for the per-semester charts.
pnpm db:seed:dashboard <empty|first-year|midway|final-year> replaces a
local student's attempts and plan items with a known state, publishing
sample courses with domestic fees only where a course year has no
published version. Loopback databases only.
The dashboard showed sample cards in development and older real-data cards
in production. Both now show one set of cards built from the plan: GPA by
semester, grades, estimated tuition by year and the average mark per
semester, then key dates, planning coverage by study year and the
upcoming semester load. Empty cards keep a muted outline of their chart,
and the loading screen pulses the same outlines.

Degree progress uses two rings cut into semesters, completed outside and
enrolled or planned inside, with a tooltip beside the hovered segment.
The requirements header uses the same rings in a slimmer card. The course
table lists courses in the order they are taken with coloured grade chips,
status chips use tints in dark mode, and tooltips keep to one line.

Charts draw in once the page has hydrated, so a slow start no longer runs
the animations unseen.
@vercel

vercel Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
coursemap Ready Ready Preview Sep 26, 2026 5:44am UTC

@HarryRandall
HarryRandall merged commit 3a34d55 into main Sep 26, 2026
7 checks passed
@HarryRandall
HarryRandall deleted the feat/dashboard-live-metrics branch September 26, 2026 05:48

This branch was successfully deployed

1 active deployment
Preview — 6ac0337a Deployed Sep 26, 2026 by vercel[bot]
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