diff --git a/CHANGELOG.md b/CHANGELOG.md index dba60c48..5c5f1c63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +* **ui:** redesign top bar into three-zone layout — node pill (left), animated navigation group (center), utilities (right). Replaces flat row of individual buttons with a cohesive tab-style navigation using animated sliding highlight. Includes responsive behavior: icon+text at xl, icons-only at md, sheet drawer on mobile. + ### Fixed * **scheduled-ops:** fix "Run Now" audit log entry incorrectly showing "Created scheduled task" instead of "Triggered scheduled task" @@ -30,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Docs * **scheduled-ops:** add screenshots and document Run Now behavior for disabled tasks +* **settings:** fix settings reference to correctly describe profile dropdown access ## [0.14.2](https://github.com/AnsoCode/Sencho/compare/v0.14.1...v0.14.2) (2026-03-29) diff --git a/docs/images/dashboard.png b/docs/images/dashboard.png index 890bfc10..d1abe33b 100644 Binary files a/docs/images/dashboard.png and b/docs/images/dashboard.png differ diff --git a/docs/images/dashboard/dashboard-overview.png b/docs/images/dashboard/dashboard-overview.png index bd3d2121..48affe02 100644 Binary files a/docs/images/dashboard/dashboard-overview.png and b/docs/images/dashboard/dashboard-overview.png differ diff --git a/docs/images/fleet-view/fleet-overview.png b/docs/images/fleet-view/fleet-overview.png index 802254c4..55ee8cbf 100644 Binary files a/docs/images/fleet-view/fleet-overview.png and b/docs/images/fleet-view/fleet-overview.png differ diff --git a/docs/images/profile-dropdown.png b/docs/images/profile-dropdown.png index c24a9b7d..721cd07e 100644 Binary files a/docs/images/profile-dropdown.png and b/docs/images/profile-dropdown.png differ diff --git a/docs/reference/settings.mdx b/docs/reference/settings.mdx index 00db4cd9..ff103ca4 100644 --- a/docs/reference/settings.mdx +++ b/docs/reference/settings.mdx @@ -3,7 +3,7 @@ title: Settings Reference description: Complete reference for every option in the Sencho Settings Hub. --- -Open the Settings Hub by clicking **Settings** in the top navigation bar. The left sidebar lists all available sections. +Open the Settings Hub by clicking the **Profile** icon in the top-right corner and selecting **Settings**. The left sidebar lists all available sections. Settings Hub showing the Account tab and the full section sidebar diff --git a/frontend/src/components/EditorLayout.tsx b/frontend/src/components/EditorLayout.tsx index a0263289..1624d8b8 100644 --- a/frontend/src/components/EditorLayout.tsx +++ b/frontend/src/components/EditorLayout.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect, useRef } from 'react'; +import { useState, useEffect, useRef, useMemo } from 'react'; import { motion } from 'motion/react'; type Theme = 'light' | 'dark' | 'auto'; @@ -14,9 +14,11 @@ import { Input } from './ui/input'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogTrigger } from './ui/dialog'; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from './ui/alert-dialog'; import { Tabs, TabsList, TabsTrigger } from './ui/tabs'; +import { Highlight, HighlightItem } from './animate-ui/primitives/effects/highlight'; import { Card, CardContent, CardHeader, CardTitle } from './ui/card'; import { Badge } from './ui/badge'; -import { Plus, Trash2, Play, Square, Save, Terminal, RotateCw, CloudDownload, Pencil, X, Home, ExternalLink, Bell, MoreVertical, BellRing, Rocket, HardDrive, ScrollText, Activity, Server, Radar, Undo2, RefreshCw, Download, Clock } from 'lucide-react'; +import { Plus, Trash2, Play, Square, Save, Terminal, RotateCw, CloudDownload, Pencil, X, Home, ExternalLink, Bell, MoreVertical, BellRing, Rocket, HardDrive, ScrollText, Activity, Server, Radar, Undo2, RefreshCw, Download, Clock, Menu } from 'lucide-react'; +import type { LucideIcon } from 'lucide-react'; import { UserProfileDropdown } from './UserProfileDropdown'; import { apiFetch, fetchForNode } from '@/lib/api'; import { toast } from 'sonner'; @@ -30,6 +32,8 @@ import { Popover, PopoverContent, PopoverTrigger } from './ui/popover'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from './ui/dropdown-menu'; import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger } from './ui/context-menu'; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'; +import { Sheet, SheetContent, SheetTrigger } from './ui/sheet'; +import { cn } from '@/lib/utils'; import { SettingsModal } from './SettingsModal'; import { StackAlertSheet } from './StackAlertSheet'; import { AppStoreView } from './AppStoreView'; @@ -143,11 +147,65 @@ export default function EditorLayout() { const [alertSheetOpen, setAlertSheetOpen] = useState(false); const [alertSheetStack, setAlertSheetStack] = useState(''); + // Mobile navigation sheet state + const [mobileNavOpen, setMobileNavOpen] = useState(false); + const openAlertSheet = (stackName: string) => { setAlertSheetStack(stackName); setAlertSheetOpen(true); }; + // Navigation items (permission-aware, data-driven) + const navItems = useMemo(() => { + const items: Array<{ value: string; label: string; icon: LucideIcon }> = [ + { value: 'dashboard', label: 'Home', icon: Home }, + { value: 'fleet', label: 'Fleet', icon: Radar }, + ]; + if (isAdmin) items.push({ value: 'host-console', label: 'Console', icon: Terminal }); + items.push( + { value: 'resources', label: 'Resources', icon: HardDrive }, + { value: 'templates', label: 'App Store', icon: CloudDownload }, + { value: 'global-observability', label: 'Logs', icon: Activity }, + ); + if (isPro && license?.variant === 'team' && isAdmin) { + items.push( + { value: 'audit-log', label: 'Audit', icon: ScrollText }, + { value: 'scheduled-ops', label: 'Schedules', icon: Clock }, + ); + } + return items; + }, [isAdmin, isPro, license?.variant]); + + // Only highlight a tab if activeView matches a nav item + const navTabValue = navItems.some(i => i.value === activeView) ? activeView : undefined; + + // Reset editor state (extracted from Home button onClick) + const resetEditorState = () => { + setSelectedFile(null); + setContent(''); + setOriginalContent(''); + setEnvContent(''); + setOriginalEnvContent(''); + setEnvFiles([]); + setSelectedEnvFile(''); + setEnvExists(false); + setContainers([]); + setIsEditing(false); + }; + + // Navigation handler with toggle support + const handleNavigate = (value: string) => { + if (value === activeView) { + // Toggle off: return to editor if a file is open, else dashboard + setActiveView(selectedFile ? 'editor' : 'dashboard'); + } else if (value === 'dashboard') { + resetEditorState(); + setActiveView('dashboard'); + } else { + setActiveView(value as typeof activeView); + } + }; + // Listen for system dark mode changes (for 'auto' theme) useEffect(() => { const mq = window.matchMedia('(prefers-color-scheme: dark)'); @@ -1030,9 +1088,9 @@ export default function EditorLayout() { {/* Left Sidebar (Stacks) */}
{/* Branding Header */} -
+
- Sencho Logo + Sencho Logo

Sencho

@@ -1251,9 +1309,9 @@ export default function EditorLayout() { {/* Main Content Area */}
- {/* Top Header Bar */} -
- {/* Node Context Pill - visible only when a remote node is active */} + {/* Top Header Bar — Three-zone layout: Node Pill | Navigation | Utilities */} +
+ {/* LEFT ZONE: Node Context Pill */}
{activeNode?.type === 'remote' ? (
@@ -1267,117 +1325,45 @@ export default function EditorLayout() {
)}
-
- {/* Home Button */} - - {/* Fleet Overview Toggle */} - - {/* Console Toggle */} - {isAdmin && ( - - )} - {/* Resources Toggle */} - - {/* App Store Toggle */} - - {/* Global Observability Toggle */} - - {/* Audit Log Toggle (Team Pro + Admin only) */} - {isPro && license?.variant === 'team' && isAdmin && ( - - )} - {/* Scheduled Operations Toggle (Team Pro + Admin only) */} - {isPro && license?.variant === 'team' && isAdmin && ( - - )} + {/* CENTER ZONE: Navigation Group (hidden on mobile) */} +
+ +
+ {navItems.map(({ value, label, icon: Icon }) => ( + + + + ))} +
+
+
+ + {/* Spacer for mobile (when center nav is hidden) */} +
+ + {/* RIGHT ZONE: Utilities */} +
{/* Notifications Popover */} -

{notif.message}

- - {/* Delete individual notification button */}
{/* end right-side buttons */} + + {/* Mobile Navigation Trigger */} + + + + + +
+

Navigation

+
+ +
+
+
{/* Main Workspace */}