Skip to content

Hide recurrence controls without backend support#1676

Merged
Uarmagan merged 5 commits intomainfrom
bug/fix-local-recurrence-settings
Apr 27, 2026
Merged

Hide recurrence controls without backend support#1676
Uarmagan merged 5 commits intomainfrom
bug/fix-local-recurrence-settings

Conversation

@Uarmagan
Copy link
Copy Markdown
Contributor

@Uarmagan Uarmagan commented Apr 27, 2026

Why

The main purpose of this PR is to keep recurring event controls out of local/frontend-only mode. Recurring events depend on the backend-backed event model and MongoDB; IndexedDB local storage is not meant to fully handle that behavior. When Compass is running with only the web app, or when a self-hosted/custom setup has the web app up but the backend or MongoDB is unavailable, the UI should not invite users into recurrence flows that cannot be supported safely.

While tracing that issue, we found the broader cause: the frontend still tried to use backend-backed paths in several places even when the backend was not reachable. That meant users could see raw ApiError: Request failed messages, event changes could keep trying the API instead of saving locally, and sign out could stall while the browser repeatedly attempted backend session requests.

This PR makes the web app degrade cleanly when the backend is unavailable. It does not try to turn signed-in cloud usage into a full offline-sync mode.

What changed

  • Disable recurrence controls unless the user is signed in and the backend is reachable.
  • Show a clearer recurrence message when the backend is unavailable: “Start the Compass backend and MongoDB to use recurring events.”
  • Detect when the browser cannot reach the backend and remember that state while the app is running.
  • Fall back to local event storage when backend requests fail because the backend is unavailable.
  • Keep frontend-only users on the IndexedDB path instead of repeatedly trying remote event requests.
  • Hide raw backend connection errors from auth/profile flows and show friendlier auth messaging.
  • Make logout clear the local signed-in state and navigate immediately, while attempting backend sign-out in the background.
  • Make the web dev/build API fallback point at the backend port instead of the frontend port.

Validation

  • bun run test:web
  • bunx biome check on the touched web files
  • Focused recurrence/backend-unavailable/logout tests after the latest recurrence copy update
  • Manual browser check with the backend shut down: logout returned to the day view quickly instead of stalling

The focused Biome check passed with existing console warnings in the web build/dev scripts.

@Uarmagan Uarmagan changed the title [codex] support frontend-only calendar mode [codex] hide recurrence controls without backend support Apr 27, 2026
@Uarmagan Uarmagan changed the title [codex] hide recurrence controls without backend support Hide recurrence controls without backend support Apr 27, 2026
@Uarmagan Uarmagan marked this pull request as ready for review April 27, 2026 15:54
@Uarmagan Uarmagan merged commit 83a51fe into main Apr 27, 2026
8 checks passed
@Uarmagan Uarmagan deleted the bug/fix-local-recurrence-settings branch April 27, 2026 16:05
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.

1 participant