Repository navigation
fix: restore Google Calendar to settings & integrations pages - #775
Conversation
Google Calendar uses its own standalone DB table and OAuth flow, not the generic integrations provider system. Commit 4f88296 replaced its dedicated settings entry with a generic "Service Connections" entry, making it unreachable from the UI. Re-add Google Calendar entry to settings page, add a status card to the integrations hub using a new useGoogleCalendarStatus hook (reuses existing API endpoint), and remove dead code that tried to link Google Calendar from the generic connections list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Google Calendar integration status to settings: a new Changes
Sequence DiagramsequenceDiagram
participant UI as Settings UI
participant Hook as useGoogleCalendarStatus
participant SWR as SWR Fetcher
participant API as /api/integrations/google-calendar/status
UI->>Hook: mount / render (request status)
Hook->>SWR: fetch (revalidateOnFocus: false)
SWR->>API: GET status
API-->>SWR: return connection payload
SWR-->>Hook: update data (connected, connection, syncedEventCount)
Hook-->>UI: provide status, isLoading, error
UI->>UI: render Google Calendar card (Connected / Not connected)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ebe65cea3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {gcalLoading ? ( | ||
| <Skeleton className="h-16 w-full" /> | ||
| ) : gcalConnected && gcalConnection ? ( |
There was a problem hiding this comment.
Handle Google Calendar status fetch errors distinctly
When /api/integrations/google-calendar/status fails (for example due to a transient 500), useGoogleCalendarStatus() defaults to connected: false/connection: null, and this branch renders the “Not connected” state. That makes an existing integration look disconnected and can send users through unnecessary re-setup; add an explicit error state (or only show “Not connected” when !error) so fetch failures are not interpreted as real disconnects.
Useful? React with 👍 / 👎.
When the /status endpoint returns a transient error, the card now shows an explicit error message instead of falsely displaying "Not connected" which could send users through unnecessary re-setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
/settings/integrations/google-calendaruseGoogleCalendarStatus()hook that calls the existing/api/integrations/google-calendar/statusendpointgetProviderDetailHref,detailHref/onDetailprops, and unusedExternalLinkimport — these only handled Google Calendar in the generic connections list, which can never contain itTest plan
/settings— confirm "Google Calendar" appears in the Integrations section with a Calendar icon/settings/integrations/google-calendar/settings/integrations— confirm a Google Calendar card appears/settings/integrations/google-calendarpnpm typecheckpasses (verified locally)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Refactor