Skip to content

refactor: isFeatureEnabled uses internal feature_flag api#255

Merged
sigmachirality merged 1 commit intomainfrom
shantanu/pr-1868-update-cli-to-use-the-new-v2feature_flags-endpoint-instead
Mar 18, 2026
Merged

refactor: isFeatureEnabled uses internal feature_flag api#255
sigmachirality merged 1 commit intomainfrom
shantanu/pr-1868-update-cli-to-use-the-new-v2feature_flags-endpoint-instead

Conversation

@joshi4
Copy link
Contributor

@joshi4 joshi4 commented Mar 16, 2026

Context

Move feature flag checks to our internal api.

Description of Changes

We update the impl of isFeatureFlagEnabled to hit /v2/feature_flags/:flag_name to check if a feature_flag is turned on/off for a user.

Caching is left as is.

@semanticdiff-com
Copy link

semanticdiff-com bot commented Mar 16, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  src/lib/posthog.ts  16% smaller
  src/schema.ts  0% smaller

Copy link
Contributor Author

joshi4 commented Mar 16, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@joshi4 joshi4 requested a review from sigmachirality March 16, 2026 17:19
@sigmachirality sigmachirality changed the title migrate: isFeatureFlagEnabled uses internal feature_flag api instead of posthog refactor: isFeatureFlagEnabled uses internal feature_flag api Mar 18, 2026
Copy link
Member

@sigmachirality sigmachirality left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sigmachirality sigmachirality changed the title refactor: isFeatureFlagEnabled uses internal feature_flag api refactor: isFeatureEnabled uses internal feature_flag api Mar 18, 2026
@sigmachirality
Copy link
Member

Ideally I would prefer this to live outside of posthog.ts now, but I'm fine with some tech debt as the lifetime of this codebase is numbered

@sigmachirality sigmachirality merged commit dba1e76 into main Mar 18, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants