From 7e8ec6eb9d993ca1e0d2a8b9f7f01480d75da5e4 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Mon, 18 May 2026 18:25:59 -0700 Subject: [PATCH 1/6] Show required and optional badges in git step --- .../components/GitIntegrationStep.tsx | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx b/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx index e1d5fa7f7..dd6374f42 100644 --- a/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx +++ b/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx @@ -26,6 +26,7 @@ import { } from "@phosphor-icons/react"; import { AlertDialog, + Badge, Box, Button, DropdownMenu, @@ -206,7 +207,7 @@ export function GitIntegrationStep({ Give your agents access to code - Point to a local codebase and optionally connect GitHub. + Select a folder to continue. Connecting GitHub is optional. @@ -227,11 +228,18 @@ export function GitIntegrationStep({ > - - - - Choose your codebase - + + + + + Choose your codebase + + + {selectedDirectory ? ( + Selected + ) : ( + Required + )} Select the local folder for your project so we can @@ -334,7 +342,7 @@ export function GitIntegrationStep({ className="rounded-[12px] border border-(--gray-a3) bg-(--color-panel-solid)" > - + @@ -362,7 +370,9 @@ export function GitIntegrationStep({ ) - ) : null} + ) : ( + Optional + )} {hasGitIntegration ? ( @@ -522,7 +532,7 @@ export function GitIntegrationStep({ {selectedProject.name} - . Sign in with one click to link your account — no + . Sign in with one click to link your account, no admin approval needed. + ) : ( + + + + + + {folderDisplayValue || "Select repository..."} + + + + + } + /> + + Recent + {recentFolders.map((folder) => ( + handleFolderSelect(folder.path)} + > + + + {folder.name} + + + ))} + + + + + Open folder... + + + + + )} {isDetectingRepo && ( {/* GitHub integration */} - - - - - - - - Connect GitHub - - - {isLoading || githubUserIntegrationsLoading ? ( - - ) : hasGitIntegration ? ( - anyIntegrationStale ? ( - - Reconnect needed - - ) : ( - - - - {githubUserIntegrations.length > 1 - ? `Connected (${githubUserIntegrations.length})` - : "Connected"} - - - ) - ) : ( - Optional - )} - - {hasGitIntegration ? ( - - {githubUserIntegrations.map((integration) => { - const installationId = integration.installation_id; - const accountName = - integration.account?.name ?? "GitHub"; - const installRepos = - reposByInstallationId[installationId]; - const isLoadingInstallRepos = - installRepos === undefined; - const isStale = - failedInstallationIds.includes(installationId); - const isReconnecting = - reconnectingInstallationId === installationId; - return ( - - - - - {accountName} - - - {integration.account?.type === - "Organization" - ? "org" - : "personal"} + + {selectedDirectory && ( + + + + + + + + + Connect GitHub + + + {isLoading || githubUserIntegrationsLoading ? ( + + ) : hasGitIntegration ? ( + anyIntegrationStale ? ( + + Reconnect needed + + ) : ( + + + + {githubUserIntegrations.length > 1 + ? `Connected (${githubUserIntegrations.length})` + : "Connected"} - {isStale ? ( - - Reconnect needed - + ) + ) : ( + + Optional + + )} + + {!hasGitIntegration && + !isLoading && + !githubUserIntegrationsLoading && + (selectedProject?.hasGithubIntegration && + canTakeAction ? ( + + GitHub is already set up on{" "} + + {selectedProject.name} + + . Sign in with one click to link your account, + no admin approval needed. + + ) : selectedAlternative && + selectedProject && + canTakeAction ? ( + + GitHub is already connected on{" "} + {alternativeConnectedProjects.length > 1 ? ( + + + + + + {alternativeConnectedProjects.map((p) => ( + + setSelectedAlternativeId(p.id) + } + > + + {p.name} + + + {p.organization.name} + + + ))} + + ) : ( - - {isLoadingInstallRepos - ? "Loading…" - : installRepos.length === 1 - ? "1 repo" - : `${installRepos.length} repos`} - + <> + + {selectedAlternative.name} + {" "} + ({selectedAlternative.organization.name}) + )} - - - {isStale && ( - - )} - - - - - ); - })} - - - - - - ) : !isLoading && !githubUserIntegrationsLoading ? ( - selectedProject?.hasGithubIntegration && canTakeAction ? ( - - - GitHub is already set up on{" "} - - {selectedProject.name} - - . Sign in with one click to link your account, no - admin approval needed. - - + . + + ) : ( + + {defaultPanelMessage} + + ))} - ) : selectedAlternative && - selectedProject && - canTakeAction ? ( - - - GitHub is already connected on{" "} - {alternativeConnectedProjects.length > 1 ? ( - - - - - - {alternativeConnectedProjects.map((p) => ( - - setSelectedAlternativeId(p.id) - } - > - - {p.name} + + + {accountName} - - {p.organization.name} + + {integration.account?.type === + "Organization" + ? "org" + : "personal"} - - ))} - - - ) : ( - <> - - {selectedAlternative.name} - {" "} - ({selectedAlternative.organization.name}) - - )} - . - - + + {isStale ? ( + + Reconnect needed + + ) : ( + + {isLoadingInstallRepos + ? "Loading…" + : installRepos.length === 1 + ? "1 repo" + : `${installRepos.length} repos`} + + )} + + + {isStale && ( + + )} + + + + + ); + })} + + + + + + ) : !isLoading && !githubUserIntegrationsLoading ? ( + selectedProject?.hasGithubIntegration && + canTakeAction ? ( - - - - ) : ( - - - {defaultPanelMessage} - - - - {hasConnectError && ( + ) : selectedAlternative && + selectedProject && + canTakeAction ? ( + + - )} - - - ) - ) : null} - - - + + ) : ( + + + {hasConnectError && ( + + )} + + ) + ) : null} + + + + )} + {/* Hog tip */} From 443b86ee6c845ae4732a7638d6dfebd7ed74c7ed Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Tue, 19 May 2026 14:28:01 -0700 Subject: [PATCH 3/6] consolidate folder picker into field variant --- .../folder-picker/components/FolderPicker.tsx | 103 ++- .../components/GitIntegrationStep.tsx | 762 ++++++++---------- .../sections/WorkspacesSettings.tsx | 1 - .../task-detail/components/TaskInput.tsx | 1 - .../components/WorkspaceSetupPrompt.tsx | 1 - 5 files changed, 389 insertions(+), 479 deletions(-) diff --git a/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx b/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx index 174f01017..27f60c3fa 100644 --- a/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx +++ b/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx @@ -14,21 +14,64 @@ import { DropdownMenuTrigger, MenuLabel, } from "@posthog/quill"; +import { Flex, Text } from "@radix-ui/themes"; import { trpcClient } from "@renderer/trpc"; +import { logger } from "@utils/logger"; import type { RefObject } from "react"; +const log = logger.scope("folder-picker"); + +const FIELD_TRIGGER_CLASS = + "box-border flex w-full cursor-pointer appearance-none items-center justify-between gap-3 rounded-[10px] border border-(--gray-a3) bg-(--color-panel-solid) px-[14px] py-[10px] font-[inherit] text-sm shadow-[0_1px_3px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.02)]"; + interface FolderPickerProps { value: string; onChange: (path: string) => void; placeholder?: string; - size?: "1" | "2"; + variant?: "compact" | "field"; anchor?: RefObject; } +interface TriggerProps { + displayValue: string | null; + placeholder: string; + onClick?: () => void; +} + +function CompactTrigger({ displayValue, placeholder, onClick }: TriggerProps) { + return ( + + ); +} + +function FieldTrigger({ displayValue, placeholder, onClick }: TriggerProps) { + return ( + + ); +} + export function FolderPicker({ value, onChange, placeholder = "Select folder...", + variant = "compact", anchor, }: FolderPickerProps) { const { @@ -42,31 +85,32 @@ export function FolderPicker({ const recentFolders = getRecentFolders(); const displayValue = getFolderDisplayName(value); - const handleSelect = async (path: string) => { + const handleSelect = (path: string) => { onChange(path); const folder = getFolderByPath(path); - if (folder) { - updateLastAccessed(folder.id); - } + if (folder) updateLastAccessed(folder.id); }; const handleOpenFilePicker = async () => { - const selectedPath = await trpcClient.os.selectDirectory.query(); - if (selectedPath) { + try { + const selectedPath = await trpcClient.os.selectDirectory.query(); + if (!selectedPath) return; await addFolder(selectedPath); onChange(selectedPath); + } catch (error) { + log.error("Failed to open folder picker", { error }); } }; + const Trigger = variant === "field" ? FieldTrigger : CompactTrigger; + if (recentFolders.length === 0) { return ( - + ); } @@ -74,42 +118,35 @@ export function FolderPicker({ - - - {displayValue || placeholder} - - - + } /> Recent - {recentFolders.map((folder) => ( handleSelect(folder.path)} > - - {folder.name} + + + {folder.name} + ))} - - - + Open folder... diff --git a/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx b/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx index 8c37478de..518e945ff 100644 --- a/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx +++ b/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx @@ -1,7 +1,7 @@ import { useOptionalAuthenticatedClient } from "@features/auth/hooks/authClient"; import { useSelectProjectMutation } from "@features/auth/hooks/authMutations"; import { useAuthStateValue } from "@features/auth/hooks/authQueries"; -import { useFolders } from "@features/folders/hooks/useFolders"; +import { FolderPicker } from "@features/folder-picker/components/FolderPicker"; import { describeGithubConnectError, invalidateGithubQueries, @@ -17,23 +17,13 @@ import { ArrowRight, ArrowSquareOut, ArrowsClockwise, - CaretDown, CheckCircle, CircleNotch, - Folder as FolderIcon, FolderOpen, GearSix, GitBranch, Plus, } from "@phosphor-icons/react"; -import { - DropdownMenu as QuillDropdownMenu, - DropdownMenuContent as QuillDropdownMenuContent, - DropdownMenuItem as QuillDropdownMenuItem, - DropdownMenuSeparator as QuillDropdownMenuSeparator, - DropdownMenuTrigger as QuillDropdownMenuTrigger, - MenuLabel as QuillMenuLabel, -} from "@posthog/quill"; import { AlertDialog, Box, @@ -48,7 +38,7 @@ import builderHog from "@renderer/assets/images/hedgehogs/builder-hog-03.png"; import { trpcClient } from "@renderer/trpc/client"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { AnimatePresence, motion } from "framer-motion"; -import { useMemo, useRef, useState } from "react"; +import { useMemo, useState } from "react"; import { toast } from "sonner"; import type { DetectedRepo } from "../hooks/useOnboardingFlow"; import { useProjectsWithIntegrations } from "../hooks/useProjectsWithIntegrations"; @@ -64,9 +54,6 @@ interface GitIntegrationStepProps { onDirectoryChange: (path: string) => void; } -const FOLDER_TRIGGER_CLASS = - "box-border flex w-full cursor-pointer appearance-none items-center justify-between gap-3 rounded-[10px] border border-(--gray-a3) bg-(--color-panel-solid) px-[14px] py-[10px] font-[inherit] text-sm shadow-[0_1px_3px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.02)]"; - export function GitIntegrationStep({ onNext, onBack, @@ -78,31 +65,6 @@ export function GitIntegrationStep({ const currentProjectId = useAuthStateValue((state) => state.projectId); const selectProjectMutation = useSelectProjectMutation(); - const { - getRecentFolders, - getFolderDisplayName, - addFolder, - updateLastAccessed, - getFolderByPath, - } = useFolders(); - const recentFolders = getRecentFolders(); - const folderDisplayValue = getFolderDisplayName(selectedDirectory); - const folderAnchorRef = useRef(null); - - const handleFolderSelect = (path: string) => { - onDirectoryChange(path); - const folder = getFolderByPath(path); - if (folder) updateLastAccessed(folder.id); - }; - - const handleOpenFilePicker = async () => { - const path = await trpcClient.os.selectDirectory.query(); - if (path) { - await addFolder(path); - onDirectoryChange(path); - } - }; - const queryClient = useQueryClient(); const { projects, projectsWithGithub, isLoading } = useProjectsWithIntegrations(); @@ -277,85 +239,12 @@ export function GitIntegrationStep({ that contains multiple repos. - {recentFolders.length === 0 ? ( - - ) : ( - - - - - - {folderDisplayValue || "Select repository..."} - - - - - } - /> - - Recent - {recentFolders.map((folder) => ( - handleFolderSelect(folder.path)} - > - - - {folder.name} - - - ))} - - - - - Open folder... - - - - - )} + {isDetectingRepo && ( {/* GitHub integration */} - - {selectedDirectory && ( - + - - - - - - - - Connect GitHub + + + + + + + Connect GitHub + + + {isLoading || githubUserIntegrationsLoading ? ( + + ) : hasGitIntegration ? ( + anyIntegrationStale ? ( + + Reconnect needed - - {isLoading || githubUserIntegrationsLoading ? ( - - ) : hasGitIntegration ? ( - anyIntegrationStale ? ( - - Reconnect needed - - ) : ( - - - - {githubUserIntegrations.length > 1 - ? `Connected (${githubUserIntegrations.length})` - : "Connected"} - - - ) ) : ( - - Optional - - )} - - {!hasGitIntegration && - !isLoading && - !githubUserIntegrationsLoading && - (selectedProject?.hasGithubIntegration && - canTakeAction ? ( - - GitHub is already set up on{" "} - - {selectedProject.name} + + + + {githubUserIntegrations.length > 1 + ? `Connected (${githubUserIntegrations.length})` + : "Connected"} - . Sign in with one click to link your account, - no admin approval needed. + + ) + ) : ( + + Optional + + )} + + {!hasGitIntegration && + !isLoading && + !githubUserIntegrationsLoading && + (selectedProject?.hasGithubIntegration && + canTakeAction ? ( + + GitHub is already set up on{" "} + + {selectedProject.name} - ) : selectedAlternative && - selectedProject && - canTakeAction ? ( - - GitHub is already connected on{" "} - {alternativeConnectedProjects.length > 1 ? ( - - - - - + ) : selectedAlternative && + selectedProject && + canTakeAction ? ( + + GitHub is already connected on{" "} + {alternativeConnectedProjects.length > 1 ? ( + + + - )} - + {isStale ? ( + + Reconnect needed + + ) : ( + + {isLoadingInstallRepos + ? "Loading…" + : installRepos.length === 1 + ? "1 repo" + : `${installRepos.length} repos`} + + )} + + + {isStale && ( - + )} + + - ); - })} - - - - + + ); + })} + + + - ) : !isLoading && !githubUserIntegrationsLoading ? ( - selectedProject?.hasGithubIntegration && + + ) : !isLoading && !githubUserIntegrationsLoading ? ( + selectedProject?.hasGithubIntegration && + canTakeAction ? ( + + ) : selectedAlternative && + selectedProject && canTakeAction ? ( + - ) : selectedAlternative && - selectedProject && - canTakeAction ? ( - + + + ) : ( + + + {hasConnectError && ( - - - ) : ( - - - {hasConnectError && ( - - )} - - ) - ) : null} - - - - )} - + )} + + ) + ) : null} + + + + )} {/* Hog tip */} diff --git a/apps/code/src/renderer/features/settings/components/sections/WorkspacesSettings.tsx b/apps/code/src/renderer/features/settings/components/sections/WorkspacesSettings.tsx index 4cc3ebe97..ebf541508 100644 --- a/apps/code/src/renderer/features/settings/components/sections/WorkspacesSettings.tsx +++ b/apps/code/src/renderer/features/settings/components/sections/WorkspacesSettings.tsx @@ -50,7 +50,6 @@ export function WorkspacesSettings() { value={localWorktreeLocation} onChange={handleWorktreeLocationChange} placeholder="~/.posthog-code" - size="1" /> diff --git a/apps/code/src/renderer/features/task-detail/components/TaskInput.tsx b/apps/code/src/renderer/features/task-detail/components/TaskInput.tsx index 0f7e3b571..7ad1a289a 100644 --- a/apps/code/src/renderer/features/task-detail/components/TaskInput.tsx +++ b/apps/code/src/renderer/features/task-detail/components/TaskInput.tsx @@ -681,7 +681,6 @@ export function TaskInput({ value={selectedDirectory} onChange={setSelectedDirectory} placeholder="Select repository..." - size="1" anchor={buttonGroupRef} /> )} diff --git a/apps/code/src/renderer/features/task-detail/components/WorkspaceSetupPrompt.tsx b/apps/code/src/renderer/features/task-detail/components/WorkspaceSetupPrompt.tsx index c899baf3e..a5c6e5098 100644 --- a/apps/code/src/renderer/features/task-detail/components/WorkspaceSetupPrompt.tsx +++ b/apps/code/src/renderer/features/task-detail/components/WorkspaceSetupPrompt.tsx @@ -139,7 +139,6 @@ export function WorkspaceSetupPrompt({ value={selectedPath} onChange={handleFolderSelect} placeholder="Select folder..." - size="2" /> From 8ac441c4f8235ff698f0d54ccfbdbe438b1af13a Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Tue, 19 May 2026 15:05:46 -0700 Subject: [PATCH 4/6] fix folder picker ref forwarding and dedupe field trigger styles --- .../folder-picker/components/FolderPicker.tsx | 45 ++++++++++++---- .../components/ProjectSelectStep.tsx | 51 +++++-------------- apps/code/src/renderer/styles/fieldTrigger.ts | 5 ++ 3 files changed, 51 insertions(+), 50 deletions(-) create mode 100644 apps/code/src/renderer/styles/fieldTrigger.ts diff --git a/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx b/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx index 27f60c3fa..7d2890b11 100644 --- a/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx +++ b/apps/code/src/renderer/features/folder-picker/components/FolderPicker.tsx @@ -15,15 +15,13 @@ import { MenuLabel, } from "@posthog/quill"; import { Flex, Text } from "@radix-ui/themes"; +import { FIELD_TRIGGER_CLASS } from "@renderer/styles/fieldTrigger"; import { trpcClient } from "@renderer/trpc"; import { logger } from "@utils/logger"; -import type { RefObject } from "react"; +import type { Ref, RefObject } from "react"; const log = logger.scope("folder-picker"); -const FIELD_TRIGGER_CLASS = - "box-border flex w-full cursor-pointer appearance-none items-center justify-between gap-3 rounded-[10px] border border-(--gray-a3) bg-(--color-panel-solid) px-[14px] py-[10px] font-[inherit] text-sm shadow-[0_1px_3px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.02)]"; - interface FolderPickerProps { value: string; onChange: (path: string) => void; @@ -33,14 +31,26 @@ interface FolderPickerProps { } interface TriggerProps { + ref?: Ref; displayValue: string | null; placeholder: string; onClick?: () => void; } -function CompactTrigger({ displayValue, placeholder, onClick }: TriggerProps) { +function CompactTrigger({ + ref, + displayValue, + placeholder, + onClick, +}: TriggerProps) { return ( - - ); -} - -function FieldTrigger({ - ref, - displayValue, - placeholder, - onClick, -}: TriggerProps) { - return ( - - ); -} - export function FolderPicker({ value, onChange, @@ -104,6 +47,7 @@ export function FolderPicker({ const recentFolders = getRecentFolders(); const displayValue = getFolderDisplayName(value); + const isField = variant === "field"; const handleSelect = (path: string) => { onChange(path); @@ -122,15 +66,49 @@ export function FolderPicker({ } }; - const Trigger = variant === "field" ? FieldTrigger : CompactTrigger; + const fieldContent = ( + <> + + + + {displayValue || placeholder} + + + + + ); + + const compactContent = ( + <> + + + {displayValue || placeholder} + + + + ); if (recentFolders.length === 0) { - return ( - + className={FIELD_TRIGGER_CLASS} + > + {fieldContent} + + ) : ( + ); } @@ -138,16 +116,24 @@ export function FolderPicker({ + isField ? ( + + ) : ( + + ) } /> {repoMatchesGitHub ? `Linked to ${detectedRepo.fullName} on GitHub` @@ -311,7 +310,7 @@ export function GitIntegrationStep({ transition={{ duration: 0.2 }} > - No git remote detected -- you can still continue. + No git remote detected. You can still continue. )} diff --git a/apps/code/src/renderer/features/onboarding/components/ProjectSelectStep.tsx b/apps/code/src/renderer/features/onboarding/components/ProjectSelectStep.tsx index f8487b384..c2143e639 100644 --- a/apps/code/src/renderer/features/onboarding/components/ProjectSelectStep.tsx +++ b/apps/code/src/renderer/features/onboarding/components/ProjectSelectStep.tsx @@ -255,7 +255,7 @@ export function ProjectSelectStep({ onNext, onBack }: ProjectSelectStepProps) { value={org} title={org.name} > - {org.name} + {org.name} )} @@ -340,7 +340,7 @@ export function ProjectSelectStep({ onNext, onBack }: ProjectSelectStepProps) { value={project} title={project.name} > - {project.name} + {project.name} )} From c804cdf7cc6aff65da7bb6080b81e95eef756f48 Mon Sep 17 00:00:00 2001 From: Charles Vien Date: Tue, 19 May 2026 15:49:40 -0700 Subject: [PATCH 6/6] extract panel message helper and shadow constant --- .../components/GitIntegrationStep.tsx | 51 +++++++++++-------- apps/code/src/renderer/styles/fieldTrigger.ts | 3 ++ 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx b/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx index 835ddc6f7..762f68b71 100644 --- a/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx +++ b/apps/code/src/renderer/features/onboarding/components/GitIntegrationStep.tsx @@ -24,6 +24,7 @@ import { GitBranch, Plus, } from "@phosphor-icons/react"; +import { cn } from "@posthog/quill"; import { AlertDialog, Box, @@ -45,6 +46,23 @@ import { useProjectsWithIntegrations } from "../hooks/useProjectsWithIntegration import { OnboardingHogTip } from "./OnboardingHogTip"; import { StepActions } from "./StepActions"; +const PANEL_SHADOW = "0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02)"; + +function getPanelMessage(opts: { + hasConnectError: boolean; + connectError: Parameters[0]; + timedOut: boolean; + isConnecting: boolean; +}): string { + if (opts.hasConnectError) + return describeGithubConnectError(opts.connectError); + if (opts.timedOut) { + return "We didn't hear back from GitHub. If the browser tab was closed, click Connect again."; + } + if (opts.isConnecting) return "Waiting for GitHub..."; + return "Optional. Lets cloud agents work on this repo and open pull requests for you."; +} + interface GitIntegrationStepProps { onNext: () => void; onBack: () => void; @@ -100,13 +118,12 @@ export function GitIntegrationStep({ projectHasTeamIntegration: selectedProject?.hasGithubIntegration ?? null, }); const canTakeAction = !isConnecting && !timedOut && !hasConnectError; - const defaultPanelMessage = hasConnectError - ? describeGithubConnectError(connectError) - : timedOut - ? "We didn't hear back from GitHub. If the browser tab was closed, click Connect again." - : isConnecting - ? "Waiting for GitHub..." - : "Optional. Lets cloud agents work on this repo and open pull requests for you."; + const defaultPanelMessage = getPanelMessage({ + hasConnectError, + connectError, + timedOut, + isConnecting, + }); const { data: githubUserIntegrations = [], @@ -191,8 +208,7 @@ export function GitIntegrationStep({ {/* Header + content */} @@ -220,10 +236,7 @@ export function GitIntegrationStep({ > @@ -286,11 +299,12 @@ export function GitIntegrationStep({ } /> {repoMatchesGitHub ? `Linked to ${detectedRepo.fullName} on GitHub` @@ -329,10 +343,7 @@ export function GitIntegrationStep({ > diff --git a/apps/code/src/renderer/styles/fieldTrigger.ts b/apps/code/src/renderer/styles/fieldTrigger.ts index 893dcce91..32b673a7c 100644 --- a/apps/code/src/renderer/styles/fieldTrigger.ts +++ b/apps/code/src/renderer/styles/fieldTrigger.ts @@ -1,3 +1,6 @@ +// Shared select-style trigger for the onboarding folder picker and combobox fields. +// Apply directly to a DOM