Add "Always redirect" checkbox to skip region redirect delay #2
+56
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Users redirecting between PostHog Cloud regions (US/EU) must wait 7 seconds on every redirect, even for frequent cross-region users.
Changes
Added an "Always redirect" checkbox that persists user preference in localStorage to skip the countdown:
UI Changes:
LemonCheckboxto redirect modal with label "Always redirect"localStorage.ph_auto_redirect_regionBehavior:
useOnMountEffectAnalytics:
Redirect to logged-in instance modal shown- fires for both manual (modal shown) and automatic redirectsauto: trueproperty to distinguish from manual modal displaysRedirect to logged-in instance always redirect toggled- tracks preference changesHow did you test this code?
Changelog: (features only) Is this feature complete?
Yes
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.