You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Dashboard: wire GPA/Credit-Hour cards to real scraped audit data
The scraper already stores the GPA Totals and Credit Hour Totals
sections; only the last render step was faked (cleanup plan Phase 7).
- Move parseGpaSummary out of degree-audit-page.tsx into
audit-calculations.ts as pure business logic, and unit-test it —
including the real snapshot's GPA sentence, which carries no
"hours … points" and so returns null.
- Credit card: derive from the scraped Credit Hour Totals section
(isCreditSection), mapping each rule to { status, text } and rendering
only when non-empty. Render the scraped sentence directly instead of
the fragile "{hours} of {description}" template. CreditRequirement is
now { status: Status; text: string }; both hardcoded 21/36 arrays are
gone. Status passes through all three values so in-progress
requirements display honestly (green check / blue dash / x).
- GPA card: drop the fabricated default props; footer prop is now
summary: GpaSummary | null and the sentence renders only when non-null
(no more "0 hours … 0 points" on real audits).
- Delete the local RequirementStatusIcon met-boolean wrapper (it
name-collided with a different component in requirement-breakdown) and
call FramedStatusIcon directly via a Status -> state map.
* remove test
* Fix GPA card: correct Counted GPA, card width, dark-mode text
Three fixes to the Phase 7 GPA/Credit cards:
- Counted GPA was wrong: parseHours matched /\d+/ + parseInt, so the
scraped "3.7766 GPA" cell truncated to 3. Parse a full decimal
(/\d+(?:\.\d+)?/ + parseFloat) so GPA cells keep their fractional
part. Hours/course columns are always integers, so this is a no-op for
them — the only snapshot changes are the two GPA rows (3 -> 3.7766,
3 -> 3.6091).
- Card width collapsed: the side-panel VStack defaults to items-start,
so the card shrank to its content instead of filling the w-sm column.
Add w-full to both cards.
- Dark mode: hardcoded text-gray-500/600/700 don't flip, so the text was
unreadable on the dark card. Switch to the theme-aware text-muted
token, and give the "Required" GPA box an explicit text-text (it was
inheriting default black, invisible in dark mode).
* GPA card: Figma rounding + diagnostic log for stored GPA value
- Match the Figma design: card corners rounded-lg -> rounded-2xl, and the
Required/Counted value boxes rounded-lg -> rounded-full (pill shaped).
Credit card rounded to match.
- Add a temporary [GPA card] console.log of required/counted/ruleText/
parsedSummary. A whole-number `counted` (e.g. 3) with "3.7766 GPA" in
ruleText means the stored audit predates the parseFloat scraper fix and
needs a re-scrape — the truncated decimal cannot be recovered from
storage, only re-parsed at scrape time.
* GPA card: show major name and match Figma sizing
- Render the degree/major name (currentAuditName) in green under the
"GPA Totals" title, matching the Figma mock.
- Tighten to the mock's proportions: p-5 -> p-4, title text-xl -> text-base,
value pills and labels scaled down, gaps reduced, info icon h-6 -> h-5.
Credit card sized to match.
* Fetch descriptoin
Copy file name to clipboardExpand all lines: tests/scraping/__snapshots__/audit-scraper.test.ts.snap
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -654,7 +654,7 @@ OR
654
654
{
655
655
"rules": [
656
656
{
657
-
"appliedHours": 3,
657
+
"appliedHours": 3.7766,
658
658
"courses": [
659
659
"course-1",
660
660
"course-2",
@@ -674,10 +674,11 @@ OR
674
674
"remainingHours": 0,
675
675
"requiredHours": 2,
676
676
"status": "Completed",
677
+
"summary": "42 hours for a total of 158.62 points were used to calculate the GPA.",
677
678
"text": "A University GPA of 2.00 is required on all courses undertaken (including credit by examination, correspondence, and extension) for which a grade or symbol other than Q, W, X, or CR is recorded.",
678
679
},
679
680
{
680
-
"appliedHours": 3,
681
+
"appliedHours": 3.6091,
681
682
"courses": [
682
683
"course-1",
683
684
"course-2",
@@ -693,6 +694,7 @@ OR
693
694
"remainingHours": 0,
694
695
"requiredHours": 2,
695
696
"status": "Completed",
697
+
"summary": "24 hours for a total of 86.62 points were used to calculate the GPA.",
696
698
"text": "Students must earn a grade point average of 2.0 in all mathematics and science courses required by the degree.",
0 commit comments