feat: implement dashboard view and enhance sidebar navigation

- Added a new DashboardView component for improved project management.
- Updated sidebar navigation to redirect to the dashboard instead of the home page.
- Removed ProjectActions from the sidebar for a cleaner interface.
- Enhanced BoardView to conditionally render the WorktreePanel based on visibility settings.
- Introduced worktree panel visibility management per project in the app store.
- Updated project settings to include worktree panel visibility and favorite status.
- Adjusted navigation logic to ensure users are directed to the appropriate view based on project state.
This commit is contained in:
webdevcody
2026-01-10 13:08:59 -05:00
parent 134208dab6
commit a67b8c6109
15 changed files with 1061 additions and 109 deletions

View File

@@ -84,6 +84,7 @@ function RootLayoutContent() {
const isSetupRoute = location.pathname === '/setup';
const isLoginRoute = location.pathname === '/login';
const isLoggedOutRoute = location.pathname === '/logged-out';
const isDashboardRoute = location.pathname === '/dashboard';
// Sandbox environment check state
type SandboxStatus = 'pending' | 'containerized' | 'needs-confirmation' | 'denied' | 'confirmed';
@@ -389,9 +390,9 @@ function RootLayoutContent() {
return;
}
// Setup complete but user is still on /setup -> go to app
// Setup complete but user is still on /setup -> go to dashboard
if (setupComplete && location.pathname === '/setup') {
navigate({ to: '/' });
navigate({ to: '/dashboard' });
}
}, [authChecked, isAuthenticated, setupComplete, location.pathname, navigate]);
@@ -425,10 +426,16 @@ function RootLayoutContent() {
testConnection();
}, [setIpcConnected]);
// Restore to board view if a project was previously open
// Redirect from welcome page based on project state
useEffect(() => {
if (isMounted && currentProject && location.pathname === '/') {
navigate({ to: '/board' });
if (isMounted && location.pathname === '/') {
if (currentProject) {
// Project is selected, go to board
navigate({ to: '/board' });
} else {
// No project selected, go to dashboard
navigate({ to: '/dashboard' });
}
}
}, [isMounted, currentProject, location.pathname, navigate]);
@@ -514,6 +521,23 @@ function RootLayoutContent() {
);
}
// Show dashboard page (full screen, no sidebar) - authenticated only
if (isDashboardRoute) {
return (
<>
<main className="h-screen overflow-hidden" data-testid="app-container">
<Outlet />
<Toaster richColors position="bottom-right" />
</main>
<SandboxRiskDialog
open={showSandboxDialog}
onConfirm={handleSandboxConfirm}
onDeny={handleSandboxDeny}
/>
</>
);
}
return (
<>
<main className="flex h-screen overflow-hidden" data-testid="app-container">

View File

@@ -0,0 +1,6 @@
import { createFileRoute } from '@tanstack/react-router';
import { DashboardView } from '@/components/views/dashboard-view';
export const Route = createFileRoute('/dashboard')({
component: DashboardView,
});