From b23aeafd26a2e2210f320b1856bbe377d5a1ff93 Mon Sep 17 00:00:00 2001 From: hurali97 Date: Wed, 18 Nov 2026 13:30:17 +0500 Subject: [PATCH] fix(app-flow): clarify conditional app sign-in guidance --- packages/core/test/app-flow-ui-capture-mode.test.ts | 5 +++++ packages/core/test/app-flow-ui-explore-ui.test.ts | 2 ++ packages/ui/src/components/app-flow-view.tsx | 12 ++++++------ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/core/test/app-flow-ui-capture-mode.test.ts b/packages/core/test/app-flow-ui-capture-mode.test.ts index da0cb9a2..46ce6435 100644 --- a/packages/core/test/app-flow-ui-capture-mode.test.ts +++ b/packages/core/test/app-flow-ui-capture-mode.test.ts @@ -47,6 +47,7 @@ test("the capture mode is persisted when it changes, not when a sweep starts", a .find(entry => entry.textContent === text) as HTMLButtonElement; const trigger = document.querySelector('[aria-label="App Flow capture mode"]') as HTMLElement; assert.ok(trigger, "the toolbar offers the capture mode"); + assert.doesNotMatch(document.body.textContent ?? "", /Sign in to this app/, "structure-only needs no sign-in guidance"); await act(async () => { trigger.click(); }); const option = Array.from(document.querySelectorAll('[role="option"]')) @@ -55,6 +56,10 @@ test("the capture mode is persisted when it changes, not when a sweep starts", a await act(async () => { option.click(); }); assert.equal(storage.getItem("app-flow-mode:/projects/demo"), "screen-ui-and-structure", "the choice is stored before anything is started"); + assert.match(document.body.textContent ?? "", /Sign in to this app, if required/, + "the screen sweep names the app and makes sign-in conditional"); + assert.match(document.body.textContent ?? "", /app under test.+does not require sign-in, you can continue normally/s, + "the guidance distinguishes app authentication from a Mobile Dev requirement"); // What the workspace does when the panel is hidden and shown again, or another tool is picked. await act(async () => { root.unmount(); }); diff --git a/packages/core/test/app-flow-ui-explore-ui.test.ts b/packages/core/test/app-flow-ui-explore-ui.test.ts index 9e553578..4b89ef32 100644 --- a/packages/core/test/app-flow-ui-explore-ui.test.ts +++ b/packages/core/test/app-flow-ui-explore-ui.test.ts @@ -86,6 +86,8 @@ test("App Flow uses adaptive capture and offers AI only for actionable misses", assert.match(guideText, /release build/, "the guide explains what a release build costs"); assert.match(guideText, /deep link/, "the guide explains the deep-link fallback"); assert.match(guideText, /Structure only.+Screen UI \+ Structure/s, "the guide explains both capture modes"); + assert.match(guideText, /If the app requires sign-in, sign in to it first/, + "the guide makes clear that sign-in belongs to the app and is conditional"); // The AI continuation is no longer one click: it lists the eligible screens and starts only the // ones the user ticks, so a model walk is never spent on a screen nobody asked about. diff --git a/packages/ui/src/components/app-flow-view.tsx b/packages/ui/src/components/app-flow-view.tsx index c2b7ce3d..8c3a6fde 100644 --- a/packages/ui/src/components/app-flow-view.tsx +++ b/packages/ui/src/components/app-flow-view.tsx @@ -57,7 +57,7 @@ function AppFlowHelp() {

Map creation

Launching (the walk only)

@@ -257,11 +257,11 @@ export function AppFlowView({ panel }: { panel: AppFlowPanel }) { }
- {/* Shown for every mode, not just the deterministic pass. The AI modes do run a sign-in check - and stop to ask, but stopping mid-sweep is the expensive way to learn this, and a user who - signs in first never pays for it. The advice is the same either way, so the banner no - longer depends on which build is selected. */} - {!isRunning && Launch the app and finish signing in first. A signed-out app captures its sign-in wall instead of the screens behind it.} + {/* Structure-only never launches the app, so sign-in guidance there implies a prerequisite + that does not exist. The model-free screen sweep does skip its sign-in check, though: if + this app has an auth wall, clearing it before capture prevents every route from recording + that same wall. */} + {!isRunning && mode === "screen-ui-and-structure" && Before capturing screens, launch the app under test and complete its sign-in flow. If the app does not require sign-in, you can continue normally.} {isRunning && state.progress &&
{state.progress.phase}
{state.progress.message}