Skip to content

feat: agentic detection for source-map upload flow#689

Draft
gewenyu99 wants to merge 4 commits into
mainfrom
agentic-detection
Draft

feat: agentic detection for source-map upload flow#689
gewenyu99 wants to merge 4 commits into
mainfrom
agentic-detection

Conversation

@gewenyu99

Copy link
Copy Markdown
Collaborator

Problem

Changes

Test plan

Replace the static pre-auth platform scan with a Haiku agent that runs
after login: it maps every project in the repo (monorepo-aware) to a
supported source-maps variant and flags which already have a PostHog SDK,
then the user picks one to instrument. Drops the health-check ("connection")
step and the pre-auth detection display from this flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

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 basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /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 error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/cicd-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-nested-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-gitlab-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-ssh-vps-node-raw
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

gewenyu99 and others added 3 commits June 18, 2026 15:12
…urface scan activity

- Move the agentic detector to src/lib/detection/agentic.ts next to the other
  detection tools (framework, features, package-manager), made generic and
  product-knowledge-free (caller passes targets). Source-maps keeps a thin
  adapter that supplies its variants and classifies instrumentability.
- Intro: "detect your project's framework(s)…"; left-align the wrapping
  paragraph inside a centered block to fix the staircase.
- Detect screen: always surface the agent's live actions while scanning.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Detect screen: lead with the instrumentable projects in the picker, collapse
  the (often dozens of) unsupported projects into a short count line instead of
  listing every one. Clearer picker prompt.
- Detection agent: manifest-first recipe (Glob **/package.json, read each once)
  so it stops enumerating non-JS directories as "unknown" and finishes fast.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The agent run captured the selected variant at run() time and the store forks
the session reference on setKey, so the picker's choice never reached the run
prompt — the run built the failed-detection prompt and aborted with
unsupported-platform every time, racing the detection agent.

- Park the agent run after auth until the picker's gate resolves (generic:
  await any gated step between the auth and run screens), mirroring
  waitForAiOptIn.
- Read the chosen variant/path LIVE via getUI().getFrameworkContext at
  prompt-build time instead of from the forked session snapshot.
- Add getFrameworkContext + waitForGate to the UI (ink + logging).
- Wider detection glob + manifest constant; collapse non-instrumentable
  projects to a count line; clearer picker prompt + SDK-missing copy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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