-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toolbar Not Respecting Bootstrap #18079
Comments
This might benefit from some more concrete code examples if you have them? I'm reading as - "im using the bootstrapping concept server side to load feature flags and then client side they are not respected" which makes sense given the toolbar has no concept of what you have overridden server side. Or am I misunderstanding you're use of "server side" and actually you are bootstrapping the client to set a certain flag to be "true" but when you load the flags in the toolbar it says false? |
The latter is correct actually, you said that better than I did. The bootstrap has A=false, B=true, C=true. The toolbar shows all 3 as true. Toggling A does not change any flags, but toggling B and C does. My assumption is that the toolbar is reading its flags from a different location because A is only "overridden" according to the toolbars hypothetical state when set to false. Hope that makes sense. Let me try to put together a repro. |
It seems like this is because the toolbar and the page have a different idea of what my distinct ID is. In the network tab I see two API calls, one to Piecing through the code is seems like the toolbar is using local storage to try to persist tokens, the bug may be there. It's a little unclear that the bootstrap is actually the cause here, but it may be part of it -- the crux seems to be that the toolbar and the on-page posthog are operating off separate distinct ids. |
Slight update: it looks like the api/projects/@current/feature_flags/my_flags endpoint operates entirely off temporary_token -- which I assume is being generated by the posthog UI to attach a toolbar. I suspect that may be the source of the problem. Any pointers would be appreciated! |
It looks like the problem may be whether an override is set. I've noticed the color changes to yellow when an override is active. Maybe even more confusingly, this override actually persists even when the toolbar isn't active which makes debugging an absolutely nightmare. Would be amazing to have a clear indicator as to what's coming from the server, what's overridden, and have the buttons specifically reflect the override. |
Closing this. I think it's related to more specific issues I opened. |
thanks @iamnafets , @liyiy is working on resolving all these toolbar issues this week |
💪 |
Bug description
The Posthog toolbar doesn't seem to be respecting the boostrap parameters I'm passing over via RSCs. While useFeatureFlag() is reporting "false" for some flags, the toolbar thinks it's true and thus never allows me to override it.
How to reproduce
Environment
docker compose
, version/commit: [please provide]Additional context
Thank you for your bug report – we love squashing them!
The text was updated successfully, but these errors were encountered: