[ 'title' => 'Workspace overview', 'subtitle' => 'A generic app-shell pattern for tools, admin consoles, and internal products.', 'status' => ['label' => 'Ready', 'variant' => 'success'], 'description' => 'This slice comes from the uh-ai portal app: a reusable workspace shell with sidebar navigation, compact mobile controls, and semantic panel primitives.', 'highlights' => [ ['title' => 'Shell layout', 'text' => 'Sidebar plus main panel, responsive overlay behavior, and a compact mobile header.'], ['title' => 'Semantic primitives', 'text' => 'Panels, section heads, status pills, list states, and empty-state placeholders.'], ['title' => 'Starter-friendly', 'text' => 'Backported against the starter theme variables instead of portal-specific branding tokens.'], ], ], 'projects' => [ 'title' => 'Projects queue', 'subtitle' => 'Nested path fallback lets one controller serve multiple panes cleanly.', 'status' => ['label' => '3 active', 'variant' => 'info'], 'description' => 'This page is served from views/workspace/index.php, while the route remains /workspace/projects. That path fallback was backported from uh-ai as part of this slice.', 'highlights' => [ ['title' => 'Content review', 'text' => 'Design a shared docs/workspace explorer for internal tools.'], ['title' => 'Component extraction', 'text' => 'Promote shell primitives into stable starter components.'], ['title' => 'Routing cleanup', 'text' => 'Use nested routes without multiplying single-file views.'], ], ], 'activity' => [ 'title' => 'Recent activity', 'subtitle' => 'Sidebar-first tools often need a live or recent-events pane.', 'status' => ['label' => 'Monitoring', 'variant' => 'warn'], 'description' => 'The workspace shell is a better fit than the marketing-style home page when the app is navigation-heavy and stateful.', 'highlights' => [ ['title' => 'Deploy preview', 'text' => 'Workspace layout validated on desktop and mobile widths.'], ['title' => 'Shell behavior', 'text' => 'Sidebar toggle is abstracted in js/u-workspace-shell.js.'], ['title' => 'Surface consistency', 'text' => 'All blocks inherit existing starter color and radius tokens.'], ], ], ]; if (!isset($sections[$section])) { $section = 'overview'; } $current = $sections[$section]; $navItems = [ ['key' => 'overview', 'label' => 'Overview', 'icon' => 'fas fa-compass', 'meta' => 'Shell'], ['key' => 'projects', 'label' => 'Projects', 'icon' => 'fas fa-folder-tree', 'meta' => 'Routes'], ['key' => 'activity', 'label' => 'Activity', 'icon' => 'fas fa-wave-square', 'meta' => 'State'], ]; ob_start(); ?>
= safe($highlight['text']) ?>
' . safe($current['description']) . '
' . $statsHtml, ]) . component('components/workspace/section', [ 'header_html' => component('components/workspace/section-head', ['title' => 'Starter demo content']), 'body_html' => $detailHtml . 'Try visiting ' . safe(URL::link('workspace/projects')) . ' or ' . safe(URL::link('workspace/activity')) . ' to see the nested route fallback in action.
', ]); if ($section === 'activity') { $mainBody .= component('components/workspace/empty-state', [ 'icon_class' => 'fas fa-clock-rotate-left', 'title' => 'No live stream wired yet', 'text' => 'The shell is generic. Add your own websocket, polling, or event-driven runtime behind it when a real product needs one.', 'action_html' => 'Open dashboard demo', ]); } $main = $mobileBar . component('components/workspace/panel', [ 'header_html' => $header, 'body_html' => $mainBody, ]); echo component('components/workspace/app-frame', [ 'id' => 'workspace-demo-shell', 'overlay_id' => 'workspace-demo-overlay', 'sidebar_html' => $sidebar, 'main_html' => $main, ]); ?>