From fa11747406a234ff7a0e179ec6f2bfc29876c5c8 Mon Sep 17 00:00:00 2001 From: Alex Bespoyasov Date: Fri, 4 Sep 2026 09:22:00 +0200 Subject: [PATCH 1/3] feat: recommend Claude and warn about system access for others --- src/ui/tui/screens/install-plugins/actions.ts | 2 +- .../components/MainContent.tsx | 8 ++++++++ .../onboard-project/OnboardProjectScreen.tsx | 1 + .../components/OnboardingLeftPanel.tsx | 20 ++++++++++++++----- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/ui/tui/screens/install-plugins/actions.ts b/src/ui/tui/screens/install-plugins/actions.ts index e34afc6..2a4f816 100644 --- a/src/ui/tui/screens/install-plugins/actions.ts +++ b/src/ui/tui/screens/install-plugins/actions.ts @@ -2,7 +2,7 @@ import type { IdeId } from '@shared-kernel/types.js'; import type { PromptOption } from '../../components/PromptPanel.js'; export const IDE_SELECT_OPTIONS: PromptOption[] = [ - { label: 'Claude Code', value: 'claude' }, + { label: 'Claude Code (Recommended)', value: 'claude' }, { label: 'Cursor', value: 'cursor' }, { label: 'Codex', value: 'codex' }, ]; diff --git a/src/ui/tui/screens/install-plugins/components/MainContent.tsx b/src/ui/tui/screens/install-plugins/components/MainContent.tsx index 599cee8..a926c0b 100644 --- a/src/ui/tui/screens/install-plugins/components/MainContent.tsx +++ b/src/ui/tui/screens/install-plugins/components/MainContent.tsx @@ -31,6 +31,14 @@ export function MainContent({ phase, detected, error }: MainContentProps) { + {phase === 'choose-ide' && ( + + + {Icons.diamond} For a safer and more controlled experience, we recommend Claude Code. + + + )} + {phase === 'detecting' && } {phase === 'already-installed' && ( diff --git a/src/ui/tui/screens/onboard-project/OnboardProjectScreen.tsx b/src/ui/tui/screens/onboard-project/OnboardProjectScreen.tsx index e8b99ac..9701308 100644 --- a/src/ui/tui/screens/onboard-project/OnboardProjectScreen.tsx +++ b/src/ui/tui/screens/onboard-project/OnboardProjectScreen.tsx @@ -81,6 +81,7 @@ export function OnboardProjectScreen() { statusLines={onboarding.statusLines} error={onboarding.error} goals={session.onboardingGoals} + ide={session.ide} showTips={showTips} tip={tip} /> diff --git a/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx b/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx index dbd76a0..30464c4 100644 --- a/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx +++ b/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx @@ -3,21 +3,19 @@ import { Spinner } from '@inkjs/ui'; import { Colors, Emoji, Icons } from '../../../styles.js'; import { StatusFeed } from '../../../components/StatusFeed.js'; import { TipCard } from '../../../components/TipCard.js'; -import type { OnboardingGoal } from '@shared-kernel/types.js'; +import type { IdeId, OnboardingGoal } from '@shared-kernel/types.js'; import type { OnboardingPhase } from '../useOnboardingProcess.js'; import type { StatusLine } from '../../../lib/status-line.js'; import type { Tip } from '../../../lib/tips.js'; export const MAX_VISIBLE_STATUS = 3; -const SANDBOX_WARNING = - 'The AI agent will be able to run commands, install packages, and modify files in your project.'; - type OnboardingLeftPanelProps = { phase: OnboardingPhase; statusLines: StatusLine[]; error: string | null; goals: OnboardingGoal[]; + ide: IdeId | null; showTips: boolean; tip: Tip; }; @@ -27,6 +25,7 @@ export function OnboardingLeftPanel({ statusLines, error, goals, + ide, showTips, tip, }: OnboardingLeftPanelProps) { @@ -50,7 +49,7 @@ export function OnboardingLeftPanel({ - {Icons.diamond} {SANDBOX_WARNING} + {Icons.diamond} {sandboxWarning(ide)} @@ -97,3 +96,14 @@ const GOAL_STEPS: Record = { function onboardingSteps(goals: OnboardingGoal[]): string[] { return ['add the Confidence SDK', ...goals.flatMap((g) => GOAL_STEPS[g])]; } + +const WARNING_MSG = { + sandbox: + 'The AI agent will be able to run commands, install packages, and modify files in your project.', + relaxed: + 'The AI agent will have to access your entire file system as well as run commands, install packages, and modify files in your project.', +} as const; + +function sandboxWarning(ide: IdeId | null): string { + return ide === 'claude' ? WARNING_MSG.sandbox : WARNING_MSG.relaxed; +} From ec6d63b4abeaf55d313870c5d69c53462d9bf3ea Mon Sep 17 00:00:00 2001 From: Alex Bespoyasov Date: Fri, 4 Sep 2026 09:40:32 +0200 Subject: [PATCH 2/3] feat: make warning about agent access clearer --- .../e2e/__snapshots__/happy-path.e2e.ts.snap | 5 +- .../e2e/__snapshots__/stale-auth.e2e.ts.snap | 15 +++--- .../ui/screens/InstallPluginsScreen.test.tsx | 9 +++- __tests__/ui/screens/OnboardingFlow.test.tsx | 49 +++++++++++++++++++ 4 files changed, 69 insertions(+), 9 deletions(-) diff --git a/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap b/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap index cbc78e9..72bb960 100644 --- a/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap +++ b/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap @@ -77,13 +77,14 @@ exports[`happy-path flow > navigates Welcome → SystemCheck → Authenticate warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ○ Onboard project + ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project + Code. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code + ❯ Claude Code (Recommended) Cursor Codex diff --git a/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap b/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap index e3e1911..1f748b0 100644 --- a/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap +++ b/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap @@ -9,13 +9,14 @@ exports[`when auth token is stale > allows re-authentication after expired token warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ○ Onboard project + ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project + Code. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code + ❯ Claude Code (Recommended) Cursor Codex @@ -31,13 +32,14 @@ exports[`when auth token is stale > allows signing in after failed refresh and p warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ○ Onboard project + ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project + Code. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code + ❯ Claude Code (Recommended) Cursor Codex @@ -93,13 +95,14 @@ exports[`when auth token is stale > refreshes and authenticates when choosing ex warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ○ Onboard project + ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project + Code. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code + ❯ Claude Code (Recommended) Cursor Codex diff --git a/__tests__/ui/screens/InstallPluginsScreen.test.tsx b/__tests__/ui/screens/InstallPluginsScreen.test.tsx index 9a5f5cd..585d18a 100644 --- a/__tests__/ui/screens/InstallPluginsScreen.test.tsx +++ b/__tests__/ui/screens/InstallPluginsScreen.test.tsx @@ -28,12 +28,19 @@ describe('InstallPluginsScreen', () => { it('shows IDE selection when no plugins detected', async () => { using sut = renderScreen(, { screen: ScreenId.InstallPlugins }); await waitFor(() => { - expect(sut.lastFrame()).toContain('Claude Code'); + expect(sut.lastFrame()).toContain('Claude Code (Recommended)'); expect(sut.lastFrame()).toContain('Cursor'); expect(sut.lastFrame()).toContain('Codex'); }); }); + it('shows Claude Code recommendation note during IDE selection', async () => { + using sut = renderScreen(, { screen: ScreenId.InstallPlugins }); + await waitFor(() => { + expect(sut.lastFrame()).toContain('safer and more controlled'); + }); + }); + it('installs plugin and shows success', async () => { using project = createProjectDir(); using sut = renderScreen(, { diff --git a/__tests__/ui/screens/OnboardingFlow.test.tsx b/__tests__/ui/screens/OnboardingFlow.test.tsx index 7050a55..2befd60 100644 --- a/__tests__/ui/screens/OnboardingFlow.test.tsx +++ b/__tests__/ui/screens/OnboardingFlow.test.tsx @@ -227,6 +227,55 @@ describe('Onboarding flow', () => { }); }); + describe('IDE-specific sandbox warning', () => { + it('shows standard warning when IDE is Claude Code', async () => { + using project = createProjectDir(); + + using sut = renderScreen(, { + screen: ScreenId.OnboardProject, + dir: project.path, + ide: 'claude', + goals: ['feature-flags'], + }); + + await waitFor(() => { + const frame = sut.lastFrame()!; + expect(frame).toContain('run commands, install packages'); + expect(frame).not.toContain('entire file system'); + }); + }); + + it('shows elevated warning when IDE is Cursor', async () => { + using project = createProjectDir(); + + using sut = renderScreen(, { + screen: ScreenId.OnboardProject, + dir: project.path, + ide: 'cursor', + goals: ['feature-flags'], + }); + + await waitFor(() => { + expect(sut.lastFrame()).toContain('entire file system'); + }); + }); + + it('shows elevated warning when IDE is Codex', async () => { + using project = createProjectDir(); + + using sut = renderScreen(, { + screen: ScreenId.OnboardProject, + dir: project.path, + ide: 'codex', + goals: ['feature-flags'], + }); + + await waitFor(() => { + expect(sut.lastFrame()).toContain('entire file system'); + }); + }); + }); + describe('selected goal display', () => { it('shows feature flag steps when goal is feature-flags', async () => { using project = createProjectDir(); From af5b1a10d656b0d24b46b9c6babd4f2fe97020e8 Mon Sep 17 00:00:00 2001 From: Alex Bespoyasov Date: Fri, 4 Sep 2026 10:07:16 +0200 Subject: [PATCH 3/3] chore: update phrasing --- .../e2e/__snapshots__/happy-path.e2e.ts.snap | 6 +++--- .../e2e/__snapshots__/stale-auth.e2e.ts.snap | 18 +++++++++--------- .../ui/screens/InstallPluginsScreen.test.tsx | 6 +++--- src/ui/tui/screens/install-plugins/actions.ts | 2 +- .../install-plugins/components/MainContent.tsx | 2 +- .../components/OnboardingLeftPanel.tsx | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap b/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap index 72bb960..413222a 100644 --- a/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap +++ b/__tests__/e2e/__snapshots__/happy-path.e2e.ts.snap @@ -77,14 +77,14 @@ exports[`happy-path flow > navigates Welcome → SystemCheck → Authenticate warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project - Code. + ◆ Cursor and Codex require full file system access to run ○ Onboard project + onboarding. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code (Recommended) + ❯ Claude Code Cursor Codex diff --git a/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap b/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap index 1f748b0..2f64f2e 100644 --- a/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap +++ b/__tests__/e2e/__snapshots__/stale-auth.e2e.ts.snap @@ -9,14 +9,14 @@ exports[`when auth token is stale > allows re-authentication after expired token warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project - Code. + ◆ Cursor and Codex require full file system access to run ○ Onboard project + onboarding. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code (Recommended) + ❯ Claude Code Cursor Codex @@ -32,14 +32,14 @@ exports[`when auth token is stale > allows signing in after failed refresh and p warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project - Code. + ◆ Cursor and Codex require full file system access to run ○ Onboard project + onboarding. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code (Recommended) + ❯ Claude Code Cursor Codex @@ -95,14 +95,14 @@ exports[`when auth token is stale > refreshes and authenticates when choosing ex warehouse setup, migrations, and onboarding — so it can help ● Sign in to Confidence without searching the docs. ▶ Set up your agent ○ Connect tools - ◆ For a safer and more controlled experience, we recommend Claude ○ Onboard project - Code. + ◆ Cursor and Codex require full file system access to run ○ Onboard project + onboarding. ────────────────────────────────────────────────────────────────────────────────────────────────── Which CLI agent would you like to use? - ❯ Claude Code (Recommended) + ❯ Claude Code Cursor Codex diff --git a/__tests__/ui/screens/InstallPluginsScreen.test.tsx b/__tests__/ui/screens/InstallPluginsScreen.test.tsx index 585d18a..d4387f0 100644 --- a/__tests__/ui/screens/InstallPluginsScreen.test.tsx +++ b/__tests__/ui/screens/InstallPluginsScreen.test.tsx @@ -28,16 +28,16 @@ describe('InstallPluginsScreen', () => { it('shows IDE selection when no plugins detected', async () => { using sut = renderScreen(, { screen: ScreenId.InstallPlugins }); await waitFor(() => { - expect(sut.lastFrame()).toContain('Claude Code (Recommended)'); + expect(sut.lastFrame()).toContain('Claude Code'); expect(sut.lastFrame()).toContain('Cursor'); expect(sut.lastFrame()).toContain('Codex'); }); }); - it('shows Claude Code recommendation note during IDE selection', async () => { + it('shows file system access warning during IDE selection', async () => { using sut = renderScreen(, { screen: ScreenId.InstallPlugins }); await waitFor(() => { - expect(sut.lastFrame()).toContain('safer and more controlled'); + expect(sut.lastFrame()).toContain('full file system access'); }); }); diff --git a/src/ui/tui/screens/install-plugins/actions.ts b/src/ui/tui/screens/install-plugins/actions.ts index 2a4f816..e34afc6 100644 --- a/src/ui/tui/screens/install-plugins/actions.ts +++ b/src/ui/tui/screens/install-plugins/actions.ts @@ -2,7 +2,7 @@ import type { IdeId } from '@shared-kernel/types.js'; import type { PromptOption } from '../../components/PromptPanel.js'; export const IDE_SELECT_OPTIONS: PromptOption[] = [ - { label: 'Claude Code (Recommended)', value: 'claude' }, + { label: 'Claude Code', value: 'claude' }, { label: 'Cursor', value: 'cursor' }, { label: 'Codex', value: 'codex' }, ]; diff --git a/src/ui/tui/screens/install-plugins/components/MainContent.tsx b/src/ui/tui/screens/install-plugins/components/MainContent.tsx index a926c0b..474f95a 100644 --- a/src/ui/tui/screens/install-plugins/components/MainContent.tsx +++ b/src/ui/tui/screens/install-plugins/components/MainContent.tsx @@ -34,7 +34,7 @@ export function MainContent({ phase, detected, error }: MainContentProps) { {phase === 'choose-ide' && ( - {Icons.diamond} For a safer and more controlled experience, we recommend Claude Code. + {Icons.diamond} Cursor and Codex require full file system access to run onboarding. )} diff --git a/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx b/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx index 30464c4..70369a1 100644 --- a/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx +++ b/src/ui/tui/screens/onboard-project/components/OnboardingLeftPanel.tsx @@ -101,7 +101,7 @@ const WARNING_MSG = { sandbox: 'The AI agent will be able to run commands, install packages, and modify files in your project.', relaxed: - 'The AI agent will have to access your entire file system as well as run commands, install packages, and modify files in your project.', + 'The AI agent will have access to your entire file system as well as run commands and install packages in your project.', } as const; function sandboxWarning(ide: IdeId | null): string {