diff --git a/ui/desktop/src/App.tsx b/ui/desktop/src/App.tsx index 36d776f8a3..fed945e0b1 100644 --- a/ui/desktop/src/App.tsx +++ b/ui/desktop/src/App.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { IpcRendererEvent } from 'electron'; import { HashRouter, Routes, Route, useNavigate, useLocation } from 'react-router-dom'; import { openSharedSessionFromDeepLink, type SessionLinksViewOptions } from './sessionLinks'; @@ -40,7 +40,7 @@ import PermissionSettingsView from './components/settings/permission/PermissionS import { type SessionDetails } from './sessions'; import ExtensionsView, { ExtensionsViewOptions } from './components/extensions/ExtensionsView'; -import ProjectsContainer from './components/projects/ProjectsContainer'; +// import ProjectsContainer from './components/projects/ProjectsContainer'; import RecipesView from './components/RecipesView'; import RecipeEditor from './components/RecipeEditor'; @@ -61,8 +61,8 @@ export type View = | 'loading' | 'recipeEditor' | 'recipes' - | 'permission' - | 'projects'; + | 'permission'; +// | 'projects'; export type ViewOptions = { // Settings view options @@ -477,56 +477,56 @@ const ExtensionsRoute = () => { ); }; -const ProjectsRoute = () => { - const navigate = useNavigate(); - - const setView = (view: View, viewOptions?: ViewOptions) => { - // Convert view to route navigation - switch (view) { - case 'chat': - navigate('/'); - break; - case 'pair': - navigate('/pair', { state: viewOptions }); - break; - case 'settings': - navigate('/settings', { state: viewOptions }); - break; - case 'sessions': - navigate('/sessions'); - break; - case 'schedules': - navigate('/schedules'); - break; - case 'recipes': - navigate('/recipes'); - break; - case 'permission': - navigate('/permission', { state: viewOptions }); - break; - case 'ConfigureProviders': - navigate('/configure-providers'); - break; - case 'sharedSession': - navigate('/shared-session', { state: viewOptions }); - break; - case 'recipeEditor': - navigate('/recipe-editor', { state: viewOptions }); - break; - case 'welcome': - navigate('/welcome'); - break; - default: - navigate('/'); - } - }; - - return ( - Loading projects...}> - - - ); -}; +// const ProjectsRoute = () => { +// const navigate = useNavigate(); +// +// const setView = (view: View, viewOptions?: ViewOptions) => { +// // Convert view to route navigation +// switch (view) { +// case 'chat': +// navigate('/'); +// break; +// case 'pair': +// navigate('/pair', { state: viewOptions }); +// break; +// case 'settings': +// navigate('/settings', { state: viewOptions }); +// break; +// case 'sessions': +// navigate('/sessions'); +// break; +// case 'schedules': +// navigate('/schedules'); +// break; +// case 'recipes': +// navigate('/recipes'); +// break; +// case 'permission': +// navigate('/permission', { state: viewOptions }); +// break; +// case 'ConfigureProviders': +// navigate('/configure-providers'); +// break; +// case 'sharedSession': +// navigate('/shared-session', { state: viewOptions }); +// break; +// case 'recipeEditor': +// navigate('/recipe-editor', { state: viewOptions }); +// break; +// case 'welcome': +// navigate('/welcome'); +// break; +// default: +// navigate('/'); +// } +// }; +// +// return ( +// Loading projects...}> +// +// +// ); +// }; export default function App() { const [fatalError, setFatalError] = useState(null); @@ -1093,14 +1093,14 @@ export default function App() { } /> } /> } /> - - - - } - /> + {/**/} + {/* */} + {/* */} + {/* }*/} + {/*/>*/} diff --git a/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx b/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx index d13adcdfeb..b624b2e75b 100644 --- a/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx +++ b/ui/desktop/src/components/GooseSidebar/AppSidebar.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { FileText, Clock, Home, Puzzle, History, FolderKanban } from 'lucide-react'; +import { FileText, Clock, Home, Puzzle, History } from 'lucide-react'; import { useNavigate } from 'react-router-dom'; import { motion } from 'framer-motion'; import { @@ -196,23 +196,23 @@ const AppSidebar: React.FC = ({ currentPath }) => { {/* Content Group */} - - - navigate('/projects')} - isActive={isActivePath('/projects')} - tooltip="Manage your projects" - className="w-full justify-start px-3 rounded-lg h-fit hover:bg-background-medium/50 transition-all duration-200 data-[active=true]:bg-background-medium" - > - - Projects - - - + {/**/} + {/* */} + {/* navigate('/projects')}*/} + {/* isActive={isActivePath('/projects')}*/} + {/* tooltip="Manage your projects"*/} + {/* className="w-full justify-start px-3 rounded-lg h-fit hover:bg-background-medium/50 transition-all duration-200 data-[active=true]:bg-background-medium"*/} + {/* >*/} + {/* */} + {/* Projects*/} + {/* */} + {/* */} + {/**/} (null); const [_error, setError] = useState(null); const [recentSessions, setRecentSessions] = useState([]); - const [recentProjects, setRecentProjects] = useState([]); + // const [recentProjects, setRecentProjects] = useState([]); const navigate = useNavigate(); useEffect(() => { @@ -57,18 +57,18 @@ export function SessionInsights() { } }; - const loadRecentProjects = async () => { - try { - const projects = await fetchProjects(); - setRecentProjects(projects.slice(0, 3)); - } catch (error) { - console.error('Failed to load recent projects:', error); - } - }; + // const loadRecentProjects = async () => { + // try { + // const projects = await fetchProjects(); + // setRecentProjects(projects.slice(0, 3)); + // } catch (error) { + // console.error('Failed to load recent projects:', error); + // } + // }; loadInsights(); loadRecentSessions(); - loadRecentProjects(); + // loadRecentProjects(); }, []); const handleSessionClick = (sessionId: string) => { @@ -82,16 +82,16 @@ export function SessionInsights() { navigate('/sessions'); }; - const navigateToProjects = () => { - navigate('/projects'); - }; - - const handleProjectClick = (projectId: string) => { - navigate('/projects', { - state: { selectedProjectId: projectId }, - replace: true, - }); - }; + // const navigateToProjects = () => { + // navigate('/projects'); + // }; + // + // const handleProjectClick = (projectId: string) => { + // navigate('/projects', { + // state: { selectedProjectId: projectId }, + // replace: true, + // }); + // }; // Format date to show only the date part (without time) const formatDateOnly = (dateStr: string) => { @@ -160,60 +160,60 @@ export function SessionInsights() { {/* Bottom row with two equal columns */} -
+
{/* Recent Projects Card */} - - -
- - Recent projects - - -
-
- - {recentProjects.length > 0 ? ( - recentProjects.map((project, index) => ( - handleProjectClick(project.id)} - role="button" - tabIndex={0} - initial={{ opacity: 0, y: 5 }} - animate={{ opacity: 1, y: 0 }} - transition={{ duration: 0.3, delay: index * 0.1 }} - onKeyDown={(e) => { - if (e.key === 'Enter' || e.key === ' ') { - handleProjectClick(project.id); - } - }} - > -
- - {project.name} -
- - {formatDateOnly(project.updatedAt)} - -
- )) - ) : ( -
- No recent projects found. -
- )} -
-
-
-
+ {/**/} + {/* */} + {/*
*/} + {/* */} + {/* Recent projects*/} + {/* */} + {/* */} + {/* See all*/} + {/* */} + {/*
*/} + {/*
*/} + {/* */} + {/* {recentProjects.length > 0 ? (*/} + {/* recentProjects.map((project, index) => (*/} + {/* handleProjectClick(project.id)}*/} + {/* role="button"*/} + {/* tabIndex={0}*/} + {/* initial={{ opacity: 0, y: 5 }}*/} + {/* animate={{ opacity: 1, y: 0 }}*/} + {/* transition={{ duration: 0.3, delay: index * 0.1 }}*/} + {/* onKeyDown={(e) => {*/} + {/* if (e.key === 'Enter' || e.key === ' ') {*/} + {/* handleProjectClick(project.id);*/} + {/* }*/} + {/* }}*/} + {/* >*/} + {/*
*/} + {/* */} + {/* {project.name}*/} + {/*
*/} + {/* */} + {/* {formatDateOnly(project.updatedAt)}*/} + {/* */} + {/* */} + {/* ))*/} + {/* ) : (*/} + {/*
*/} + {/* No recent projects found.*/} + {/*
*/} + {/* )}*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} {/* Recent Chats Card */}