From b3beb922a52c4e8a4331d524d655bcbb99420163 Mon Sep 17 00:00:00 2001 From: Tal Gluck Date: Thu, 3 Sep 2026 23:17:31 +0200 Subject: [PATCH 1/2] fix(replay-vision): abort with a clear message when no framework is detected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DETECT_STEP.onReady had no guard for the "nothing detected at all" case (only for "detected something unsupported"), so an empty repo silently fell through to a null skillId. The orchestrator's preflight then failed every mini-skill variant lookup and surfaced a generic "failed to download" abort — misleading, since nothing was actually downloaded or fetched. Mirrors the guard ciPreRun already has for the CI path. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01HrhaMpCxKgtFSTAgMUErin --- src/lib/programs/replay-vision/index.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib/programs/replay-vision/index.ts b/src/lib/programs/replay-vision/index.ts index 6c1cca04..97beef32 100644 --- a/src/lib/programs/replay-vision/index.ts +++ b/src/lib/programs/replay-vision/index.ts @@ -102,7 +102,18 @@ const DETECT_STEP: ProgramStep = { // be the stale pre-copy object (see the warning in detect.ts). onReady: async (ctx: ProgramReadyContext) => { const integration = await detectFramework(ctx.session.installDir); - if (integration && !REPLAY_VISION_SUPPORTED.has(integration)) { + if (!integration) { + // Mirrors ciPreRun below: with nothing to key off of, the orchestrator's + // preflight can't resolve any task's mini-skill variants and would + // otherwise abort later with a misleading "failed to download" error. + // Fail here instead, with a message that names the actual problem. + await wizardAbort({ + code: ErrorCodes.DetectNoFramework, + message: 'Could not auto-detect your framework for this project.', + }); + return; + } + if (!REPLAY_VISION_SUPPORTED.has(integration)) { await abortUnsupportedPlatform(integration); return; } From a6e25dd8392f50c86896fa84484a1b8969059203 Mon Sep 17 00:00:00 2001 From: Tal Gluck Date: Thu, 3 Sep 2026 23:35:19 +0200 Subject: [PATCH 2/2] improve(replay-vision): give the no-framework abort an actionable message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interactive path had someone at a terminal who could act on better guidance, unlike the CI path this message was copied from. Match the tone of the neighboring abortUnsupportedPlatform: name what's missing, say what to do about it, link the docs. ciPreRun keeps its terser message — that one only ever reaches a log line. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01HrhaMpCxKgtFSTAgMUErin --- src/lib/programs/replay-vision/index.ts | 27 +++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/lib/programs/replay-vision/index.ts b/src/lib/programs/replay-vision/index.ts index 97beef32..0c8b9072 100644 --- a/src/lib/programs/replay-vision/index.ts +++ b/src/lib/programs/replay-vision/index.ts @@ -68,6 +68,19 @@ async function abortUnsupportedPlatform( }); } +async function abortNoFrameworkDetected(): Promise { + await wizardAbort({ + code: ErrorCodes.DetectNoFramework, + message: + "Replay vision couldn't detect a framework here, so it has nothing " + + 'to scope its scanners to.\n\n' + + "Make sure you're running this from your app's root directory " + + '(where its package.json or framework-equivalent lives), not an ' + + 'empty or unrelated folder. See what replay supports at:\n' + + ' https://posthog.com/docs/session-replay', + }); +} + /** * `[ABORT]` reasons the replay-vision skill emits when the run can't proceed. * Kept in sync with the stop conditions in the skill's `description.md` @@ -103,14 +116,12 @@ const DETECT_STEP: ProgramStep = { onReady: async (ctx: ProgramReadyContext) => { const integration = await detectFramework(ctx.session.installDir); if (!integration) { - // Mirrors ciPreRun below: with nothing to key off of, the orchestrator's - // preflight can't resolve any task's mini-skill variants and would - // otherwise abort later with a misleading "failed to download" error. - // Fail here instead, with a message that names the actual problem. - await wizardAbort({ - code: ErrorCodes.DetectNoFramework, - message: 'Could not auto-detect your framework for this project.', - }); + // Same early-abort ciPreRun does below: with nothing to key off of, + // the orchestrator's preflight can't resolve any task's mini-skill + // variants and would otherwise abort later with a misleading "failed + // to download" error. Fail here instead, with a message that names + // the actual problem and what to do about it. + await abortNoFrameworkDetected(); return; } if (!REPLAY_VISION_SUPPORTED.has(integration)) {