Skip to content
Open
Show file tree
Hide file tree
Changes from 234 commits
Commits
Show all changes
258 commits
Select commit Hold shift + click to select a range
ce9a5c9
fix: add to schedule merge
brelieu05 Dec 26, 2025
60519a1
fix: empty sharedschedule after adding bug
brelieu05 Dec 27, 2025
269d227
feat: exit button + loading
brelieu05 Dec 27, 2025
b1ae03e
fix: non-logged-in user schedule add bug
brelieu05 Dec 27, 2025
ca4aaa1
Merge branch 'main' into 1346-sharable-course-schedule-links
brelieu05 Jan 3, 2026
204264e
fix: custom events test type error
brelieu05 Jan 4, 2026
726eeed
fix: add schedule id issue + removed dialog for copy link
brelieu05 Jan 4, 2026
7916165
feat: stop user from saving in sharedschedule
brelieu05 Jan 6, 2026
162ae3d
feat: disabled search
brelieu05 Jan 6, 2026
66bb40d
feat: remove class delete from sharedschedule
brelieu05 Jan 6, 2026
415d96c
fix: peter portal icon
brelieu05 Jan 6, 2026
5ee9ca8
refactor: disabled -> not show
brelieu05 Jan 7, 2026
aeb9967
fix: finals button
brelieu05 Jan 7, 2026
98713af
fix: schedule dropdown + bold schedule name
brelieu05 Jan 7, 2026
b9def85
fix: go Home button blank issue
brelieu05 Jan 7, 2026
c432486
fix: invalid schedule loading twice issue
brelieu05 Jan 7, 2026
14842d6
fix: remove search button in section table
brelieu05 Jan 7, 2026
73dbc6c
fix: sharedschdule map search for class issue
brelieu05 Jan 7, 2026
b278f27
refactor: shared schedule hook
brelieu05 Jan 9, 2026
448689e
refactor: appstore opensnackbar
brelieu05 Jan 9, 2026
da207cb
feat: disabled button if not signed in
brelieu05 Jan 9, 2026
9624b14
nit: remove comment
brelieu05 Jan 9, 2026
791467b
refactor: implemented updateSession
brelieu05 Jan 9, 2026
7b9fe4c
refactor: implemented updateSession + comment
brelieu05 Jan 9, 2026
3295310
fix: header responsiveness
brelieu05 Jan 9, 2026
6cb3660
ci: add `remove` and `unlock` sst commands (#1389)
KevinWu098 Jan 5, 2026
945a975
ci: validate sst commands (#1390)
KevinWu098 Jan 5, 2026
5b76cb6
ci: sst slash commands (#1391)
KevinWu098 Jan 5, 2026
f424d7c
ci: sst commands
KevinWu098 Jan 5, 2026
ad449ec
feat: deploy command
KevinWu098 Jan 5, 2026
706e2a0
ci: replace chronorm with myrotvorets
KevinWu098 Jan 5, 2026
622a72d
Broken Precommit Hook (#1383)
alexespejo Jan 6, 2026
88fb195
Show RecruitmentBanner over HelpMenu and use MUI theme z-indexes (#1394)
Choollol Jan 6, 2026
3fc6cd9
feat: Missing Sections Warning (#1376)
calebwongg Jan 6, 2026
fb356c4
Fix: Duplicate users created on sign up (#1385)
alexespejo Jan 6, 2026
f913074
ci: sst deploy environment (#1406)
KevinWu098 Jan 7, 2026
84b0ac3
fix: increased lazy loading offset (#1393)
brelieu05 Jan 9, 2026
48f2d79
chore: add next-env.d.ts to .gitignore (#1395)
dsnsgithub Jan 9, 2026
8019a4d
Update favicon (#1408)
xgraceyan Jan 9, 2026
727ce10
fix: sat display (#1380)
AureliaSindhu Jan 10, 2026
caacfb2
Merge branch 'main' into 1346-sharable-course-schedule-links
brelieu05 Jan 11, 2026
0e6155b
refactor: remove old backend
brelieu05 Jan 13, 2026
8933748
chore: removed unnecessary comments + files
brelieu05 Jan 14, 2026
9688fea
fix: prevent duplicate schedule names in mergeShortCourseSchedules
brelieu05 Jan 14, 2026
8b6e9be
chore: remove TODO comment
brelieu05 Jan 14, 2026
d210451
chore: consolidated imports
brelieu05 Feb 3, 2026
de1f3a9
chore: containerize repeating logic
brelieu05 Feb 3, 2026
b674950
Merge branch 'main' into 1346-sharable-course-schedule-links
brelieu05 Feb 4, 2026
a1fa97a
chore: eslint move import
brelieu05 Feb 4, 2026
26bc507
chore: eslint useeffect warnings
brelieu05 Feb 4, 2026
07f25fe
chore: eslint useCallback dependency
brelieu05 Feb 4, 2026
8aacdc1
fix: pass userInfo correctly to autoSaveSchedule
brelieu05 Feb 4, 2026
8b4b088
fix: add missing id to skeleton ShortCourseSchedule
brelieu05 Feb 4, 2026
ac1374c
fix: added missing id property to convertLegacySchedule
brelieu05 Feb 4, 2026
7f443e2
Merge branch 'main' into 1346-sharable-course-schedule-links
brelieu05 Feb 4, 2026
50cd4b3
refactor: Extract schedule ID update logic into a new `setSchedules` …
brelieu05 Feb 7, 2026
cfc6d31
refactor: extract schedule name into a shared utility
brelieu05 Feb 7, 2026
f7eef78
refactor: shared and imported const
brelieu05 Feb 7, 2026
cd614bc
fix: replace console error with snackbar for schedule loading failures
brelieu05 Feb 8, 2026
3a9608d
Sharable course schedule links sub-branch changes (#1492)
Choollol Feb 8, 2026
fe98ed1
fix: enable user to navigate to map and not leave sharedschedulepage
brelieu05 Feb 8, 2026
4181c76
fix: changed clearScheduleButton from no-render to disabled for consi…
brelieu05 Feb 8, 2026
480a094
refactor: removed unnecessary skeletonmode on SharedScheduleBanner an…
brelieu05 Feb 8, 2026
f1bf0ac
refactor: remove nullish type wfrom skeletonSchedule
brelieu05 Feb 8, 2026
eb4dd2e
refactor: changed deleteCourse button from no-render to disabled
brelieu05 Feb 8, 2026
0ce212b
feat: added notification to user if session isn't valid
brelieu05 Feb 8, 2026
2aca480
More schedule link sharing sub-branch changes (#1495)
Choollol Feb 8, 2026
339a5e7
refactor: replace share location heck with `useIsSharedSchedulePage` …
brelieu05 Feb 8, 2026
3989ded
refactor: Disable calendar toolbar buttons, including undo, redo, cle…
brelieu05 Feb 9, 2026
497bb6c
refactor: update map link to use home page path check instead of shar…
brelieu05 Feb 9, 2026
e87b425
refactor: abstract disable variable for calendar action buttons
brelieu05 Feb 9, 2026
53711fe
fix: skip schedule load on shared pages and explicitly load user data…
brelieu05 Feb 10, 2026
0fe152e
feat: disable quick search button in read-only view
brelieu05 Feb 10, 2026
1a655bc
feat: add shared schedule analytics category
brelieu05 Feb 10, 2026
c38bed3
feat: posthog log copy schedule events
brelieu05 Feb 10, 2026
4ebafb2
feat: posthog log analytics event when a shared schedule is opened
brelieu05 Feb 10, 2026
6d04c70
feat: posthog logging for add shared schedule
brelieu05 Feb 10, 2026
39c0d93
fix: eslint `useEffect` and `useCallback` dependency arrays in Signin…
brelieu05 Feb 10, 2026
a7070b7
Even more sharable course schedule sub-branch changes (#1499)
Choollol Feb 11, 2026
163b416
temp: frontend mockup
sicn4rf Feb 11, 2026
cd878a1
feat: card layout design and emails below names
sicn4rf Feb 11, 2026
841d453
feat: implement friendship schema and friends + friendship routes + m…
brelieu05 Feb 18, 2026
3c432ae
feat: add send friend request functionality
brelieu05 Feb 18, 2026
ca28303
feat: implement unfriend
brelieu05 Feb 18, 2026
b704a37
feat: block user
brelieu05 Feb 18, 2026
5c5bd0b
feat: prevent already requested friends from sending duplicate friend…
brelieu05 Feb 18, 2026
2c6866b
feat: view friends schedules
brelieu05 Feb 18, 2026
95c8874
feat: logged out sign in warning
brelieu05 Feb 24, 2026
44c4aaf
feat: friends skeleton menu + reduce redundant fetching
brelieu05 Feb 25, 2026
7b1b2eb
feat: restrict non-friends from looking at friend's schedules
brelieu05 Feb 25, 2026
cccf811
feat: enter keydown
brelieu05 Feb 25, 2026
fad591a
feat: invalid email error
brelieu05 Feb 25, 2026
f151946
refactor: upsertSchedule to persistent schedule links
brelieu05 Mar 1, 2026
417e9a3
feat: always go to friend's first-indexed schedule
brelieu05 Mar 1, 2026
6e2c537
feat: disable save on sharedSchedule
brelieu05 Mar 1, 2026
65da132
Merge branch '1346-sharable-course-schedule-links' into 911-suggestio…
brelieu05 Mar 1, 2026
56b1e2d
feat: validate session on direct visits and update session handling i…
brelieu05 Mar 1, 2026
093031c
refactor: holy cubic fixes + direct link friend name fix
brelieu05 Mar 1, 2026
0db9475
feat: add provider ID check for friend requests and updates to user I…
brelieu05 Mar 19, 2026
35823f5
feat: implement schedule sharing functionality and enhance friend dat…
brelieu05 Apr 2, 2026
0c2aab8
refactor: replace provider ID with session token for friend-related o…
brelieu05 Apr 2, 2026
2ba022a
Merge remote-tracking branch 'origin/main' into 911-suggestion-view-f…
brelieu05 Apr 6, 2026
b109eff
Merge branch 'main' of https://github.com/icssc/AntAlmanac into 911-s…
brelieu05 Apr 7, 2026
86bc543
feat: enhance schedule insertion by preserving sharing statuses durin…
brelieu05 Apr 7, 2026
bfa89c9
feat: add polling for friends and pending requests in FriendsButton c…
brelieu05 Apr 7, 2026
279dfad
feat: implement blocked users section in FriendsMenu with toggle func…
brelieu05 Apr 7, 2026
6e2843f
feat: add block user functionality to FriendsMenu
brelieu05 Apr 7, 2026
d10883d
feat: update sharing icons in ScheduleSelect component to use visibil…
brelieu05 Apr 7, 2026
5b65871
feat: enhance shared schedule import functionality to include friend …
brelieu05 Apr 7, 2026
6713bbc
refactor: simplify button label in FriendsMenu component
brelieu05 Apr 7, 2026
fd94bba
feat: add scrollable friends list in FriendsMenu component
brelieu05 Apr 7, 2026
eaee00f
feat: add friend request button on shared page
brelieu05 Apr 7, 2026
3655754
fix: include setWarning in dependency array of useEffect in SharedSch…
brelieu05 Apr 7, 2026
2e48645
fix: reset friend state and update dependency array in SharedSchedule…
brelieu05 Apr 8, 2026
c225426
fix: streamline snackbar options in ShareScheduleButton component
brelieu05 Apr 8, 2026
e8002b1
feat: enhance schedule creation by adding unique schedule IDs and imp…
brelieu05 Apr 8, 2026
a368d4a
refactor: rename schedule retrieval method and update related documen…
brelieu05 Apr 14, 2026
573314e
feat: add method to resolve userId from session token in RDS class an…
brelieu05 Apr 14, 2026
117886c
refactor: replace direct database query with RDS method for user retr…
brelieu05 Apr 14, 2026
d304fe4
feat: implement friendship management methods in RDS class and refact…
brelieu05 Apr 14, 2026
cf34899
Revert "Extracted notifications from RDS class (#1577)" (#1587)
alexespejo Apr 7, 2026
bb30c67
Fix db package index imports (#1584)
Choollol Apr 7, 2026
79b0163
Ignore Starting and Ending Whitespaces in Course Search (#1571)
robotman40 Apr 8, 2026
eea8bb2
FIx mobile notification snackbar blocking navigation bug (#1594)
Choollol Apr 8, 2026
65398ab
Prevent entire home page from rerendering when switching between root…
Choollol Apr 8, 2026
299335d
ci: detected new quarter or section count update
github-actions[bot] Apr 8, 2026
711b54d
fix: update privacy policy to reflect PostHog analytics (#1599)
KevinWu098 Apr 8, 2026
fa07ac0
feat: add server-rendered SEO content for search engine indexing (#1600)
KevinWu098 Apr 9, 2026
86bf46d
feat: add EmptyState to calendar and added courses pane (#1531)
rob-9 Apr 10, 2026
0ce2c6b
Use fetchAnteaterAPI for all AAPI calls (#1581)
Choollol Apr 11, 2026
488ea4c
fix: use recommended db settings (#1603)
KevinWu098 Apr 11, 2026
379b6c1
fix: remove Pulumi workaround from CI workflows (#1598)
KevinWu098 Apr 11, 2026
939629d
fix: Remove coursenumasdecimal (#1569)
xgraceyan Apr 11, 2026
a95feb4
ci: detected new quarter or section count update
github-actions[bot] Apr 13, 2026
67d95a6
ci: detected new quarter or section count update
github-actions[bot] Apr 13, 2026
7cfa778
chore: remove unused dependencies and align @types/node with Node 22 …
KevinWu098 Apr 14, 2026
39a3b8c
fix: use transaction object (tx) instead of root db client in upsertU…
KevinWu098 Apr 14, 2026
56faeac
ci: detected new quarter or section count update
github-actions[bot] Apr 14, 2026
861f87a
refactor: simplify getUserIdBySessionToken to directly check session …
brelieu05 Apr 14, 2026
c0d6248
refactor: extract friend request validation logic into a separate fun…
brelieu05 Apr 14, 2026
f8a51a1
refactor: split getFriends into getFriendshipsSent and getFriendships…
brelieu05 Apr 14, 2026
61df177
fix: ensure user unblocking only occurs for blocked friendships
brelieu05 Apr 14, 2026
d512640
Merge branch 'main' into 911-suggestion-view-friends-schedules
brelieu05 Apr 14, 2026
9c30b68
refactor: simplify loadScheduleAndSetLoadingAuth function by removing…
brelieu05 Apr 15, 2026
a973b19
Merge branch 'main' into 911-suggestion-view-friends-schedules
brelieu05 Apr 15, 2026
43854f2
fix: handle errors without logging in ShareScheduleButton and Signin …
brelieu05 Apr 15, 2026
8ef6d18
feat: add session token validation for friends-related queries in the…
brelieu05 Apr 15, 2026
c90c123
Merge branch 'main' into 911-suggestion-view-friends-schedules
brelieu05 Apr 27, 2026
1b26172
refactor: remove session token check logic due to cookie session refa…
brelieu05 Apr 27, 2026
c19114a
fix: added unique key assignment in meetings mapping for LocationsCel…
brelieu05 Apr 27, 2026
cc3f1ab
fix: reposition FriendsButton component in Header for improved layout
brelieu05 Apr 27, 2026
8b7398a
refactor: seapate Friends Menu into individual components/files inste…
brelieu05 Apr 27, 2026
a4d1109
feat: add FriendDropdownCard and FriendSearchDropdown components for …
brelieu05 Apr 27, 2026
2afd15e
feat: include avatar field in friend-related queries and components f…
brelieu05 Apr 27, 2026
bcc7300
feat: add autoComplete attribute to FriendsTab search input for impro…
brelieu05 Apr 27, 2026
e049d52
feat: add avatar support to FriendCard component for enhanced friend …
brelieu05 Apr 27, 2026
04801b1
feat: implement received sent blocked tabs in friends menu
brelieu05 Apr 27, 2026
590fb33
refactor: simplify RequestsTab component by removing count display fr…
brelieu05 Apr 27, 2026
7b8f8f0
feat: enhance friend request handling with error management and UI up…
brelieu05 Apr 27, 2026
1e72321
refactor: update FriendsMenu and RequestsTab components for improved …
brelieu05 Apr 27, 2026
52f3338
refactor: light mode for friends menu
brelieu05 Apr 27, 2026
eaef723
style: update button styles to improve disabled state visibility in I…
brelieu05 Apr 27, 2026
998adb3
style: adjust FriendsTab input styling to use array syntax for better…
brelieu05 Apr 27, 2026
089f40e
style: enhance hover background color for FriendDropdownCard and add …
brelieu05 Apr 27, 2026
255323a
fix: validate email format before sending friend requests and streaml…
brelieu05 Apr 27, 2026
f04b72f
style: simplify NotificationSnackbar styling by removing theme color …
brelieu05 Apr 27, 2026
cd64c5d
style: update placeholder text in RequestsTab input for clarity
brelieu05 Apr 27, 2026
4231357
refactor: streamline session validation and update user data query in…
brelieu05 Apr 27, 2026
2208d12
style: update placeholder text in RequestsTab input for improved clarity
brelieu05 Apr 27, 2026
91793c7
refactor: remove ShareScheduleButton from ScheduleSelect component to…
brelieu05 Apr 27, 2026
ed32a6f
refactor: replace useIsSharedSchedulePage with useIsReadonlyView for …
brelieu05 Apr 27, 2026
548c40c
style: adjust padding in ColorPicker component for improved layout co…
brelieu05 Apr 27, 2026
b067b15
refactor: reorganize imports and replace useMediaQuery with useIsMobi…
brelieu05 Apr 27, 2026
0aef5b1
style: update FriendsMenu component to set minimum height and width f…
brelieu05 Apr 27, 2026
db4070b
Merge branch 'main' into 911-suggestion-view-friends-schedules
brelieu05 Apr 27, 2026
3d6363e
style: remove minimum height from FriendsMenu component for improved …
brelieu05 Apr 27, 2026
0d6cef2
fix: issue with schedule not loading on initial sign in
brelieu05 Apr 27, 2026
8c31d5e
fix: correct avatar assignment logic in RDS class to ensure fallback …
brelieu05 Apr 27, 2026
9818fb0
feat: enhance friend request handling in RDS class to support updatin…
brelieu05 Apr 27, 2026
efcec93
feat: implement transaction handling in unblockUser method to restore…
brelieu05 Apr 27, 2026
eeafbed
refactor: update insertFriendRequest method to prevent overwriting de…
brelieu05 Apr 27, 2026
61d165a
feat: enhance friend request validation and user data retrieval by up…
brelieu05 Apr 27, 2026
de6f7cd
Merge branch 'main' into 911-suggestion-view-friends-schedules
brelieu05 Apr 27, 2026
8e82dce
refactor: update import paths for friend-related components to use ab…
brelieu05 Apr 28, 2026
39ce6bf
style: update button background colors in SharedScheduleBanner compon…
brelieu05 Apr 28, 2026
bba3ad3
refactor: rename loadContent function to loadFriendsData for clarity …
brelieu05 Apr 28, 2026
90df580
feat: introduce HomeLayout component to encapsulate common layout ele…
brelieu05 Apr 28, 2026
d5e107b
fix: ensure consistent avatar rendering in FriendIdentity component b…
brelieu05 Apr 28, 2026
f2f8f1f
fix: enhance avatar rendering in FriendIdentity component by adding r…
brelieu05 Apr 28, 2026
dcc981f
refactor: remove warning state from SharedScheduleBanner and related …
brelieu05 Apr 28, 2026
e02bbb9
fix: add error handling to handleViewSchedule for friend schedules in…
brelieu05 Apr 28, 2026
4ab2ead
style: update NotificationSnackbar component to set text and icon col…
brelieu05 Apr 28, 2026
e072eee
refactor: remove handleGoHome function and replace with handleExitSha…
brelieu05 Apr 28, 2026
68c117c
refactor: simplify condition for displaying added sections grid in Ad…
brelieu05 Apr 28, 2026
c5be71e
feat: implement readonly view logic in CalendarCourseEventWrapper and…
brelieu05 Apr 28, 2026
ae544b0
fix: adjust active tab logic in ScheduleManagement for mobile and rea…
brelieu05 Apr 28, 2026
bbc80a4
Merge branch 'main' into 911-suggestion-view-friends-schedules
brelieu05 Apr 28, 2026
df4e6d2
style: update RequestsTab component to adjust icon button dimensions …
brelieu05 Apr 28, 2026
42e9ba3
style: update tooltip text in ScheduleSelect component for clarity on…
brelieu05 Apr 28, 2026
421520b
style: update FriendsMenu component to adjust tab colors based on the…
brelieu05 Apr 28, 2026
73de396
feat: add unfriend confirmation dialog to FriendsMenu component for i…
brelieu05 Apr 28, 2026
b065ad2
refactor: remove blocked friends functionality from FriendsButton, Fr…
brelieu05 Apr 29, 2026
4a2c76b
Merge remote-tracking branch 'origin/main' into 911-suggestion-view-f…
brelieu05 Apr 29, 2026
818ca36
Merge remote-tracking branch 'origin/main' into 911-suggestion-view-f…
brelieu05 Apr 29, 2026
3829b59
Merge branch 'main' into 911-suggestion-view-friends-schedules
KevinWu098 Apr 30, 2026
984ffb8
chore: file capitalization
KevinWu098 Apr 30, 2026
df0f8c8
fix: migration idempotency
KevinWu098 Apr 30, 2026
5338bdf
fix: fix
KevinWu098 Apr 30, 2026
991e968
fix: update import path to be absolute import for user schema in frie…
brelieu05 May 1, 2026
9113df5
refactor: rename getNextScheduleName to getNonConflictingName method …
brelieu05 May 1, 2026
20f77bc
refactor: remove unused setSchedules method to streamline AppStore fu…
brelieu05 May 2, 2026
64d1512
Merge branch 'main' into 911-suggestion-view-friends-schedules
KevinWu098 May 2, 2026
47c7765
feat: gen migration
KevinWu098 May 2, 2026
274baf6
Merge branch '911-suggestion-view-friends-schedules' of https://githu…
brelieu05 May 2, 2026
5043e56
chore: revert absolute import to relative import because of tsconfig …
brelieu05 May 2, 2026
0e9a04f
refactor: simplify active tab logic in ScheduleManagementTabs component
brelieu05 May 2, 2026
26d1984
style: undid padding change in ColorPicker
brelieu05 May 2, 2026
8402a56
refactor: update SectionTable to use isReadonlyView for conditional r…
brelieu05 May 2, 2026
ab4ea87
refactor: initialize schedule name state using a function for improve…
brelieu05 May 2, 2026
9f0a0dd
refactor: change error handling in SignInDialog to use finally for co…
brelieu05 May 2, 2026
ba9ec6f
fix: correct typo in HomeLayout component documentation
brelieu05 May 2, 2026
76c4738
refactor: update getNextScheduleName method to use getNonConflictingName
brelieu05 May 2, 2026
10ecc87
refactor: enhance empty state messaging in ScheduleCalendar for reado…
brelieu05 May 2, 2026
31806fc
refactor: remove DeleteAndNotifications component to streamline actio…
brelieu05 May 2, 2026
a660a5f
fix: idiomatic
KevinWu098 May 2, 2026
6545a9a
fix: remove extra migration
KevinWu098 May 2, 2026
ca3283c
refactor: remove unused getUserAndAccount method to clean up RDS class
brelieu05 May 2, 2026
f56ba10
refactor: remove getScheduleIdByName method to streamline RDS and use…
brelieu05 May 2, 2026
1b90799
Merge branch '911-suggestion-view-friends-schedules' of https://githu…
brelieu05 May 4, 2026
5edff7d
feat: enhance mobile responsiveness of Import and FriendsButton compo…
brelieu05 May 4, 2026
adfa73d
Merge remote-tracking branch 'origin/main' into 911-suggestion-view-f…
brelieu05 May 4, 2026
f155aee
fix: sign in dialog title
KevinWu098 May 5, 2026
1249a0d
feat: some work
KevinWu098 May 5, 2026
424db00
refactor: types
KevinWu098 May 5, 2026
b3261c1
refactor: some work
KevinWu098 May 5, 2026
1807611
refactor: toggle button group
KevinWu098 May 5, 2026
6ffc3ed
refactor: move code around
KevinWu098 May 5, 2026
8aa9ef2
refactor: move code around
KevinWu098 May 5, 2026
c4991b6
refactor: lots of work
KevinWu098 May 5, 2026
4ca1434
feat: some more work
KevinWu098 May 5, 2026
f3ed707
feat: cards
KevinWu098 May 5, 2026
f70e9e6
feat: request styling
KevinWu098 May 5, 2026
6cbff12
feat: lowercase
KevinWu098 May 5, 2026
941a028
style: tweak
KevinWu098 May 5, 2026
f208450
fix: fix
KevinWu098 May 5, 2026
15c0530
Merge branch 'main' into 911-suggestion-view-friends-schedules
KevinWu098 May 5, 2026
c93796b
chore: db migration
KevinWu098 May 5, 2026
2312f82
fix: immediately clear on load friends
KevinWu098 May 6, 2026
cfa96fc
fix: misc
KevinWu098 May 6, 2026
d8ae60f
style: gap
KevinWu098 May 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions apps/antalmanac/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ErrorPage } from '$routes/ErrorPage';
import Feedback from '$routes/Feedback';
import Home from '$routes/Home';
import { OutagePage } from '$routes/OutagePage';
import { SharedSchedulePage } from '$routes/SharedSchedulePage';
import { Unsubscribe } from '$routes/UnsubscribePage';
import AppThemeProvider from '$src/app/Theme';
import { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';
Expand Down Expand Up @@ -62,6 +63,16 @@ const BROWSER_ROUTER = createBrowserRouter([
element: <AuthPage />,
errorElement: <ErrorPage />,
},
{
path: '/share/friend/:userId',
element: <SharedSchedulePage />,
errorElement: <ErrorPage />,
},
{
path: '/share/:scheduleId',
element: <SharedSchedulePage />,
errorElement: <ErrorPage />,
},
{
// OAuth callback sink for the native iOS wrapper. In the happy
// path ASWebAuthenticationSession intercepts this URL via the
Expand Down
97 changes: 74 additions & 23 deletions apps/antalmanac/src/actions/AppStoreActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import trpc from '$lib/api/trpc';
import { warnMultipleTerms } from '$lib/helpers';
import { setLocalStorageUserId, setLocalStorageDataCache } from '$lib/localStorage';
import { isNativeIosApp, NATIVE_IOS_REDIRECT_URI } from '$lib/platform';
import { getErrorMessage } from '$lib/utils';
import { getNextScheduleName, getErrorMessage } from '$lib/utils';
import { IMPORTED_SCHEDULE_PREFIX, SHARED_SCHEDULE_PREFIX } from '$src/globals';
import AppStore from '$stores/AppStore';
import { deleteTempSaveData } from '$stores/localTempSaveDataHelpers';
import { scheduleComponentsToggleStore } from '$stores/ScheduleComponentsToggleStore';
Expand Down Expand Up @@ -176,13 +177,14 @@ export const mergeShortCourseSchedules = (
) => {
const existingScheduleNames = new Set(currentSchedules.map((s: ShortCourseSchedule) => s.scheduleName));
const cacheSchedule = incomingSchedule.map((schedule: ShortCourseSchedule) => {
let scheduleName = schedule.scheduleName;
if (existingScheduleNames.has(schedule.scheduleName)) {
scheduleName = `${scheduleName}(1)`;
}
const baseName = `${importMessage}${schedule.scheduleName}`;
const scheduleName = getNextScheduleName(baseName, existingScheduleNames);

existingScheduleNames.add(scheduleName);

return {
...schedule,
scheduleName: `${importMessage}${scheduleName}`,
scheduleName: scheduleName,
};
});
currentSchedules.push(...cacheSchedule);
Expand All @@ -207,7 +209,7 @@ const handleScheduleImport = async (username: string, skipImportedCheck = false,
const currentSchedules = AppStore.schedule.getScheduleAsSaveState();

if (scheduleSaveState?.schedules) {
mergeShortCourseSchedules(currentSchedules.schedules, scheduleSaveState.schedules, '(import)-');
mergeShortCourseSchedules(currentSchedules.schedules, scheduleSaveState.schedules, IMPORTED_SCHEDULE_PREFIX);
currentSchedules.scheduleIndex = currentSchedules.schedules.length - 1;

scheduleComponentsToggleStore.setState({
Expand All @@ -216,25 +218,26 @@ const handleScheduleImport = async (username: string, skipImportedCheck = false,
});

const isScheduleLoaded = await AppStore.loadSchedule(currentSchedules);
if (isScheduleLoaded) {
logAnalytics(postHog, {
category: analyticsEnum.nav,
action: analyticsEnum.nav.actions.IMPORT_LEGACY,
});

openSnackbar('success', `Schedule with name "${username}" imported successfully!`);
if (!isScheduleLoaded) {
scheduleComponentsToggleStore.setState({ openLoadingSchedule: false });
return { imported: false, error: new Error('Failed to load imported schedule') };
}

scheduleComponentsToggleStore.setState({
openScheduleSelect: true,
openLoadingSchedule: false,
});
logAnalytics(postHog, {
category: analyticsEnum.nav,
action: analyticsEnum.nav.actions.IMPORT_LEGACY,
});

await saveSchedule({ postHog });
openSnackbar('success', `Schedule with name "${username}" imported successfully!`);

await trpc.userData.flagImportedSchedule.mutate({
username,
});
}
scheduleComponentsToggleStore.setState({ openScheduleSelect: true, openLoadingSchedule: false });

await saveSchedule({ postHog });

await trpc.userData.flagImportedSchedule.mutate({
username,
});
}

return { imported: false, error: null };
Expand All @@ -256,6 +259,54 @@ export const importScheduleWithUsername = async (username: string, postHog?: Pos
}
};

export const importSharedScheduleById = async (scheduleId: string, friendName?: string) => {
const sharedSchedule = await trpc.userData.getSharedSchedule.query({ scheduleId });

const incomingSchedule: ShortCourseSchedule = {
id: undefined,
scheduleName: sharedSchedule.scheduleName,
scheduleNote: sharedSchedule.scheduleNote || '',
courses: sharedSchedule.courses,
customEvents: sharedSchedule.customEvents,
};

const currentSchedules = AppStore.schedule.getScheduleAsSaveState();
const prefix = friendName ? `(${friendName})-` : SHARED_SCHEDULE_PREFIX;

mergeShortCourseSchedules(currentSchedules.schedules, [incomingSchedule], prefix);
currentSchedules.scheduleIndex = currentSchedules.schedules.length - 1;

scheduleComponentsToggleStore.setState({ openLoadingSchedule: true });

const isScheduleLoaded = await AppStore.loadSchedule(currentSchedules);

if (!isScheduleLoaded) {
scheduleComponentsToggleStore.setState({ openLoadingSchedule: false });
return { imported: false, error: new Error('Failed to load shared schedule') };
}

const session = useSessionStore.getState();
if (session.sessionIsValid) {
try {
await autoSaveSchedule({});
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: why are we calling auto save schedule

openSnackbar('success', `Shared schedule "${incomingSchedule.scheduleName}" added to your account!`);
} catch {
openSnackbar(
'error',
'Failed to load schedules. If this continues to happen, please submit a feedback form.'
);
}
} else {
openSnackbar('warning', 'Schedule added to current session. Sign in to save permanently.');
}

scheduleComponentsToggleStore.setState({ openScheduleSelect: true, openLoadingSchedule: false });

changeCurrentSchedule(currentSchedules.scheduleIndex);

return { imported: true, error: null };
};

export const loadGuestSchedule = async (username: string, rememberMe: boolean, postHog?: PostHog) => {
if (
username != null &&
Expand Down Expand Up @@ -315,7 +366,7 @@ export const loadGuestSchedule = async (username: string, rememberMe: boolean, p
}
openSnackbar(
'error',
'`Failed to load schedules. If this continues to happen, please submit a feedback form.`'
'Failed to load schedules. If this continues to happen, please submit a feedback form.'
);
}
}
Expand Down
Loading
Loading