Course planner page (/plan) with GPA calculator and degree checklists - #281
Draft
jerryzhou196 wants to merge 5 commits into
Draft
Course planner page (/plan) with GPA calculator and degree checklists#281jerryzhou196 wants to merge 5 commits into
jerryzhou196 wants to merge 5 commits into
Conversation
…ists
- New /plan page: transcript-imported terms in a grid (taken terms with
unit badges), future terms through 4B with add/remove and native HTML5
drag-and-drop between terms, persisted in user_course_plan via Hasura.
- Prerequisite warnings ("needs MATH 138") from structured
course_prerequisite data; warns only when no alternative appears in an
earlier term.
- GPA calculator on the OMSAS 4.0 scale, credit-weighted, computed from
grades in the extended /parse/transcript response; grades are kept in
localStorage only and never sent to the server.
- Degree requirement checklist sidebar: import any of the
backend-maintained checklists, per-category progress with "one of"
alternatives.
- CourseSearchDropdown generalized (moved to components/input) to search
all courses when no term is given; reused for "Add course".
- Plan link in the navbar; grades saved from the transcript upload modal.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The user_course_plan cache typePolicy keys rows by (user_id, term_id, course_id), but the planner query didn't select user_id — Apollo threw while normalizing the result, the query never delivered data, and the page's `loading || !data` branch spun forever. - select user_id in GET_PLANNER_DATA - render an error state with a Retry button instead of spinning on query errors - regression test: writeQuery of a getPlannerData result against the real cache config Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Vercel sets CI=true, which makes the CRA build treat eslint warnings as errors; planner.ts had six no-non-null-assertion warnings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Extract Card/CardHeader, LoginPromptCard, PageOverlay, and RemoveButton from markup duplicated across the plan and swap pages; adopt the existing ui/Button (accent variant) for all gold CTAs; replace the arbitrary modal shadow with a named shadow-modal token. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Frontend half of the course planner feature — requires backend PR UWFlow/uwflow#197 (transcript grades in the parse response +
user_course_plan/checklisttables).What it does
New /plan page (linked from the navbar):
CourseSearchDropdown, generalized and moved tocomponents/input/), remove, and drag courses between terms (native HTML5 DnD, no new dependency). Persisted inuser_course_planwith optimistic UI; moves run as a single-transaction Hasura mutation.course_prerequisitedata — warns only when none of a course's prereqs appear in an earlier term, since the table flattens AND/OR./parse/transcriptresponse and live only in localStorage — never sent to or stored on the server.Tailwind-only styling using the design tokens from AGENTS.md; no new styled-components.
Notes
graphql/queries/planner/Planner.tsxsince codegen needs a live Hasura with the new migration; swap for generated types on the nextbun run generate.ponytail:comments (default 0.5 units — the DB stores no per-course units; flat "one of" checklist requirements).Testing
bun run lint-nofixclean,tsc --noEmitclean, production build passes.src/pages/planPage/__tests__/planner.test.ts); full suite passes.🤖 Generated with Claude Code