Skip to content

[WIP] Friends PR-2: Friend schedule dialog#1856

Draft
brelieu05 wants to merge 6 commits into
schedule-view-source-refactorfrom
friend-schedule-dialog
Draft

[WIP] Friends PR-2: Friend schedule dialog#1856
brelieu05 wants to merge 6 commits into
schedule-view-source-refactorfrom
friend-schedule-dialog

Conversation

@brelieu05

@brelieu05 brelieu05 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Implementation of Friend Dialog and dealing with read-only + omitting features + ensuring reuse of existing calendar UI.

  • FriendsStore — Holds friend schedule data separately from AppStore. Fetches via trpc.schedule.getFriendUserData and drives dialog open/close/loading state.
  • friendScheduleViewSource — Read-only ScheduleViewSource (scope: 'friend') wired through a new FriendScheduleViewProvider, so ScheduleCalendar, toolbar, and event popover render friend data without touching the user's home schedule.
  • Friend schedule dialog — FriendScheduleDialogFriendScheduleView (split calendar + course list on desktop, stacked on mobile). Includes a read-only FriendSchedule course list with schedule notes.
  • Minimal entry point — Header Friends button opens a popover listing friends with a View action. Unauthenticated users get the sign-in dialog. Full friends management UI (requests, search, unfriend) is deferred to PR3.
  • Scope isolation — SelectedEventStore tracks selectedEventScope so event popovers don't bleed between home and friend views. Calendar toolbar hides edit actions (undo/redo, custom events, screenshot, download, clear) in readonly friend view; schedule select and finals toggle remain available.

Intentional Things Omitted from this PR and will go into PR3

  • Friends popover UI (requests tab, friend search, send/cancel requests, unfriend)
  • Share-schedule privacy toggles

FriendScheduleEntry.tsx is a thin placeholder UI. It is immediately deleted in PR3

Test Plan

  • Home regression: Add/remove courses, switch schedules, open event popover, toggle finals — home schedule unchanged after viewing a friend
  • Sign-in gate: Click Friends while logged out → sign-in dialog appears
  • Friend list: Log in, open Friends popover → friends load; click View on a friend with shared schedules
  • Friend dialog: Dialog opens with loading state, then calendar + course list; switch between friend's schedules via schedule select
  • Readonly UI: No undo/redo, custom event, screenshot, download, or clear buttons in friend dialog; event popover shows course info without delete/color/quick search
  • Scope isolation: Open schedule select or event popover in friend dialog → does not affect home calendar behind the dialog
  • Empty/error cases: Friend with no shared schedules shows appropriate feedback; close dialog returns to normal home view
  • Mobile: Friend dialog layout stacks calendar above course list

Issues

Depends on #1850
Closes #

@brelieu05 brelieu05 changed the base branch from main to schedule-view-source-refactor May 24, 2026 23:55
@brelieu05 brelieu05 changed the title Friends PR-2: Friend schedule dialog [WIP] Friends PR-2: Friend schedule dialog May 25, 2026
@brelieu05 brelieu05 force-pushed the friend-schedule-dialog branch 2 times, most recently from c45c142 to eca99cf Compare May 26, 2026 01:13
brelieu05 and others added 6 commits May 26, 2026 20:05
Add friend-only tab context, controlled map location, and scope-aware
quick search so the friend schedule dialog is self-contained on top of PR1.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ner leak warning

Many schedule UI components subscribe through friendScheduleViewSource, which
previously registered each callback directly on FriendsStore and exceeded the
default EventEmitter listener limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant