Skip to content

Calendar initial-load failure is swallowed and rendered as a valid-looking empty calendar #185

@Jose-Gael-Cruz-Lopez

Description

@Jose-Gael-Cruz-Lopez

Severity: Medium
Labels: bug, frontend, P2
Location: frontend/src/components/screens/Calendar.tsx:82-98 (load)

Description

On initial-fetch failure (getAllAssignments/getCourses reject — only getCalendarStatus is individually .catch-guarded), load() does catch { console.error(...) } then clears loading. There's no error state, toast, or retry — the user sees a fully rendered calendar with "0 assignments" and "No assignments yet.", indistinguishable from a genuinely empty account, so they may think their assignments were deleted.

Steps to reproduce

  1. Force the assignments/courses fetch to fail (offline/5xx) and open Calendar.
  2. See an empty-but-normal calendar with no error indication.

Expected vs actual

  • Expected: an error/retry state distinct from the legitimate empty state.
  • Actual: failure masked as empty success.

Suggested fix

Add an error state set in the catch; render an error/retry view (and/or toast.error); guard each call so a courses failure doesn't blank assignments.

Acceptance criteria

  • A failed calendar load shows a distinct error + retry, not an empty calendar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium prioritybugSomething isn't workingfrontendFrontend / UI

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions