From 2b3f1e724a19195f30fec84bf87712b82bcd29eb Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Mon, 8 Jun 2026 16:46:28 -0700 Subject: [PATCH] fix: address review findings (#4919) --- .../FeatureWallSetupChecklist.tsx | 78 +++++++++++++++---- .../src/components/settings/Settings.tsx | 9 ++- .../settings/SettingsSetupGuidePane.tsx | 3 +- .../components/settings/SettingsSidebar.tsx | 20 ++--- .../settings/orca-logo-settings-icon.tsx | 13 ++++ .../sidebar/SetupGuideSidebarEntry.tsx | 17 +--- .../hooks/useSettingsNavigationMetadata.ts | 15 +--- 7 files changed, 93 insertions(+), 62 deletions(-) create mode 100644 src/renderer/src/components/settings/orca-logo-settings-icon.tsx diff --git a/src/renderer/src/components/feature-wall/FeatureWallSetupChecklist.tsx b/src/renderer/src/components/feature-wall/FeatureWallSetupChecklist.tsx index 01663688b..e6f36083c 100644 --- a/src/renderer/src/components/feature-wall/FeatureWallSetupChecklist.tsx +++ b/src/renderer/src/components/feature-wall/FeatureWallSetupChecklist.tsx @@ -27,12 +27,16 @@ import { NotificationStep } from '../onboarding/NotificationStep' import { useAppStore } from '@/store' import type { TuiAgent } from '../../../../shared/types' +type FeatureWallSetupChecklistLayout = 'modal' | 'embedded' + type FeatureWallSetupChecklistProps = { activeStep: FeatureWallSetupStep | null progress: FeatureWallSetupProgress onSelectStep: (id: FeatureWallSetupStepId) => void onOrchestrationSkillInstalledChange: (installed: boolean) => void onBrowserUseSkillInstalledChange: (installed: boolean) => void + /** Modal keeps a compact rail; embedded (settings pane) gets more column breathing room. */ + layout?: FeatureWallSetupChecklistLayout } function SetupStepRow(props: { @@ -41,19 +45,29 @@ function SetupStepRow(props: { active: boolean ordinal: number onSelect: () => void + layout: FeatureWallSetupChecklistLayout }): React.JSX.Element { - const { step, done, active, ordinal, onSelect } = props + const { step, done, active, ordinal, onSelect, layout } = props + const isEmbedded = layout === 'embedded' return ( ) } diff --git a/src/renderer/src/components/settings/orca-logo-settings-icon.tsx b/src/renderer/src/components/settings/orca-logo-settings-icon.tsx new file mode 100644 index 000000000..fffef8e16 --- /dev/null +++ b/src/renderer/src/components/settings/orca-logo-settings-icon.tsx @@ -0,0 +1,13 @@ +import { createElement } from 'react' +import type { LucideProps } from 'lucide-react' +import logo from '../../../../../resources/logo.svg' +import { cn } from '@/lib/utils' + +export function OrcaLogoSettingsIcon({ className }: LucideProps): React.JSX.Element { + return createElement('img', { + src: logo, + alt: '', + 'aria-hidden': true, + className: cn('object-contain invert dark:invert-0', className) + }) +} diff --git a/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx b/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx index ebc613bdd..12005034d 100644 --- a/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx +++ b/src/renderer/src/components/sidebar/SetupGuideSidebarEntry.tsx @@ -1,6 +1,5 @@ import React from 'react' import { EyeOff } from 'lucide-react' -import logo from '../../../../../resources/logo.svg' import { cn } from '@/lib/utils' import { useAppStore } from '@/store' import { @@ -81,22 +80,14 @@ export function SetupGuideSidebarEntry(): React.JSX.Element | null { : 'text-worktree-sidebar-foreground/60 hover:bg-worktree-sidebar-foreground/8' )} > - Onboarding checklist - diff --git a/src/renderer/src/hooks/useSettingsNavigationMetadata.ts b/src/renderer/src/hooks/useSettingsNavigationMetadata.ts index 693086d9f..08dd518b5 100644 --- a/src/renderer/src/hooks/useSettingsNavigationMetadata.ts +++ b/src/renderer/src/hooks/useSettingsNavigationMetadata.ts @@ -1,5 +1,5 @@ /* oxlint-disable max-lines */ -import { createElement, useMemo } from 'react' +import { useMemo } from 'react' // Why: this registry mirrors the Settings sidebar in one neutral module so // Cmd+J and Settings visibility cannot drift. Keep it free of Settings pane UI // imports; the boundary is enforced by a focused architecture test. @@ -31,8 +31,7 @@ import { UserCog, Wrench } from 'lucide-react' -import type { LucideProps } from 'lucide-react' -import logo from '../../../../resources/logo.svg' +import { OrcaLogoSettingsIcon } from '@/components/settings/orca-logo-settings-icon' import type { Repo } from '../../../shared/types' import { getRepoKindLabel } from '../../../shared/repo-kind' import { useAppStore } from '@/store' @@ -69,21 +68,11 @@ import { SHORTCUTS_PANE_SEARCH_ENTRIES } from '@/components/settings/shortcuts-s import { STATS_PANE_SEARCH_ENTRIES } from '@/components/stats/stats-search' import { EXPERIMENTAL_PANE_SEARCH_ENTRIES } from '@/components/settings/experimental-search' import { getRepositoryPaneSearchEntries } from '@/components/settings/repository-search' -import { cn } from '@/lib/utils' import { getCachedWindowsTerminalCapabilities, getWindowsTerminalCapabilityOwnerKey } from '@/lib/windows-terminal-capabilities' -function OrcaLogoSettingsIcon({ className }: LucideProps) { - return createElement('img', { - src: logo, - alt: '', - 'aria-hidden': true, - className: cn('object-contain invert dark:invert-0', className) - }) -} - export function isWebClientLocation(): boolean { return ( Boolean((window as unknown as { __ORCA_WEB_CLIENT__?: boolean }).__ORCA_WEB_CLIENT__) ||