From 7523d4500e75f8b69044a68fc8b93f61aa22bf54 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 3 May 2026 14:14:09 +0000 Subject: [PATCH] feat(export): modernize export panel and ai harness - Modernize ExportPanel with preview-first UX, format cards, and scope selection. - Update AIHarness with a lab-ready four-panel layout and truthful status. - Refactor JobMetrics to use tokenized CSS and gate to development mode. - Update styling to align with 2026 UI modernization tokens. - Ensure compliance with anti-slop rules for local-first messaging. Co-authored-by: d-oit <6849456+d-oit@users.noreply.github.com> --- src/app/App.tsx | 3 + src/components/JobMetrics.tsx | 54 +++--- src/features/ai/AIHarness.tsx | 115 ++++++++++-- src/features/export/ExportPanel.tsx | 150 ++++++++++++++- src/styles/components.css | 44 +++++ src/styles/features.css | 276 +++++++++++++++++++++++++++- 6 files changed, 593 insertions(+), 49 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 17fbf10..fe21f2c 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -11,6 +11,7 @@ import SidebarNav from '../components/SidebarNav'; import Header from '../components/Header'; import MobileDrawer from '../components/MobileDrawer'; import SearchPanel from '../features/search/SearchPanel'; +import JobMetrics from '../components/JobMetrics'; import ErrorBoundary from '../components/ErrorBoundary'; import Editor from '../features/editor/Editor'; import { useMediaQuery } from '../hooks/useMediaQuery'; @@ -165,6 +166,8 @@ const AppContent: React.FC = () => { /> )} + + ); }; diff --git a/src/components/JobMetrics.tsx b/src/components/JobMetrics.tsx index d9d9014..8ecced0 100644 --- a/src/components/JobMetrics.tsx +++ b/src/components/JobMetrics.tsx @@ -12,30 +12,38 @@ const JobMetrics: React.FC = () => { return () => clearInterval(interval); }, []); + // Only show in development + if (!import.meta.env.DEV) { + return null; + } + return ( -
-

Job Queue Metrics

-
- Queued: {metrics.queued} - Running: {metrics.running} - Completed: {metrics.completed} - Failed: {metrics.failed} - Cancelled: {metrics.cancelled} - Coalesced: {metrics.coalesced} - Avg Wait: {metrics.avgWaitTime.toFixed(0)}ms - Avg Exec: {metrics.avgExecutionTime.toFixed(0)}ms +
+

Job Queue Metrics

+
+ Queued: + {metrics.queued} + + Running: + {metrics.running} + + Completed: + {metrics.completed} + + Failed: + {metrics.failed} + + Cancelled: + {metrics.cancelled} + + Coalesced: + {metrics.coalesced} + + Avg Wait: + {metrics.avgWaitTime.toFixed(0)}ms + + Avg Exec: + {metrics.avgExecutionTime.toFixed(0)}ms
); diff --git a/src/features/ai/AIHarness.tsx b/src/features/ai/AIHarness.tsx index 8035974..e0dde66 100644 --- a/src/features/ai/AIHarness.tsx +++ b/src/features/ai/AIHarness.tsx @@ -1,18 +1,105 @@ -import React from 'react'; - -const AIHarness: React.FC = () => ( -
-

AI Harness

-
-
- AI agent ready to assist with TRIZ analysis and knowledge synthesis. +import React, { useState } from 'react'; + +const AIHarness: React.FC = () => { + const [activePanel, setActivePanel] = useState<'prompt' | 'context' | 'log' | 'artifacts'>('prompt'); + + return ( +
+
+
+

AI Harness

+ Experimental Lab +
+
+ + Local model unavailable. Configure provider in settings. +
+
+ +
+ + +
+ {activePanel === 'prompt' && ( +
+
+

System & User Prompt

+
+