feat: flesh out overview and settings views

- wire settings and overview sidebar buttons to real views
- render policy editor for existing sandboxes below telemetry
- add overview summary panel and preset ladder
- reuse preset-driven config panel in global settings view
This commit is contained in:
Mark McKeen
2026-03-29 08:59:06 -06:00
parent 22998e6da7
commit 38b71883ce
3 changed files with 124 additions and 36 deletions
+20 -2
View File
@@ -16,8 +16,11 @@ interface SidebarProps {
onToggleSubmenu: () => void
isCreateMode: boolean
isDestroyMode: boolean
activeView: 'overview' | 'settings' | 'sandboxes'
onCreateClick: () => void
onDestroyClick: () => void
onOverviewClick: () => void
onSettingsClick: () => void
onExitMode: () => void
}
@@ -29,8 +32,11 @@ export default function Sidebar({
onToggleSubmenu,
isCreateMode,
isDestroyMode,
activeView,
onCreateClick,
onDestroyClick,
onOverviewClick,
onSettingsClick,
onExitMode
}: SidebarProps) {
const [sandboxes, setSandboxes] = useState<Sandbox[]>([])
@@ -158,14 +164,26 @@ export default function Sidebar({
</button>
)}
<button className="w-full flex items-center gap-3 px-3 py-2 rounded-sm hover:bg-[var(--background-tertiary)] text-[var(--foreground-dim)] transition-colors">
<button
onClick={onSettingsClick}
className={`w-full flex items-center gap-3 px-3 py-2 rounded-sm transition-colors ${
activeView === 'settings'
? 'bg-[var(--nvidia-green)] text-white'
: 'hover:bg-[var(--background-tertiary)] text-[var(--foreground-dim)]'
}`}>
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="square" strokeLinejoin="miter" strokeWidth={2} d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" />
<path strokeLinecap="square" strokeLinejoin="miter" strokeWidth={2} d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
</svg>
<span className="text-sm">Settings</span>
</button>
<button className="w-full flex items-center gap-3 px-3 py-2 rounded-sm hover:bg-[var(--background-tertiary)] text-[var(--foreground-dim)] transition-colors">
<button
onClick={onOverviewClick}
className={`w-full flex items-center gap-3 px-3 py-2 rounded-sm transition-colors ${
activeView === 'overview'
? 'bg-[var(--nvidia-green)] text-white'
: 'hover:bg-[var(--background-tertiary)] text-[var(--foreground-dim)]'
}`}>
<svg className="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="square" strokeLinejoin="miter" strokeWidth={2} d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
</svg>