Skip to content

refactor(marketing): drop the mobile-launch flag - #8129

Merged
saddlepaddle merged 1 commit into
mainfrom
saddlepaddle/remove-site-flag
Oct 4, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
saddlepaddle/remove-site-flag

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Mobile launched on September 21 and the mobile-launch flag has been on since. The marketing site still asked PostHog on every render whether to show /mobile. That read is also what stopped the sitemap from prerendering (#8128).

What changes

  • /mobile is always in the header and footer nav, always in the sitemap, and always indexable.
  • Removed site-flags.ts, the server PostHog client, MobileLaunchProvider and the posthog-node dependency from marketing.
  • The desktop app still reads the same flag; it is not touched.

Behaviour change

If PostHog was unreachable, the site used to hide the Mobile link and mark /mobile as noindex for up to a minute. That fallback is gone.

Verified locally

  • Build passes; /sitemap.xml and /mobile are static.
  • Typecheck and the marketing tests pass, with the sitemap test updated.

Not verified

  • I did not click through the nav on a running build.

Summary by cubic

Drops the mobile-launch feature flag from the marketing site now that mobile has launched. /mobile is always in the header and footer nav, always in the sitemap, and always indexable; the flag reader, MobileLaunchProvider, the server PostHog client, and the posthog-node dependency are removed.

Behavior change

  • Previously, if PostHog was unreachable, the site hid the Mobile link and marked /mobile as noindex for up to a minute. That fallback is gone.
  • The desktop app still reads the same flag and is not affected.

Written for commit ee77ba3. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Updates
    • The Mobile link now appears in the site footer and Product menus regardless of launch status.
    • The Mobile page is now included in the sitemap for all visitors and languages.
    • Search engines can index the Mobile page, and its App Store description is displayed regardless of launch status.

Mobile launched on September 21 and the flag has been on since, so the
site read PostHog on every render to learn something that no longer
changes. /mobile is now a plain nav link, sitemap entry and indexed
page, and the provider, the flag reader, the server PostHog client and
the posthog-node dependency are gone.

The desktop app still reads the same flag and is not touched.
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2f8dd35d-d9f7-491f-95da-1f577bf369f9
📥 Commits

Reviewing files that changed from the base of the PR and between b3179c5 and ee77ba3.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • apps/marketing/package.json
  • apps/marketing/src/app/[lang]/components/Footer/Footer.tsx
  • apps/marketing/src/app/[lang]/components/Header/components/DesktopNav/DesktopNav.tsx
  • apps/marketing/src/app/[lang]/components/Header/components/MobileNav/MobileNav.tsx
  • apps/marketing/src/app/[lang]/components/Header/constants.tsx
  • apps/marketing/src/app/[lang]/layout.tsx
  • apps/marketing/src/app/[lang]/mobile/page.tsx
  • apps/marketing/src/app/[lang]/providers/MobileLaunchProvider/MobileLaunchProvider.tsx
  • apps/marketing/src/app/[lang]/providers/MobileLaunchProvider/index.ts
  • apps/marketing/src/app/sitemap.test.ts
  • apps/marketing/src/app/sitemap.ts
  • apps/marketing/src/lib/posthog-server.ts
  • apps/marketing/src/lib/site-flags.ts
💤 Files with no reviewable changes (5)
  • apps/marketing/package.json
  • apps/marketing/src/lib/posthog-server.ts
  • apps/marketing/src/app/[lang]/providers/MobileLaunchProvider/MobileLaunchProvider.tsx
  • apps/marketing/src/lib/site-flags.ts
  • apps/marketing/src/app/[lang]/providers/MobileLaunchProvider/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The marketing site no longer uses the mobile launch flag. Mobile links, page metadata, and sitemap entries are now available without checking launch state. The PostHog flag lookup and its provider infrastructure have been removed.

Changes

Marketing site Mobile availability

Layer / File(s) Summary
Remove launch-state infrastructure
apps/marketing/src/app/[lang]/layout.tsx, apps/marketing/src/app/[lang]/providers/MobileLaunchProvider/*, apps/marketing/src/lib/site-flags.ts, apps/marketing/src/lib/posthog-server.ts, apps/marketing/package.json
The layout no longer loads or provides mobile launch state. The provider, PostHog flag lookup, PostHog client, and posthog-node dependency are removed.
Render Mobile links from static navigation
apps/marketing/src/app/[lang]/components/Header/constants.tsx, apps/marketing/src/app/[lang]/components/Header/components/DesktopNav/DesktopNav.tsx, apps/marketing/src/app/[lang]/components/Header/components/MobileNav/MobileNav.tsx, apps/marketing/src/app/[lang]/components/Footer/Footer.tsx
The desktop and mobile navigation and footer use product links that include Mobile without checking launch state.
Publish mobile metadata and sitemap entry
apps/marketing/src/app/[lang]/mobile/page.tsx, apps/marketing/src/app/sitemap.ts, apps/marketing/src/app/sitemap.test.ts
The mobile page always includes its App Store description. The sitemap always lists localized Mobile routes, and the test asserts their presence.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: kitenite

Merge Risk: ⚪ Minimal · up to ee77b

This change makes the Mobile link, page indexing and sitemap entry permanent, matching the already-launched product. No concrete merge-blocking risk was identified.

Security Architecture Review

Security architecture risk: 🔵 Low · up to ee77b

The removed flag controlled discovery of an already-public marketing page, not access to protected functionality. No introduced security concern was identified in the inspected changes, but deployment behavior and broader security coverage remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The supported exposure change applies to anonymous discovery of the marketing Mobile page across navigation, indexing, and sitemap publication. In the former flag-off state, direct page access still existed; greater discoverability does not itself confer application or agent privileges.

Security Findings and Attack Paths

  • observed — The existing Android waitlist accepts visitor-provided email and records a waitlist_signup analytics event with local submitted-state updates. The inspected route change neither adds this input path nor introduces a privileged sink; the analytics implementation itself was not assessed.

Trust Boundaries and Controls

  • observed — The removed launch mechanism supplied site-wide discovery policy, not visitor authentication or authorization. Its Boolean context did not wrap children in an access check, and noindex affected crawler metadata rather than preventing direct requests.
🚥 Pre-merge checks | ✅ 4 | ❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title uses conventional commit format and clearly summarizes the removal of the marketing mobile-launch flag.
Description check ✅ Passed The description explains why the flag was removed, details the behavior changes, and reports testing. It does not include the template checklist, but the main required information is present.
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Marketing site removes feature flag for mobile page.

The PR appears safe to merge; no actionable issue was identified in the changed behavior.

Summary

The PR removes the marketing site's mobile-launch flag read and makes /mobile consistently visible and indexable.

  • Header and footer navigation now include Mobile without a flag check.
  • Mobile metadata and the sitemap include the page unconditionally.
  • The unused marketing provider, server-side PostHog client, and dependency are removed.

Reviews (1) · Last reviewed commit: "refactor(marketing): drop the mobile-lau..."

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 14 files

Architecture diagram
sequenceDiagram
    participant Browser as Browser
    participant Next as Next.js Server
    participant PH as PostHog
    participant Cache as Next.js Cache

    Note over Browser,Next: Static Site Generation (SSG)

    Browser->>Next: GET /sitemap.xml
    Next->>Next: Generate sitemap from static config
    Note over Next: Includes /mobile for all locales
    Next-->>Browser: Static XML response

    Browser->>Next: GET /mobile
    Next->>Next: Render static mobile page
    Note over Next: Metadata always indexable
    Next-->>Browser: HTML response

    Browser->>Next: GET / (or any page)
    Next->>Next: Render layout with Header/Footer
    Note over Next: PRODUCT_LINKS always includes /mobile
    Next-->>Browser: HTML with Mobile nav link

    Note over Next,PH: Previous behavior (removed in this PR)

    Note over Next: No longer calls PostHog feature flag<br/>on server during render
    Note over Next: No longer conditionally includes /mobile<br/>in nav, sitemap, or metadata
    Note over Next: No longer waits on PostHog availability<br/>or applies 60s cached fallback

    Note over Next: Desktop app still reads the same flag<br/>from PostHog independently (unchanged)
    Note over Next: posthog-js remains for client-side<br/>analytics tracking (track events)
Loading

Re-trigger cubic

@saddlepaddle
saddlepaddle merged commit bab85d4 into main Oct 4, 2026
19 checks passed

This branch was previously deployed

1 inactive deployment
preview — ee77ba38 Deployed Oct 4, 2026 by saddlepaddle via Deploy Docs #11000
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