- Add responsive 2-panel layout (mobile single-col, tablet/desktop grid) - Unify specialization ranking with credit bars, status badges, and expandable allocation breakdowns (remove standalone ResultsDashboard) - Inline decision tree ceiling data on course buttons with spec counts - Add Clear All button to reset all course selections - Add collapsible CreditLegend explaining bars, badges, and limits - Extract ModeComparison and MutualExclusionWarnings to Notifications - Add useMediaQuery hook with matchMedia-based breakpoint detection
3.7 KiB
3.7 KiB
1. Responsive Layout Foundation
- 1.1 Create
useMediaQueryhook insrc/hooks/useMediaQuery.tsthat returns'mobile' | 'tablet' | 'desktop'based on breakpoints (<640px, 640–1024px, >1024px) - 1.2 Refactor
App.tsxlayout from 3-column grid to 2-panel responsive layout: single column on mobile, two columns (300px + flex) on tablet/desktop - 1.3 Move mode toggle, mode comparison banner, and mutual exclusion warnings above the panel layout as full-width elements
- 1.4 Remove
min-width: 960pxfromindex.cssbody rule
2. Unified Specialization Panel
- 2.1 Extend
SortableIteminSpecializationRanking.tsxto accept and displayallocatedcredits,potentialcredits, and renderCreditBarinline below each row - 2.2 Move
CreditBarcomponent fromResultsDashboard.tsxto a shared location (or inline inSpecializationRanking.tsx) - 2.3 Add tap-to-expand allocation breakdown on achieved specialization rows (move
AllocationBreakdownfromResultsDashboard) - 2.4 Add achievement summary count ("N specializations achieved") above the ranking list
- 2.5 Pass
optimizationResult(allocations, upperBounds, statuses) intoSpecializationRankingfromApp.tsx
3. Unified Course Panel
- 3.1 Extend
ElectiveSetcomponent to accept optionalSetAnalysisdata (ceiling outcomes per course) - 3.2 Render ceiling outcome (spec count + abbreviations) on the right side of each course button when analysis is available
- 3.3 Add "high impact" indicator to the set header when the set's impact > 0
- 3.4 Add subtle loading indicator on set headers while decision tree analysis is still computing
- 3.5 Pass
treeResultsandtreeLoadingintoCourseSelectionfromApp.tsx
4. Remove Standalone ResultsDashboard
- 4.1 Remove the
DecisionTreecomponent fromResultsDashboard.tsx - 4.2 Remove per-spec credit bars, status rows, and allocation breakdown from
ResultsDashboard(now in SpecializationRanking) - 4.3 Extract
ModeComparisonandMutualExclusionWarningsinto standalone components (or keep in ResultsDashboard as a thin notifications-only component) - 4.4 Remove the third column from
App.tsxlayout and theResultsDashboardimport if fully decomposed
5. Bulk Actions
- 5.1 Add
clearAllaction to the reducer inappState.tsthat resetspinnedCoursesto{} - 5.2 Add "Clear All" button in the
CourseSelectionheader, visible only when at least one course is pinned - 5.3 Wire
clearAlldispatch throughuseAppStatereturn value and intoApp.tsx→CourseSelection
6. Credit Explainer
- 6.1 Build collapsible
CreditLegendcomponent with "How to read this" toggle - 6.2 Add legend content: credit bar segment descriptions (allocated, potential, threshold marker), status badge explanations (achieved, achievable, missing req., unreachable), max 3 specializations note
- 6.3 Place
CreditLegendabove the specialization ranking list, collapsed by default
7. Verification
- 7.1 Verify mobile layout (agent-browser at 375px width): single column, all panels stack, touch arrow reordering works (blocked: agent-browser Chromium missing libglib-2.0.so.0 — verify manually via Tailscale)
- 7.2 Verify tablet layout (768px): two columns, spec panel with credit bars, course panel with inline ceiling data
- 7.3 Verify desktop layout (1200px): same two-column with proper spacing
- 7.4 Verify clear all: pin several courses, tap Clear All, confirm all sets revert to open
- 7.5 Verify credit legend: toggle open/closed, confirm descriptions are accurate
- 7.6 Verify end-to-end: pin courses, see achieved specs with inline credit bars, see ceiling data on open set course buttons, expand allocation breakdown