Skip to content
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

Disabling feature flag doesn't disable feature flags still in client cache #1656

Open
timgl opened this issue Jan 17, 2025 · 1 comment
Open
Assignees

Comments

@timgl
Copy link
Collaborator

timgl commented Jan 17, 2025

Bug description

Disabling feature flags doesn't actually cause the JS SDK to return false for that feature flag if it was already seen by user

How to reproduce

  1. Create feature flag and enable it
  2. Refresh page, see that posthog.isFeatureEnabled('query-websocket') is true
  3. Disable feature flag
  4. Refresh page. query-websocket doesn't show up in /decide anymore, but posthog.isFeatureEnabled('query-websocket') still returns true

Additional context

@havenbarnes
Copy link
Contributor

The SDK doesn't overwrite local cache flags if the flag is suddenly missing from /decide. Sounds like we either need to return them from /decide or diff latest /decide response with the local cache flag keys

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

No branches or pull requests

3 participants