Skip to content

fix(calendar): gate the enable-calendar prompt off on mobile - #5422

Merged
gbirman merged 1 commit into
mainfrom
gbirman/macro-2754-disable-calendar-prompt-on-mobile
Aug 5, 2026
Merged

fix(calendar): gate the enable-calendar prompt off on mobile#5422
gbirman merged 1 commit into
mainfrom
gbirman/macro-2754-disable-calendar-prompt-on-mobile

Conversation

@gbirman

@gbirman gbirman commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hides the "Enable calendar" prompt on phones behind a new enable-calendar-prompt-mobile flag, off by default everywhere including dev. The mobile custom-toast layout drops the body and close button, so the prompt lands as a bare title over the composer with no way to dismiss it.

Desktop is unchanged, and Settings > Email keeps a per-inbox "Enable calendar" button, so the action stays reachable while the prompt is off. Turn the flag on in PostHog once the mobile layout is fixed — #5407 is the alternative that fixes the layout instead.

The mobile custom-toast layout drops the body and the close button, so
the "Enable calendar" prompt lands on a phone as a bare truncated title
over the composer with no way to dismiss it and an action button styled
`text-panel` — a background token — that is near-invisible on the dark
island.

Hide it on phones behind a new `enable-calendar-prompt-mobile` flag,
off by default everywhere including dev, so it can be turned back on in
PostHog once the mobile layout is fixed. Desktop is untouched, and
Settings > Email keeps a per-inbox "Enable calendar" button, so the
action stays reachable while the prompt is off.
@macro-application

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8112f74a-de53-4bd4-8d2c-77b7d25073e6

📥 Commits

Reviewing files that changed from the base of the PR and between 618726b and 8129f00.

📒 Files selected for processing (4)
  • apps/web/src/features/auth/CalendarPermissionPrompt.tsx
  • apps/web/src/features/calendar/use-calendar-ui-flag.test.ts
  • apps/web/src/features/calendar/use-calendar-ui-flag.ts
  • apps/web/src/lib/core/constant/featureFlags.ts

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added mobile-specific controls for displaying the “Enable calendar” prompt.
    • Calendar prompts now appear on mobile only when mobile support is enabled, while desktop behavior remains unchanged.
  • Bug Fixes

    • Prevented calendar permission prompts from appearing in unsupported mobile layouts.
  • Tests

    • Added coverage for desktop and mobile prompt display conditions.

Walkthrough

The calendar permission prompt now checks useCalendarPromptAllowed together with useCalendarUiFlag. Desktop devices remain eligible, while mobile devices require the new mobile calendar prompt feature flag. The change adds the flag constants, eligibility logic, and Vitest coverage for desktop and mobile flag states.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commits format, is 60 characters long, and clearly describes the mobile calendar prompt change.
Description check ✅ Passed The description directly explains the mobile feature flag, affected prompt behavior, unchanged desktop behavior, and alternative access path.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

@gbirman
gbirman merged commit dd74e91 into main Aug 5, 2026
25 checks passed
@gbirman
gbirman deleted the gbirman/macro-2754-disable-calendar-prompt-on-mobile branch August 5, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant