mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
chore(cloud): dev hook to walk the setup page; GitHub step names the repository
This commit is contained in:
@@ -32,7 +32,7 @@ function reopenComposer(request: CloudSetupPageRequest, autoStart: boolean): voi
|
||||
|
||||
function ActiveCloudSetupPage({ request }: { request: CloudSetupPageRequest }): React.JSX.Element {
|
||||
const t = useTranslate()
|
||||
const flow = useCloudSetupFlow(request)
|
||||
const flow = useCloudSetupFlow(request, request.debugAccess)
|
||||
const projectName = useAppStore(
|
||||
(s) => s.repos.find((repo) => repo.id === request.repoId)?.displayName ?? null
|
||||
)
|
||||
|
||||
@@ -115,11 +115,12 @@ export function currentStepCopy(
|
||||
case 'github-install':
|
||||
return {
|
||||
title: t('cloudSetupPage.github.title', 'Give Orca Cloud access on GitHub'),
|
||||
lead: t(
|
||||
// The row names the repository ("Orca Cloud can't reach acme/web yet").
|
||||
lead: detail,
|
||||
note: t(
|
||||
'cloudSetupPage.github.lead',
|
||||
'Orca Cloud clones your code from GitHub. Install the Orca Cloud app on this repository once.'
|
||||
),
|
||||
note: step?.note ?? null
|
||||
)
|
||||
}
|
||||
case 'github-waiting':
|
||||
return {
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
import { useSyncExternalStore } from 'react'
|
||||
import type { OrcaCloudAvailability } from '../../../../shared/orca-yaml-hook-types'
|
||||
import type { ComposerModalData } from '@/components/new-workspace/composer-modal-data'
|
||||
import type { OrcaCloudRunTargetAccess } from '@/components/new-workspace/orca-cloud-run-target-access'
|
||||
import { e2eConfig } from '@/lib/e2e-config'
|
||||
|
||||
export type CloudSetupPageRequest = {
|
||||
prompt: string
|
||||
@@ -15,6 +17,11 @@ export type CloudSetupPageRequest = {
|
||||
cloudOnlyRepo: string | null
|
||||
/** The composer as it was: Back and the auto-start reopen it with everything kept. */
|
||||
composer: ComposerModalData
|
||||
/**
|
||||
* Dev and e2e only: pins the account's billing answer so every step can be walked against the
|
||||
* real page (dev sign-in has no billing). Never set by the app.
|
||||
*/
|
||||
debugAccess?: OrcaCloudRunTargetAccess
|
||||
openedAt: number
|
||||
}
|
||||
|
||||
@@ -78,3 +85,12 @@ export function rememberCloudSetupAgentSkipped(agent: string | null): void {
|
||||
// Private mode: the step asks again next time.
|
||||
}
|
||||
}
|
||||
|
||||
// Dev and e2e: drive the page from the console or CDP (as `__store` is), e.g. to walk the trial step.
|
||||
if ((import.meta.env.DEV || e2eConfig.exposeStore) && typeof window !== 'undefined') {
|
||||
;(window as unknown as Record<string, unknown>).__cloudSetupPage = {
|
||||
open: openCloudSetupPage,
|
||||
close: closeCloudSetupPage,
|
||||
get: getCloudSetupPageRequest
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user