diff --git a/apps/ui/src/components/layout/project-switcher/components/icon-picker.tsx b/apps/ui/src/components/layout/project-switcher/components/icon-picker.tsx index 31ce1d3d..4c243fe6 100644 --- a/apps/ui/src/components/layout/project-switcher/components/icon-picker.tsx +++ b/apps/ui/src/components/layout/project-switcher/components/icon-picker.tsx @@ -448,7 +448,9 @@ export function IconPicker({ selectedIcon, onSelectIcon }: IconPickerProps) { ); const getIconComponent = (iconName: string) => { - return (LucideIcons as Record>)[iconName]; + return (LucideIcons as unknown as Record>)[ + iconName + ]; }; return ( diff --git a/apps/ui/src/components/layout/project-switcher/components/project-switcher-item.tsx b/apps/ui/src/components/layout/project-switcher/components/project-switcher-item.tsx index b4434f8b..c1a2fa26 100644 --- a/apps/ui/src/components/layout/project-switcher/components/project-switcher-item.tsx +++ b/apps/ui/src/components/layout/project-switcher/components/project-switcher-item.tsx @@ -29,7 +29,7 @@ export function ProjectSwitcherItem({ // Get the icon component from lucide-react const getIconComponent = (): LucideIcon => { if (project.icon && project.icon in LucideIcons) { - return (LucideIcons as Record)[project.icon]; + return (LucideIcons as unknown as Record)[project.icon]; } return Folder; }; diff --git a/apps/ui/src/components/layout/project-switcher/project-switcher.tsx b/apps/ui/src/components/layout/project-switcher/project-switcher.tsx index 426777b5..9fa772da 100644 --- a/apps/ui/src/components/layout/project-switcher/project-switcher.tsx +++ b/apps/ui/src/components/layout/project-switcher/project-switcher.tsx @@ -17,6 +17,7 @@ import { getElectronAPI } from '@/lib/electron'; import { initializeProject, hasAppSpec, hasAutomakerDir } from '@/lib/project-init'; import { toast } from 'sonner'; import { CreateSpecDialog } from '@/components/views/spec-view/dialogs'; +import type { FeatureCount } from '@/components/views/spec-view/types'; function getOSAbbreviation(os: string): string { switch (os) { @@ -57,7 +58,7 @@ export function ProjectSwitcher() { const [projectOverview, setProjectOverview] = useState(''); const [generateFeatures, setGenerateFeatures] = useState(true); const [analyzeProject, setAnalyzeProject] = useState(true); - const [featureCount, setFeatureCount] = useState(5); + const [featureCount, setFeatureCount] = useState(50); // Derive isCreatingSpec from store state const isCreatingSpec = specCreatingForProject !== null; @@ -208,13 +209,18 @@ export function ProjectSwitcher() { try { const api = getElectronAPI(); - await api.generateAppSpec({ - projectPath: setupProjectPath, + if (!api.specRegeneration) { + toast.error('Spec regeneration not available'); + setSpecCreatingForProject(null); + return; + } + await api.specRegeneration.create( + setupProjectPath, projectOverview, generateFeatures, analyzeProject, - featureCount, - }); + featureCount + ); } catch (error) { console.error('Failed to generate spec:', error); toast.error('Failed to generate spec', { diff --git a/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx b/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx index 513d371b..8f3d921e 100644 --- a/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx +++ b/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx @@ -27,7 +27,7 @@ export function SidebarHeader({ // Get the icon component from lucide-react const getIconComponent = (): LucideIcon => { if (currentProject?.icon && currentProject.icon in LucideIcons) { - return (LucideIcons as Record)[currentProject.icon]; + return (LucideIcons as unknown as Record)[currentProject.icon]; } return Folder; }; @@ -125,7 +125,7 @@ export function SidebarHeader({ {projects.map((project) => { const ProjectIcon = project.icon && project.icon in LucideIcons - ? (LucideIcons as Record)[project.icon] + ? (LucideIcons as unknown as Record)[project.icon] : Folder; const isActive = currentProject?.id === project.id; diff --git a/apps/ui/src/components/ui/keyboard-map.tsx b/apps/ui/src/components/ui/keyboard-map.tsx index d33f60b2..10de4edb 100644 --- a/apps/ui/src/components/ui/keyboard-map.tsx +++ b/apps/ui/src/components/ui/keyboard-map.tsx @@ -90,8 +90,10 @@ const SHORTCUT_LABELS: Record = { context: 'Context', memory: 'Memory', settings: 'Settings', + projectSettings: 'Project Settings', terminal: 'Terminal', ideation: 'Ideation', + notifications: 'Notifications', githubIssues: 'GitHub Issues', githubPrs: 'Pull Requests', toggleSidebar: 'Toggle Sidebar', @@ -118,8 +120,10 @@ const SHORTCUT_CATEGORIES: Record onToggleFeatureSelection?.(feature.id)} diff --git a/apps/ui/src/components/views/project-settings-view/project-settings-view.tsx b/apps/ui/src/components/views/project-settings-view/project-settings-view.tsx index 1ef873d1..b570b1f4 100644 --- a/apps/ui/src/components/views/project-settings-view/project-settings-view.tsx +++ b/apps/ui/src/components/views/project-settings-view/project-settings-view.tsx @@ -20,8 +20,8 @@ interface SettingsProject { name: string; path: string; theme?: string; - icon?: string | null; - customIconPath?: string | null; + icon?: string; + customIconPath?: string; } export function ProjectSettingsView() { diff --git a/apps/ui/src/hooks/use-project-settings-loader.ts b/apps/ui/src/hooks/use-project-settings-loader.ts index 4da50473..da0ef594 100644 --- a/apps/ui/src/hooks/use-project-settings-loader.ts +++ b/apps/ui/src/hooks/use-project-settings-loader.ts @@ -93,8 +93,11 @@ export function useProjectSettingsLoader() { } // Apply defaultDeleteBranch if present - if (result.settings.defaultDeleteBranch !== undefined) { - setDefaultDeleteBranch(requestedProjectPath, result.settings.defaultDeleteBranch); + if (result.settings.defaultDeleteBranchWithWorktree !== undefined) { + setDefaultDeleteBranch( + requestedProjectPath, + result.settings.defaultDeleteBranchWithWorktree + ); } // Apply autoDismissInitScriptIndicator if present diff --git a/apps/ui/src/routes/__root.tsx b/apps/ui/src/routes/__root.tsx index ec09be70..c911a80d 100644 --- a/apps/ui/src/routes/__root.tsx +++ b/apps/ui/src/routes/__root.tsx @@ -8,7 +8,7 @@ import { useFileBrowser, setGlobalFileBrowser, } from '@/contexts/file-browser-context'; -import { useAppStore, getStoredTheme } from '@/store/app-store'; +import { useAppStore, getStoredTheme, type ThemeMode } from '@/store/app-store'; import { useSetupStore } from '@/store/setup-store'; import { useAuthStore } from '@/store/auth-store'; import { getElectronAPI, isElectron } from '@/lib/electron'; @@ -681,7 +681,7 @@ function RootLayoutContent() { upsertAndSetCurrentProject( autoOpenCandidate.path, autoOpenCandidate.name, - autoOpenCandidate.theme + autoOpenCandidate.theme as ThemeMode | undefined ); }