Skip to content

377 backend schedule logic fix#421

Open
hadiafifah wants to merge 6 commits intomainfrom
377-backend-schedule-logic-fix
Open

377 backend schedule logic fix#421
hadiafifah wants to merge 6 commits intomainfrom
377-backend-schedule-logic-fix

Conversation

@hadiafifah
Copy link
Contributor

finished updating logic to check end time and order accordingly

@hadiafifah hadiafifah linked an issue Mar 4, 2026 that may be closed by this pull request
2 tasks
@hadiafifah hadiafifah force-pushed the 377-backend-schedule-logic-fix branch from 9b304e3 to 3e534aa Compare March 4, 2026 09:22
@hadiafifah
Copy link
Contributor Author

Added #422 (branch name 391) changes to this branch because it needed fixes from this ticket to be fully finished. Feel free to disregard that PR.

On top of backend changes from this PR, and the visual changes from #422, I also refactored /schedule/page.tsx into reusable components because it was starting to get really chunky. These are the main changes:

File structure changes

  • page.tsx was reduced to mostly composition/presentation
  • Added dedicated hooks for schedule logic (useScheduleData.ts and useActiveDaySync.ts)
  • Added shared schedule modules to reduce duplication (constants.ts, types.ts, and groupedEntries.ts)
    Broke rendering into reusable components:
  • ScheduleControls.tsx
  • DayNavButtons.tsx
  • DaySection.tsx

Data/state refactor changes

  • Centralized schedule state in useScheduleData:
  1. active tab/day/filter state
  2. mobile filter drawer state
  3. grouped entries by day
  4. add/remove personal schedule handlers
  5. initial-load/error flags
  • Centralized day navigation sync in useActiveDaySync:
  1. click-to-day smooth scroll
  2. scroll-based active-day detection
  3. temporary click lock/pending-day logic to prevent highlight jitter
  • Centralized data transformation path:
  1. event data + personal data grouped by Pacific day key
  2. filter application moved to shared grouping utility
  3. deterministic sort with start-time + end-time tiebreak handling
  4. grouping by time label reused for both days

@hadiafifah hadiafifah deployed to development March 5, 2026 03:59 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Backend: Schedule logic fix

2 participants