Skip to content

Commit 6bf63d7

Browse files
committed
made minor fixes, removed unused code etc
1 parent 672ea13 commit 6bf63d7

32 files changed

Lines changed: 110 additions & 3544 deletions

assets/Grid.png

-7.58 KB
Binary file not shown.

assets/banner-grid.png

-255 KB
Binary file not shown.

assets/svgs/dap-circle-logo.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

assets/svgs/lhd-logo.tsx

Lines changed: 0 additions & 169 deletions
This file was deleted.

components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { forwardRef } from "react";
2-
import { cn } from "~/lib/utils";
2+
import { cn } from "@/lib/utils";
33

44
type ButtonProps = {
55
color?: "orange" | "white" | "black";

components/ui/container.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { forwardRef } from "react";
2-
import { cn } from "~/lib/utils";
2+
import { cn } from "@/lib/utils";
33

44
const Container = forwardRef<
55
HTMLDivElement,

components/ui/dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React, {
77
useContext,
88
useState,
99
} from "react";
10-
import { cn } from "~/lib/utils";
10+
import { cn } from "@/lib/utils";
1111
import Container from "./container";
1212
import { HStack, VStack } from "./stack";
1313

components/ui/select-dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { CaretDownIcon } from "@phosphor-icons/react";
22
import { useEffect, useRef, useState } from "react";
3-
import { cn } from "~/lib/utils";
3+
import { cn } from "@/lib/utils";
44

55
type SelectDropdownProps = {
66
icon?: React.ReactNode;

docs/architecture.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ global state library is needed.
1313

1414
```text
1515
features/
16-
├── audit/ # Audit state, persistence, mutations, calculations, UI
17-
│ └── ui/ # Audit-specific pages, cards, panels, graph, navigation
16+
├── audit/ # Audit state, persistence, mutations, calculations
17+
── dashboard/ # Audit pages, cards, panels, graph, navigation, display groups
1818
├── audit-scraping/ # UT audit acquisition and browser controllers
1919
├── catalog/ # Catalog data, IndexedDB, mapping, catalog parser
2020
│ └── scraping/ # Developer catalog-refresh parser
@@ -39,10 +39,10 @@ flowchart TD
3939
Domain["domain"]
4040
Catalog["catalog"]
4141
Preferences["preferences"]
42-
AuditCore["audit core"]
42+
AuditCore["audit"]
4343
CourseSearch["course-search"]
4444
Planner["planner"]
45-
AuditUI["audit/ui"]
45+
Dashboard["dashboard"]
4646
Session["session"]
4747
Messages["lib/browser"]
4848
Scraping["audit-scraping"]
@@ -59,17 +59,18 @@ flowchart TD
5959
Planner --> AuditCore
6060
Planner --> CourseSearch
6161
Planner --> Domain
62-
Planner --> AuditUI
63-
AuditUI --> AuditCore
64-
AuditUI --> CourseSearch
65-
AuditUI --> Preferences
62+
Planner --> Dashboard
63+
Dashboard --> AuditCore
64+
Dashboard --> CourseSearch
65+
Dashboard --> Preferences
66+
Dashboard --> Domain
6667
Scraping --> AuditCore
6768
Scraping --> Session
6869
Scraping --> Messages
6970
Surfaces --> AuditCore
7071
Surfaces --> Session
7172
Surfaces --> Messages
72-
Entrypoints --> AuditUI
73+
Entrypoints --> Dashboard
7374
Entrypoints --> Planner
7475
Entrypoints --> Scraping
7576
Entrypoints --> Surfaces
@@ -79,8 +80,9 @@ The important constraints are:
7980

8081
- Catalog is data-only. It imports domain types, Dexie, and its own files; it
8182
never imports Audit, Course Search, Planner, or React.
82-
- Audit core never imports Audit UI, Course Search, Planner, Popup, Banner, or
83-
Audit Scraping.
83+
- Audit never imports Dashboard, Course Search, Planner, Popup, Banner, or
84+
Audit Scraping. It is a pure state/storage/mutations/calculations feature plus
85+
the provider seam.
8486
- Course Search is the explicit join between Audit and Catalog. Recommendation
8587
functions accept audit sections as arguments and do not use React.
8688
- Planner reuses Audit as the persisted state owner. Drag, menu, and preview
@@ -115,13 +117,19 @@ watched update.
115117

116118
`audit-mutations.ts` contains immutable, browser-free changes to cached audit
117119
data: add, remove, wipe, and move planned courses. `audit-calculations.ts`
118-
contains side-effect-free composite/progress calculations. `section-groups.ts`
119-
contains the pure mapping from calculated sections to dashboard display groups.
120+
contains side-effect-free composite/progress calculations.
120121

121-
`audit/ui/` may consume Audit core, Preferences, Course Search, domain types,
122-
and shared UI utilities. It never reads browser storage directly. Planner reuses
123-
the audit-owned degree side panel because that panel displays audit progress; the
124-
dependency remains one-way and Audit UI does not import Planner.
122+
### Dashboard
123+
124+
`features/dashboard/` owns the audit-viewing surface: pages, cards, panels, the
125+
donut graph, and navigation chrome. `section-groups.ts` lives here — the pure
126+
mapping from calculated sections to dashboard display groups is dashboard
127+
vocabulary.
128+
129+
Dashboard may consume Audit, Preferences, Course Search, domain types, and shared
130+
UI utilities. It never reads browser storage directly. Planner reuses the
131+
dashboard-owned degree side panel because that panel displays audit progress; the
132+
dependency remains one-way and Dashboard does not import Planner.
125133

126134
### Audit Scraping
127135

@@ -161,8 +169,8 @@ Course Search owns the audit-aware user flow:
161169
- The remaining files render search results and the add-course flow. They call
162170
Audit Provider intents rather than accessing audit storage.
163171

164-
This split avoids an Audit ↔ Catalog dependency cycle: Audit UI can open Course
165-
Search, Course Search can read Audit core and Catalog, and Catalog remains
172+
This split avoids an Audit ↔ Catalog dependency cycle: Dashboard can open Course
173+
Search, Course Search can read Audit and Catalog, and Catalog remains
166174
independent.
167175

168176
### Planner
@@ -227,11 +235,11 @@ flowchart LR
227235
Data["Selected CachedAuditData"] --> Provider
228236
Preferences["last audit preference"] --> Provider
229237
Provider --> Calculations["pure calculations"]
230-
Provider --> AuditUI["Audit UI"]
238+
Provider --> Dashboard["Dashboard"]
231239
Provider --> Planner["Planner"]
232240
Provider --> Search["Course Search"]
233241
Search --> Catalog["Catalog queries"]
234-
AuditUI -->|intent| Provider
242+
Dashboard -->|intent| Provider
235243
Planner -->|intent| Provider
236244
Search -->|add-course intent| Provider
237245
Provider -->|persist| Data

domain/audit.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ export interface AuditHistoryData {
5454
audits: AuditHistoryEntry[];
5555
timestamp: number;
5656
error?: string;
57-
auditNumber?: number;
58-
scrapedAuditIds?: string[];
57+
}
58+
59+
/**
60+
* The display name for an audit history entry, title-first: the audit's own
61+
* title, else its majors joined, else null. Callers supply their own final
62+
* fallback (an id, "Degree Requirements", etc.).
63+
*/
64+
export function getAuditDisplayName(
65+
entry: AuditHistoryEntry | undefined,
66+
): string | null {
67+
return entry?.title ?? entry?.majors?.join("; ") ?? null;
5968
}

0 commit comments

Comments
 (0)