- 2d8e6eb: Lower VS Code engine minimum to 1.93.0 for Cursor compatibility
- 400ef9e: Lower VS Code engine minimum to 1.93.0 for Cursor compatibility
- 65da142: Added robust testing
- 1bb6cb9: Improve empty state for stale feature flags
- 8517b3c: Add new x-ray mode, also improve inline hints for events by letting them be configurable
- ba8be9b: Detect incorrect
initconfiguration
- d2d3b88: Cleanup README, CONTRIBUTING and ROADMAP
- 1c2ddcf: Release new version to launch new release process
- a0dcc8e: Release new minor version to test new release process
All notable changes to the PostHog VS Code extension will be documented here.
Format follows Keep a Changelog.
- Flag decorations: rollout percentage, variant count, and experiment status shown inline after feature flag calls
- Event decorations: 7-day sparkline and volume count shown inline after
capture()calls - Session CodeLens: "X sessions / Y users in 24h" lens above event and flag calls with auto-refresh
- Flag CodeLens: flag type, status, and quick-action links (toggle, detail, references) above flag calls
- Variant highlighting: detect switch/if blocks gating on flag variants and show rollout percentages per branch
- Cmd+click navigation: document links on flag keys open flag or experiment detail panels
- Event naming diagnostics: warn on typos and close matches in
capture()event names via Levenshtein distance
- Flag key autocomplete inside
isFeatureEnabled(),getFeatureFlag(), and related methods - Event name autocomplete inside
capture()calls - Event property name and top value autocomplete inside capture properties
- Variant key autocomplete for multivariate flags
- "Create flag in PostHog" quick fix when a flag key is not found in the project
- "Toggle flag" quick fix to enable/disable a flag directly from the editor
- "Clean up stale flag" quick fix to remove references to fully-rolled-out or inactive flags
- "Wrap in feature flag" refactor action to wrap selected code in an
isFeatureEnabledguard
PostHog: Sign In/Sign Out/Sign In with PostHog(OAuth)PostHog: Select Projectfor multi-project switchingPostHog: Refresh Feature Flagsto force a cache refreshPostHog: Find Flagwith quick pick search across all flagsPostHog: Toggle Flagto enable/disable a flag with confirmationPostHog: Copy Flag KeyandOpen in PostHog(browser)PostHog: Create Feature Flagfrom the editorPostHog: Wrap in Flagto wrap selected code in a feature flag guardPostHog: Find Flag Referencesto search the workspace for a flag keyPostHog: Generate Flag Typesto generate TypeScript type definitions from flag payloadsPostHog: Generate Typevia editor context menuPostHog: Scan for Stale Flagsto scan the codebase for flags that are fully rolled out, inactive, or experiment-completePostHog: Clean Up Stale Flagto remove a single stale flag referencePostHog: Export Stale Flagsto export stale flag scan results as a reportPostHog: Watch Sessionsto open a session replay panel for a given event or flagPostHog: Show Flag Detail/Show Experiment Detailin editor-tab panelsPostHog: Launch Experiment/Stop Experiment
- Branded welcome screen with PostHog logo and dual sign-in (API key + OAuth)
- Sidebar with Flags, Experiments, and Analytics tabs with search and filter
- No-results feedback message when search returns empty
- Tabs default to Flags on first open
- Feature flag detail panel (full editor tab) with status, rollout, and variants
- Experiment detail panel with Bayesian results visualization
- Session replay panel showing sessions related to a flag or event
- Analytics tab with skeleton loading cards and shimmer animation
- Chart theme support with light/dark CSS overrides and automatic theme detection
- Codebase-wide scan for flags that are fully rolled out, inactive, or experiment-complete
- Stale flags tree view in the sidebar with per-flag references
- Single flag cleanup with regex-based code removal
- Batch cleanup of all stale flags
- Stale flag report export
- Scan glob limited to actually supported languages (JS/TS only)
.posthog.jsonworkspace config for shared team settings (host, projectId, client names, flag functions)- Multi-project support: detects when a file belongs to a different project and offers to switch
- Configurable additional client names (e.g.,
toolbarPosthogJS,telemetry) - Configurable additional flag functions (e.g.,
useFeatureFlag) - React hooks (
useFeatureFlag,useFeatureFlagPayload,useFeatureFlagVariantKey,useActiveFeatureFlags) detected automatically detectNestedClientssetting for calls likewindow.posthog?.capture()showInlineDecorationstoggle to enable/disable inline decorationsmultiProjectNotificationstoggle
generateFlagTypespure function to generate TypeScript interfaces from flag payloads- Recursive type inference with safe property name quoting
- Generate Flag Types command with guards and auto-open of generated file
- API key authentication with SecretStorage
- OAuth PKCE flow with
posthog.signInOAuthcommand - Dual sign-in buttons on the welcome screen (API key and OAuth)
- OAuth token storage in AuthService
- Proactive token refresh in PostHogService
- RBAC-aware: stores
canWritepermission from API
- Tree-sitter powered code intelligence via web-tree-sitter (JS/TS grammars)
- In-memory caches with onChange listener pattern for flags, events, and experiments
- Periodic cache refresh: flags every 1 min, events and experiments every 5 min
- Flag diff notifications: shows info message when a flag is toggled externally
- Status bar showing project name, host region (US/EU), and last sync time
- Extension self-telemetry via PostHog (respects VS Code telemetry setting, disabled in dev mode)
- Debug tree view (visible only in development mode) for inspecting cache state
- HogQL query support with
escapeHogQLString()for safe interpolation - GitHub Actions CI workflow for tests
- GitHub Actions publish workflow with conventional-commit version bumping
- HogQL escaping bug in
getEventVolumes(CodeQL alert) - Incomplete URL substring sanitization (CodeQL alert)
buildCleanupEditreturning null on edge casesdetectNestedClientsdefault mismatch between config schema and code- Volume and sparkline time windows now both use 7 days consistently
- Stale flag cleanup regex reads
additionalClientNamesfrom config - Stale flag scan glob limited to actually supported languages (JS/TS)
- React hooks detected automatically without requiring manual configuration
- ExperimentCacheService now follows the onChange listener pattern (consistent with other caches)
- Flag methods in stale flag service scoped to JS/TS only
- HogQL editor feature (
.hogqllanguage,HogQLEditorProvider) - Error tracking feature (
errorCacheService,errorDecorationProvider) - Smart capture insertion (
captureCodeActionProvider) - Python, Go, and Ruby tree-sitter language support (focused on JS/TS for v1)
- Feature flag sidebar with search and detail panels
- Event tracking with autocomplete
- Experiment monitoring with Bayesian results
- Session replay integration
- Tree-sitter powered code intelligence
- Stale flag detection and auto-cleanup
- VS Code Marketplace publishing via GitHub Actions