Files
zeekay 043ac58d3c chore: sweep upstream brand from ALL files; restore LICENSE/NOTICE attribution
Extends the sweep beyond packages/ to the whole repo (178 files): workflows,
.eslintrc, playground, examples, tooling, root docs. Zero upstream-brand refs and
zero such filenames outside the exemptions.

REVERTS A LICENSING ERROR (from earlier rebrand e43ab1af, not this sweep):
- LICENSE had its copyright holder rewritten to 'Insights'. Restored to the real
  holder: 'Copyright 2020 Posthog / Hiberly, Inc.' (+ Mixpanel, Inc.).
- NOTICE credited a non-existent upstream (github.com/getinsights/insights-js).
  Restored to the real one: github.com/PostHog/posthog-js.
Apache-2.0 4(c) requires retaining upstream attribution; rewriting a third
party's copyright line falsifies ownership. Both files are now excluded from the
guard and documented as exempt in LLM.md.

Also:
- Deleted junk: AGENTS.md~upstream_main (merge leftover), the now-obsolete
  rebrand script; renamed upload-*-s3.ts tooling (still used by cli.ts).
- Removed 42 stale playground/example pnpm-lock.yaml files: they pinned upstream
  packages the package.json no longer references. Regenerated on install —
  sed-ing a lockfile would corrupt its integrity hashes.
- Guard renamed no-posthog.yml -> brand-guard.yml and now assembles the pattern
  at runtime, so no filename or file content carries the string (the previous
  guard was swept by its own rule, inverting it to forbid 'insights').
2026-07-16 09:54:05 -07:00

1.5 KiB
Raw Permalink Blame History

Example app — @insights/convex

Exercises every method the component exposes — analytics, local feature flag eval, remote feature flag eval, and AI generation tracing — against a real Insights project. Useful for verifying changes to the component end-to-end and as a runnable reference for setup.

Running it

From the repository root:

pnpm i
pnpm package        # builds the tarball that this app installs
pnpm dev --filter example-convex

In a second terminal:

cd examples/example-convex
npx convex dev
npx convex env set INSIGHTS_PROJECT_TOKEN phc_…             # project token
npx convex env set INSIGHTS_PERSONAL_API_KEY phs_…  # optional, enables local eval
npx convex env set INSIGHTS_HOST https://us.i.insights.com   # optional, US default

What you'll see

  • Sections 01–03 capture analytics events (verify them in your Insights activity feed).
  • Section 04 has two rows of buttons — local-eval methods (query context, reactive) and remote-eval methods (action context, per-call /flags request).
  • Section 05 captures $ai_generation events through @insights/ai, defaulting to OpenTelemetry with manual capture as the alternative. See LLM analytics for Convex.
  • The right column shows the local evaluation cache state plus a live, reactive view of flag values for the current Distinct ID — change a flag in Insights and the row flashes when the cron picks it up.