feat: deliverables 3-6 — cold start, simple mode UI, bridge tests, docs
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Deliverable 3 — Cold Start Flow: - New: use-cold-start.ts — cold start detection + greeting management - Default Chinese greeting for hospital admin users - Phase tracking: idle → greeting_sent → waiting_response → completed Deliverable 4 — Simple Mode UI: - New: uiModeStore.ts — 'simple'|'professional' mode with localStorage - New: SimpleTopBar.tsx — minimal top bar with mode toggle - Modified: App.tsx — dual layout rendering based on UI mode - Modified: ChatArea.tsx — compact prop hides advanced controls - Default: 'simple' mode for zero-barrier first experience Deliverable 5 — Tauri Bridge Integration Tests: - New: tauri-bridge.integration.test.ts — 14 test cases - Covers: cold start, chat flow, persistence, memory, butler, UI mode, e2e - 14/14 passing Deliverable 6 — Release Documentation: - New: installation-guide.md — user-facing install guide (Chinese, no jargon) - New: hospital-deployment.md — IT admin deployment guide (Docker, GPO, SCCM)
This commit is contained in:
@@ -27,6 +27,8 @@ import { useToast } from './components/ui/Toast';
|
||||
import type { Clone } from './store/agentStore';
|
||||
import { createLogger } from './lib/logger';
|
||||
import { startOfflineMonitor } from './store/offlineStore';
|
||||
import { useUIModeStore } from './store/uiModeStore';
|
||||
import { SimpleTopBar } from './components/SimpleTopBar';
|
||||
|
||||
const log = createLogger('App');
|
||||
|
||||
@@ -443,6 +445,33 @@ function App() {
|
||||
);
|
||||
}
|
||||
|
||||
const uiMode = useUIModeStore((s) => s.mode);
|
||||
|
||||
// Simple mode: single-column layout with top bar only
|
||||
if (uiMode === 'simple') {
|
||||
return (
|
||||
<div className="h-screen flex flex-col overflow-hidden text-gray-800 text-sm bg-white dark:bg-gray-950">
|
||||
<SimpleTopBar onToggleMode={() => useUIModeStore.getState().setMode('professional')} />
|
||||
<div className="flex-1 min-h-0">
|
||||
<ChatArea compact />
|
||||
</div>
|
||||
|
||||
{/* Hand Approval Modal (global) */}
|
||||
<HandApprovalModal
|
||||
handRun={pendingApprovalRun}
|
||||
isOpen={showApprovalModal}
|
||||
onApprove={handleApproveHand}
|
||||
onReject={handleRejectHand}
|
||||
onClose={handleCloseApprovalModal}
|
||||
/>
|
||||
|
||||
{/* Proposal Notifications Handler */}
|
||||
<ProposalNotificationHandler />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Professional mode: three-column layout (default)
|
||||
return (
|
||||
<div className="h-screen flex overflow-hidden text-gray-800 text-sm bg-white dark:bg-gray-950">
|
||||
{/* 左侧边栏 */}
|
||||
|
||||
Reference in New Issue
Block a user