Repository navigation
refactor(marketing): drop the mobile-launch flag - #8129
Conversation
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.
|
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
⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
💤 Files with no reviewable changes (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe 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. ChangesMarketing site Mobile availability
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to 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 ReviewSecurity architecture risk: 🔵 Low · up to 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 Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
|
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
There was a problem hiding this comment.
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)
Why
Mobile launched on September 21 and the
mobile-launchflag 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
/mobileis always in the header and footer nav, always in the sitemap, and always indexable.site-flags.ts, the server PostHog client,MobileLaunchProviderand theposthog-nodedependency from marketing.Behaviour change
If PostHog was unreachable, the site used to hide the Mobile link and mark
/mobileasnoindexfor up to a minute. That fallback is gone.Verified locally
/sitemap.xmland/mobileare static.Not verified
Summary by cubic
Drops the
mobile-launchfeature flag from the marketing site now that mobile has launched./mobileis always in the header and footer nav, always in the sitemap, and always indexable; the flag reader,MobileLaunchProvider, the server PostHog client, and theposthog-nodedependency are removed.Behavior change
/mobileasnoindexfor up to a minute. That fallback is gone.Written for commit ee77ba3. Summary will update on new commits.
Summary by CodeRabbit