diff --git a/src/renderer/src/components/new-workspace/NewWorkspaceComposerFooter.tsx b/src/renderer/src/components/new-workspace/NewWorkspaceComposerFooter.tsx
index c005d38a729..1bc6b24bab0 100644
--- a/src/renderer/src/components/new-workspace/NewWorkspaceComposerFooter.tsx
+++ b/src/renderer/src/components/new-workspace/NewWorkspaceComposerFooter.tsx
@@ -2,7 +2,6 @@ import React from 'react'
import { LoaderCircle } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { SwitchIndicator } from '@/components/ui/switch'
-import { cn } from '@/lib/utils'
import { useTranslate } from '@/i18n/use-translate'
import { ButtonKeyHint } from '@/components/ButtonKeyHint'
import type { NewWorkspaceComposerCardProps } from './new-workspace-composer-card-props'
@@ -57,12 +56,9 @@ export function NewWorkspaceComposerFooter({
) : null}
-
+ {/* Wraps instead of overflowing: "Use this computer instead" plus a long primary label
+ ("Give access and start") don't fit beside "Create more" in the modal's width. */}
+
{step.state === 'loading' ? (
- ) : (step.detail ?? copy.detail) ? (
-
- {step.detail ?? copy.detail}
-
+ ) : detail ? (
+ {detail}
) : null}
{note ? (
{note}
diff --git a/src/renderer/src/components/new-workspace/run-on/cloud-start-model.test.ts b/src/renderer/src/components/new-workspace/run-on/cloud-start-model.test.ts
index fb27f03f3be..d5d4fe9bada 100644
--- a/src/renderer/src/components/new-workspace/run-on/cloud-start-model.test.ts
+++ b/src/renderer/src/components/new-workspace/run-on/cloud-start-model.test.ts
@@ -1,5 +1,6 @@
import { describe, expect, it } from 'vitest'
import {
+ cloudSetupNeedsGitHub,
deriveCloudSetupSteps,
getCloudPrimaryAction,
getOrcaCloudSegmentState,
@@ -273,3 +274,15 @@ describe('withReachableGitHub', () => {
expect(withReachableGitHub(steps, false)).toBe(steps)
})
})
+
+describe('cloudSetupNeedsGitHub', () => {
+ it('counts GitHub access the browser visit gives, not an approval, a missing remote or a check', () => {
+ expect(cloudSetupNeedsGitHub([{ id: 'github', state: 'needed', need: 'github' }])).toBe(true)
+ expect(cloudSetupNeedsGitHub([{ id: 'github', state: 'active' }])).toBe(true)
+ expect(cloudSetupNeedsGitHub([{ id: 'github', state: 'done' }])).toBe(false)
+ expect(cloudSetupNeedsGitHub([{ id: 'github', state: 'loading' }])).toBe(false)
+ expect(
+ cloudSetupNeedsGitHub([{ id: 'github', state: 'pending', need: 'github', blocksStart: true }])
+ ).toBe(false)
+ })
+})
diff --git a/src/renderer/src/components/new-workspace/run-on/cloud-start-model.ts b/src/renderer/src/components/new-workspace/run-on/cloud-start-model.ts
index a257c9ebebd..4ea27621248 100644
--- a/src/renderer/src/components/new-workspace/run-on/cloud-start-model.ts
+++ b/src/renderer/src/components/new-workspace/run-on/cloud-start-model.ts
@@ -191,6 +191,16 @@ export function cloudSetupNeedsPlan(steps: readonly CloudSetupStep[]): boolean {
)
}
+/**
+ * The same browser trip also gives Orca Cloud access to the repository on GitHub. An owner's
+ * approval (D2) or a project not on GitHub (D3) isn't part of the trip; still checking isn't either.
+ */
+export function cloudSetupNeedsGitHub(steps: readonly CloudSetupStep[]): boolean {
+ return getOpenSetupSteps(steps).some(
+ (step) => step.id === 'github' && !step.blocksStart && step.state !== 'loading'
+ )
+}
+
export type CloudPrimaryAction =
| 'start'
| 'setUpAndStart'
@@ -273,7 +283,7 @@ export function withReachableGitHub(
if (!reachable || !steps.some((step) => step.id === 'github' && step.state !== 'done')) {
return steps
}
- return steps.map(
- (step): CloudSetupStep => (step.id === 'github' ? { id: 'github', state: 'done' } : step)
+ return steps.map((step): CloudSetupStep =>
+ step.id === 'github' ? { id: 'github', state: 'done' } : step
)
}
diff --git a/src/renderer/src/components/new-workspace/run-on/cloud-start-preview-fixture.tsx b/src/renderer/src/components/new-workspace/run-on/cloud-start-preview-fixture.tsx
index 4c696b407ce..15445595c82 100644
--- a/src/renderer/src/components/new-workspace/run-on/cloud-start-preview-fixture.tsx
+++ b/src/renderer/src/components/new-workspace/run-on/cloud-start-preview-fixture.tsx
@@ -80,7 +80,9 @@ export function ComposerPreview({
prompt = 'Fix the flaky login test in e2e/auth.spec.ts and open a PR.',
cloudRepos,
pickedCloudRepo = null,
- folderProject = false
+ folderProject = false,
+ showCreateMultiple = false,
+ width
}: {
availability: OrcaCloudAvailability
access: OrcaCloudRunTargetAccess
@@ -95,6 +97,10 @@ export function ComposerPreview({
pickedCloudRepo?: string | null
/** The project is a plain folder (D3 for folders). */
folderProject?: boolean
+ /** The modal's "Create more" switch, which shares the footer row with the actions. */
+ showCreateMultiple?: boolean
+ /** Pins the card's width, e.g. the modal's content width. */
+ width?: number
}): React.JSX.Element {
const [picked, setPicked] = useState(pickedCloudRepo)
const [host, setHost] = useState('local')
@@ -135,7 +141,10 @@ export function ComposerPreview({
: {})
}
return (
-
+
Create workspace
{prompt}
)
diff --git a/src/renderer/src/components/new-workspace/run-on/use-cloud-start-steps.ts b/src/renderer/src/components/new-workspace/run-on/use-cloud-start-steps.ts
index d023a9876b6..23aadd91bce 100644
--- a/src/renderer/src/components/new-workspace/run-on/use-cloud-start-steps.ts
+++ b/src/renderer/src/components/new-workspace/run-on/use-cloud-start-steps.ts
@@ -8,7 +8,11 @@ import { useOrcaCloudRepoAccess } from '@/lib/orca-cloud/use-orca-cloud-repo-acc
import { useCloudSetupSession } from '@/lib/orca-cloud/cloud-setup-session-seam'
import type { OrcaCloudAvailability } from '../../../../../shared/orca-yaml-hook-types'
import type { OrcaCloudRunTargetAccess } from '../orca-cloud-run-target-access'
-import { deriveCloudSetupSteps, withReachableGitHub, type CloudSetupStep } from './cloud-start-model'
+import {
+ deriveCloudSetupSteps,
+ withReachableGitHub,
+ type CloudSetupStep
+} from './cloud-start-model'
import { cloudStartAgentStep } from './cloud-start-agent-step'
import {
orcaCloudAgentSetupRow,
diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json
index 99611446974..aba2658d8ea 100644
--- a/src/renderer/src/i18n/locales/en.json
+++ b/src/renderer/src/i18n/locales/en.json
@@ -23161,7 +23161,11 @@
"teamCreateFailed": "Couldn’t create the team. Nothing was created, and you weren’t charged.",
"wrongAccount": "Signed in as {{email}}, who isn’t on {{team}}. Switch accounts or ask an owner of {{team}} for an invite.",
"wrongAccountGeneric": "Signed in with an account that isn’t on this team. Switch accounts or ask an owner for an invite."
- }
+ },
+ "planCoveredByTrial": "Your trial covers it.",
+ "planCheckoutOpen": "Finish checkout in your browser.",
+ "githubRequestedSession": "Waiting for an owner on GitHub to approve Orca Cloud.",
+ "subtitleChoosePlanAndGitHub": "One visit to your browser to choose a plan and give Orca Cloud access on GitHub. Your prompt stays here and starts when you’re done."
},
"runOn": {
"thisComputer": "This computer",