diff --git a/web/lib/flow-onboarding.ts b/web/lib/flow-onboarding.ts index a23043e9..66f1dfaf 100644 --- a/web/lib/flow-onboarding.ts +++ b/web/lib/flow-onboarding.ts @@ -69,13 +69,14 @@ export function readFactoryDraft(raw: string | null): FactoryDraft | null { export function cloudConnectionsHref(draft: FactoryDraft, handoffId: string, journeyId?: string): string { if (!canContinue(draft, 2)) throw new Error('Choose a workflow before continuing to Cloud.'); - // The fragment is read only by Cloud's browser handoff page. Source code and - // ticket filters must not enter OAuth state, cookies, or server access logs. + // The fragment is read only by Cloud's browser deploy page, which keeps it in + // localStorage across Google sign-in. Source code and ticket filters must not + // enter OAuth state, cookies, or server access logs. const payload = { version: 1, handoffId, ...(journeyId ? { analytics: { journeyId } } : {}), name: 'Software factory', source: factorySource({ ...draft, step: 3 }), workflow: draft.workflow, sources: draft.sources, sourceSettings: draft.sourceSettings, agents: draft.agents, otherAgent: draft.otherAgent, otherAgentSelected: otherAgentIsSelected(draft), task: draft.task }; const base = process.env.NEXT_PUBLIC_CLOUD_URL || 'https://agentrelay.com/cloud'; - return `${base.replace(/\/$/, '')}/flows/import#${encodeURIComponent(JSON.stringify(payload))}`; + return `${base.replace(/\/$/, '')}/flows/deploy#${encodeURIComponent(JSON.stringify(payload))}`; } export function factoryCodeSections(draft: FactoryDraft, target: 'cloud' | 'local' = 'cloud') { diff --git a/web/lib/test/flow-onboarding.test.ts b/web/lib/test/flow-onboarding.test.ts index a6f5d345..68d2cef2 100644 --- a/web/lib/test/flow-onboarding.test.ts +++ b/web/lib/test/flow-onboarding.test.ts @@ -162,7 +162,7 @@ describe('software factory onboarding', () => { const draft: FactoryDraft = { ...DEFAULT_FACTORY, sources: ['github'], sourceSettings: { github: { repository: 'org/repo', labels: 'ready' } }, agents: ['codex'], task: 'Keep naïve input & labels', workflow: 'traditional', step: 3 }; const url = new URL(cloudConnectionsHref(draft, '00000000-0000-4000-8000-000000000001')); expect(url.origin).toBe('https://agentrelay.com'); - expect(url.pathname).toBe('/cloud/flows/import'); + expect(url.pathname).toBe('/cloud/flows/deploy'); expect(url.search).toBe(''); const payload = JSON.parse(decodeURIComponent(url.hash.slice(1))); expect(payload.source).toBe(factorySource(draft));