Skip to content

Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource#1850

Draft
brelieu05 wants to merge 8 commits into
mainfrom
schedule-view-source-refactor
Draft

Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource#1850
brelieu05 wants to merge 8 commits into
mainfrom
schedule-view-source-refactor

Conversation

@brelieu05

@brelieu05 brelieu05 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces a schedule view layer between calendar UI and AppStore, enabling reuse of the same calendar for home and friend schedules with different data, permissions, and scope. Friend schedule data stays out of AppStore, so existing schedule mutations can’t touch it.

  • Introduces ScheduleViewSource as a thin abstraction layer over schedule data: home uses appScheduleViewSource (delegates to AppStore)
  • Exposes view-mode flags on that layer — readonly, scope ('home' | 'friend'), and appliesCourseVisibility — so future code can restrict editing, scope UI behavior, and skip home-only filters without touching AppStore.
  • Wires calendar components (CalendarRoot, event popover/wrapper, schedule select, TBA card) through ScheduleViewContext / useScheduleViewSource() and a unified subscribe() instead of importing AppStore directly.
  • Scopes the schedule-select popover open state (openScheduleSelectScope) so global “open picker” signals only affect the matching calendar when home and friend views can both be mounted.

No user-visible change on home in this pr. Friend schedule viewing plugs in via a new ScheduleViewSource in follow-up PRs.

Test Plan

Make sure that regular home calendar works the same:

  • Add/remove courses and confirm calendar updates
  • Switch between schedules in the schedule select popover
  • Drag-reorder schedules (verify names/index stay in sync)
  • Open course event popover (quick search, delete, color picker still work)
  • Toggle finals view
  • Hide/show courses via visibility controls
  • TBA card appears for TBA sections

Issues

Closes #

@brelieu05 brelieu05 changed the title Decoupling calendar from AppStore via ScheduleViewSource Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource May 24, 2026
Prevent duplicate schedule pickers when multiple calendars mount SelectSchedulePopover by tagging open state with ScheduleViewScope.

Co-authored-by: Cursor <cursoragent@cursor.com>
@brelieu05 brelieu05 changed the title Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource [WIP] Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource May 25, 2026
@brelieu05 brelieu05 changed the title [WIP] Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource Friends PR-1: Decoupling calendar from AppStore via ScheduleViewSource May 25, 2026
@brelieu05 brelieu05 self-assigned this May 25, 2026
@brelieu05 brelieu05 marked this pull request as ready for review May 25, 2026 01:11

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 11 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/antalmanac/src/components/Calendar/CalendarEventPopover.tsx
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
…eScheduleViewSource()

so home behavior is unchanged while the abstraction is ready for friend schedules.
brelieu05 and others added 2 commits May 25, 2026 18:04
…Marker

React rejects key when it is included in a spread props object on JSX elements.
Remove the appScheduleViewSource adapter and use AppStore as the default
ScheduleViewContext value instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the Stale label Jun 26, 2026
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