fix(source-maps): give detect dead ends a manual/docs path instead of exit-only#766
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(source-maps): give detect dead ends a manual/docs path instead of exit-only#766posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
… exit-only The error-tracking source-map flow's agentic detect screen had two pure dead ends: a "nothing to instrument" state (where React Native / iOS / Android / Flutter projects land, since they have no automatable variant) and a "detection failed" state, both offering only Exit. Point both at the manual upload docs instead, and tailor the empty-state copy when a native stack is present so those users get a path forward rather than a flat exit. Detection failures now also suggest re-running. Adds an `isNativePlatform` helper (unit tested) to detect native stacks from the agent's framework label for the tailored guidance. Generated-By: PostHog Code Task-Id: 5d816e2b-983f-4537-8679-31f9958414c4
🧙 Wizard CIRun 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:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users hit dead ends partway through error-tracking / source-map setup in
npx @posthog/wizardwith no path forward. The live source-map flow runs an agentic detect screen (SourceMapsDetectScreen), and two of its branches were Exit-only:classify()marks every project non-instrumentable and the screen offers onlyExit. This is the React Native bail described in the report.Exit.Both left users to restart from scratch or give up, which matches the convergent "unreliable mid-setup, no way back in" theme in the error-tracking wizard feedback.
Changes
posthog.com/docs/error-tracking/upload-source-maps) instead of an immediate exit.isNativePlatformhelper (unit tested) that classifies native stacks from the agent's free-text framework label, used only to tailor the guidance.Why: the error-tracking / source-map onboarding flow was a series of dead ends for paying customers (auth rejection, native bail, no iteration path). This PR addresses the two dead ends contained entirely in the source-map detect screen.
Scope note
This is a focused fix for the detect-screen dead ends only. The report also covers session persistence/resume after a crash, a post-change agent iteration path, in-process retry on the 401
AuthErrorScreen, and the VoltaECOMPROMISEDmessage. Those are larger or riskier changes (the secret vault is intentionally non-persistent for security; 401 retry requires reworking the streaming agent run loop; the Volta error has no identified catch site in the wizard) and are deliberately left for separate, dedicated work rather than bundled here. Note also that thedetect.ts:310-316native bail referenced in the report is in the non-agentic detector, which is not wired into the live source-map step sequence — the observed React Native dead end is the agenticclassify()→ empty-detect path fixed here.Test plan
pnpm build— clean.pnpm test— all 1068 unit tests pass, including newisNativePlatformcoverage.pnpm lint— 0 errors (only pre-existing warnings, none in changed files)..test.tsxscreen render tests; ink@6 + React 19 reject component identity under vitest's transform.)LLM context
Authored by PostHog Code (Claude) from an inbox report. Investigated the live vs. legacy detection paths, confirmed the React Native dead end manifests through the agentic detector's
classify()rather thandetect.ts, and scoped the fix to the two Exit-only detect-screen branches.Created with PostHog Code from an inbox report.