Feature Request: Set flag distribution in bootstrap
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Feature request
Is your feature request related to a problem?
The custom Fast feature flags library allows users to bootstrap flags and set distribution in the frontend, this makes it useful for use cases where users want to avoid flicker which happens when waiting for flag evaluation.
Describe the solution you'd like
A way to set flag distribution from the SDK that's similar to this:
const assignedFeatureFlags = PFFF([
{
key: 'blog-post-cta',
variants: {
control: 0.50,
test: 0.50,
},
}]);
Describe alternatives you've considered
- Use bootstrapping, but calculate the flags on the server or a view before the one where the flag is needed immediately
Additional context
From: https://posthoghelp.zendesk.com/agent/tickets/34303 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/35904)
Debug info
null
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced src/posthog-fast-feature-flags.ts implementation and the bootstrapping documentation to understand the requested frontend behavior. Clarify the target PostHog SDK entry point and interface with maintainers; done should mean the distribution can be specified from the SDK without relying on server-side flag calculation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100