PostHog / posthog

đŸĻ” PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.23k stars 1.26k forks source link

fix(multi project flags): remove flag id from URL when switching projects #23394

Closed jurajmajerik closed 3 months ago

jurajmajerik commented 3 months ago

Problem

Reported in https://posthog.slack.com/archives/C011L071P8U/p1719829017752699

When switching projects while on a feature flag URL, the flag ID stays in the URL, causing a 404 error.

Changes

Remove flag ID from the URL when switching projects.

How did you test this code?

👀

github-actions[bot] commented 3 months ago

Size Change: 0 B

Total Size: 1.06 MB

ℹī¸ View Unchanged | Filename | Size | | :--- | :---: | | `frontend/dist/toolbar.js` | 1.06 MB |

compressed-size-action

Twixes commented 2 months ago

Post-mortem: makes sense, although the exact same problem applies to dashboards, recordings, etc. – so a little weird that now it's solved exclusively for flags