Remove dead code and the duplicated schedule picker in Navbar #85

Open
opened 2026-10-03 19:44:45 +00:00 by jalenluorion · 0 comments
Member

What's wrong
Navbar.tsx carries leftovers that make it hard to change safely:

  • if (!userId) return <div>Loading...</div> never runs, because userId starts as "n/a".
  • The whole schedule picker (MUI Select plus its create and delete actions) is copied once for desktop and once for mobile, and the !isMobile check inside the mobile copy can never be true.

Where to look

  • web/src/app/components/Navbar.tsx

Done when

  • The schedule picker is one component used in both layouts
  • Unreachable branches are removed
  • Desktop and mobile look and behave exactly as before (check both widths, light and dark)

Notes
Do this after "Dark mode from system settings breaks the schedule picker and theme toggle", which touches the same picker, to avoid conflicts.

**What's wrong** `Navbar.tsx` carries leftovers that make it hard to change safely: - `if (!userId) return <div>Loading...</div>` never runs, because `userId` starts as "n/a". - The whole schedule picker (MUI Select plus its create and delete actions) is copied once for desktop and once for mobile, and the `!isMobile` check inside the mobile copy can never be true. **Where to look** - `web/src/app/components/Navbar.tsx` **Done when** - [ ] The schedule picker is one component used in both layouts - [ ] Unreachable branches are removed - [ ] Desktop and mobile look and behave exactly as before (check both widths, light and dark) **Notes** Do this after "Dark mode from system settings breaks the schedule picker and theme toggle", which touches the same picker, to avoid conflicts.
jalenluorion added this to the Phase 3 milestone 2026-10-03 19:44:45 +00:00
jalenluorion added this to the CMUCal project 2026-10-03 19:45:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ScottyLabs/cal#85
No description provided.