posthog-js icon indicating copy to clipboard operation
posthog-js copied to clipboard

Feature Flags True by Deault

Open marc-wilson opened this issue 2 months ago • 6 comments

Bug description

I may have put this issue in the wrong repo: https://github.com/PostHog/posthog/issues/40507

Please describe.

How to reproduce

Related sub-libraries

  • [ ] All of them
  • [x] posthog-js (web)
  • [ ] posthog-js-lite (web lite)
  • [ ] posthog-node
  • [ ] posthog-react-native
  • [ ] @posthog/react
  • [ ] @posthog/ai
  • [ ] @posthog/nextjs-config

Additional context

Thank you for your bug report – we love squashing them!

marc-wilson avatar Nov 01 '25 21:11 marc-wilson

@PostHog/team-feature-flags

marandaneto avatar Nov 02 '25 14:11 marandaneto

Hm, this is interesting. @marc-wilson is this new behavior?

I wonder if there where some changes recently to isUndefined 🤔 https://github.com/PostHog/posthog-js/blob/main/packages/browser/src/posthog-featureflags.ts#L643

mhornbacher avatar Nov 03 '25 22:11 mhornbacher

https://github.com/PostHog/posthog-js/blob/main/packages/browser/src/posthog-featureflags.ts#L643

TBH I never checked these scenarios, just kind of expected it. But, the posthog outage last week made it pretty clear flags default to true. i haven't been a customer long enough to notice if this is new behavior. I went through the same exercise and was poking around the source saw a few possible spots. but, ultimately i don't know what their api's return and where the coerce it so stopped looking too deep.

whatever the issue is, seems like this should have a pretty high priority since things are being exposed when things aren't intended to be. not sure if the posthog team actively watched the issues or not.

marc-wilson avatar Nov 03 '25 23:11 marc-wilson

It can be a bit quiet here for feature-flag changes. I pushed a PR a few months back for a simple fix for flags in NextJS to avoid pop-in and it seems to have died in the stale-bot dustbowl. The team has a new open spot though!

https://posthog.com/teams/feature-flags

mhornbacher avatar Nov 05 '25 19:11 mhornbacher

@mhornbacher did I never end up reviewing your PR? I'm sorry; feel free to tag me on it and I can open it up again.

Btw I replied to @marc-wilson on his duplicate issue, moving my reply here https://github.com/PostHog/posthog/issues/40507#issuecomment-3483677496

dmarticus avatar Nov 05 '25 19:11 dmarticus

@dmarticus no and no worries at all :) Its a busy time of year as everyone gets ready for their holiday deliverables! I tagged you on it but please don't feel rushed.

Where I am working now I am pitching PostHog as part of a larger re-write of some really outdated systems and, well, we move quite slow...

mhornbacher avatar Nov 05 '25 22:11 mhornbacher