Skip to content

fix: restore Google Calendar to settings & integrations pages - #775

Merged
2witstudios merged 2 commits into
masterfrom
pu/google-cal
Mar 13, 2026
Merged

2witstudios merged 2 commits into
masterfrom
pu/google-cal

Conversation

@2witstudios

@2witstudios 2witstudios commented Mar 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Re-add "Google Calendar" entry to the Settings page with Calendar icon, linking to /settings/integrations/google-calendar
  • Add useGoogleCalendarStatus() hook that calls the existing /api/integrations/google-calendar/status endpoint
  • Add a Google Calendar status card to the Integrations hub page (loading/connected/not-connected states)
  • Remove dead code: getProviderDetailHref, detailHref/onDetail props, and unused ExternalLink import — these only handled Google Calendar in the generic connections list, which can never contain it

Test plan

  • Navigate to /settings — confirm "Google Calendar" appears in the Integrations section with a Calendar icon
  • Click it — confirm it links to /settings/integrations/google-calendar
  • Navigate to /settings/integrations — confirm a Google Calendar card appears
  • If not connected: card shows "Not connected" with a "Set up" button
  • If connected: card shows green check, email address, and "Manage" button
  • Both buttons navigate to /settings/integrations/google-calendar
  • pnpm typecheck passes (verified locally)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Google Calendar integration added to Integrations settings.
    • Visual status indicators show Connected / Not connected and synced event count.
    • Users can Set up or Manage Google Calendar from a central card.
  • Refactor

    • Connected Integrations list simplified — per-connection detail links removed for a streamlined management flow.

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>
@coderabbitai

coderabbitai Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2c52acd8-4684-4fa9-a1c5-7730b1f76474

📥 Commits

Reviewing files that changed from the base of the PR and between ebe65ce and 662f5dc.

📒 Files selected for processing (1)
  • apps/web/src/app/settings/integrations/page.tsx

📝 Walkthrough

Walkthrough

Adds Google Calendar integration status to settings: a new useGoogleCalendarStatus hook queries /api/integrations/google-calendar/status. The integrations UI renders a Google Calendar card with connection state and actions. ConnectionRow props and per-connection detail navigation were removed.

Changes

Cohort / File(s) Summary
Google Calendar UI & settings
apps/web/src/app/settings/integrations/page.tsx, apps/web/src/app/settings/page.tsx
Added Google Calendar card/item and status UI; imported Calendar and CheckCircle2 icons; integrated setup/manage actions into the integrations list.
ConnectionRow signature update
apps/web/src/app/settings/integrations/page.tsx
Removed legacy provider detail navigation and no longer pass detailHref / onDetail to ConnectionRow.
Integration status hook
apps/web/src/hooks/useIntegrations.ts
Added exported useGoogleCalendarStatus() hook that fetches connection details, connected flag, synced event count, and loading/error state from the Google Calendar status API.

Sequence Diagram

sequenceDiagram
    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)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

codex

Poem

🐰 I hopped to the settings, with a calendar bright,
Google events lined up, ready to light,
No extra links trailing, just status in view,
Setup or manage — the choice is for you,
Hooray for synced days, and tidy menus too ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: restoring Google Calendar to both the settings and integrations pages, which aligns with the primary objectives of re-adding the UI entry and status card.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pu/google-cal
📝 Coding Plan
  • Generate coding plan for human review comments

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +138 to +140
{gcalLoading ? (
<Skeleton className="h-16 w-full" />
) : gcalConnected && gcalConnection ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@2witstudios
2witstudios merged commit a859dd4 into master Mar 13, 2026
1 of 3 checks passed
@2witstudios
2witstudios deleted the pu/google-cal branch March 14, 2026 23:08
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