Skip to content

chore(feature-flags): snapshot the 3.x Android flag pages - #471

Open
turnipdabeets wants to merge 2 commits into
chore/legacy-docs-snapshotsfrom
chore/legacy-android-flag-snapshots
Open

turnipdabeets wants to merge 2 commits into
chore/legacy-docs-snapshotsfrom
chore/legacy-android-flag-snapshots

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Problem

The Android feature flag variants install posthog-android 3.x, but they read two pages live: feature-flags/adding-feature-flag-code.md (a group shared_docs entry) and feature-flags/installation/android.md. When posthog-android 4.0 ships, PostHog/posthog.com#21808 changes the Android snippet on the first page to PostHog.onFeatureFlags { loaded -> … }, which 3.x doesn't have. The second page renders the in-app onboarding, which moves to projectToken and posthog-android:4.+. The next build after that would hand 3.x installs 4.0-only code.

Stacked on #454, which adds the legacy snapshots and repo-file docs_urls. Like #454, it must be released before those pages change.

Changes

  • context/docs-snapshots/legacy/feature-flags/: copies of both pages, taken 2026-11-04 while they still describe 3.x (apiKey, posthog-android:3.+, the onFeatureFlags config option). They sit in a subfolder so the install page keeps its android.md reference name next to the library page snapshot. The README lists them.
  • A variant's shared_docs entry now replaces the group's entry that writes the same reference file, in place. Before, both were fetched and the later one overwrote the file. No variant declares shared_docs today, so nothing else changes.
  • feature-flags and integration-v2/feature-flags-step: the android variant reads both snapshots. All other variants still read the flag code page live.
  • omnibus/instrument-feature-flags: reads the Android install page snapshot. It keeps the live flag code page, because that one skill covers every platform. The 4.0 Android snippet on that page has a note for 3.x readers.

Not covered: iOS has the same problem with PostHog/posthog.com#21807. The iOS variants could use the same flag code page snapshot, with one shared_docs line each, once someone checks the iOS install page.

Test plan

  • pnpm test: 227 passed. New tests cover the in-place replacement and that both Android flag variants get the snapshot instead of the live page. The install page is added to the list of pages no config may fetch live.
  • Generated feature-flags-android, integration-v2-feature-flags-step-android and omnibus-instrument-feature-flags. Both Android skills' adding-feature-flag-code.md reference is byte-identical to the snapshot. The snapshots match the live pages today, so the output is unchanged until the pages move.

LLM context

Written with Claude Code (Opus 5.5) at the request of the posthog-android maintainer.

🤖 Generated with Claude Code

The Android flag variants install posthog-android 3.x, but read the
live flag code page and the Android flag install page, which move to
4.0 on release day. They now read 2026-11-04 snapshots of both pages.

The flag code page is a group shared doc, so a variant's own
shared_docs entry now replaces the group's one with the same file name.
Every other variant still reads it live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@turnipdabeets turnipdabeets self-assigned this Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

#478)

* chore(skills): snapshot the 3.x iOS flag, error tracking and logs pages

posthog-ios 4.0 moves the iOS install snippets to SPM `from: "4.0.0"` and
drops CocoaPods (posthog.com#21807, posthog#129618), and changes the iOS
section of the flag code page. The iOS variants install 3.x, so they read
copies taken while the pages still describe it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: name the logs snapshot's 3.59.3 pin in the README

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

1 participant