Full React+TypeScript app with LP-based optimization engine, drag-and-drop specialization ranking (with touch/arrow support), course selection UI, results dashboard with decision tree, and two optimization modes (maximize-count, priority-order).
2.9 KiB
ADDED Requirements
Requirement: Elective set display
The system SHALL display all 12 elective sets, grouped by term (Spring, Summer, Fall). Each set SHALL show its name and the list of available courses.
Scenario: Sets grouped by term
- WHEN viewing the course selection area
- THEN sets are displayed in three groups: Spring (5 sets), Summer (3 sets), Fall (4 sets), in set-number order within each group
Requirement: Course pinning
The system SHALL allow the user to select exactly one course per elective set. Selecting a course pins it as the chosen course for that set. A set with no selected course is considered open.
Scenario: Pin a course
- WHEN the user selects "Mergers & Acquisitions" in Spring Elective Set 3
- THEN that course is pinned for the set, the set is no longer open, and the optimization recalculates
Scenario: Only one course per set
- WHEN a course is already pinned in a set and the user selects a different course
- THEN the previous selection is replaced with the new one
Requirement: Course unpinning
The system SHALL allow the user to unpin a selected course, returning the set to open status.
Scenario: Unpin a course
- WHEN the user unpins the selected course in Spring Elective Set 3
- THEN the set returns to open status with no selected course, and the optimization recalculates
Requirement: Immediate recalculation
The system SHALL trigger optimization recalculation immediately when a course is pinned or unpinned. The recalculation SHALL use the current specialization ranking and optimization mode.
Scenario: Pin triggers recalc
- WHEN the user pins a course in any set
- THEN the optimization result, specialization statuses, and decision tree update to reflect the new selection
Requirement: Visual state indication
Each elective set SHALL visually indicate whether it is open (no course selected) or pinned (course selected). Pinned sets SHALL display the selected course name prominently.
Scenario: Open set appearance
- WHEN no course is selected in a set
- THEN the set is visually distinguished as open (e.g., dashed border, muted style) and shows all available courses as selectable options
Scenario: Pinned set appearance
- WHEN a course is pinned in a set
- THEN the set shows the selected course name prominently with a clear unpin control
Requirement: Course selection persistence
The system SHALL persist pinned course selections to localStorage. On subsequent loads, the system SHALL restore saved selections.
Scenario: Restore saved pins
- WHEN the user reloads the page after pinning courses
- THEN previously pinned courses are restored and the optimization runs with the saved state
Scenario: Corrupted or missing localStorage
- WHEN localStorage data is missing or unparseable
- THEN all sets default to open (no selections)