chore(desktop): drop unreferenced StatusBar and prototype mock data

Neither is imported anywhere. `src/mocks/data.ts` is scaffolding from before the
server existed ("Replace with real API calls once server integration is done"),
and it was still being maintained as recently as 29b17c802, which refreshed the
model list inside a file nothing reads. StatusBar.tsx has had no consumer since
the c712f5285 UI redesign; its only remaining mention was `mockStatusBar` in the
dead mock file.

--statusbar-height goes with them: StatusBar was its sole reader.
This commit is contained in:
程序员阿江(Relakkes)
2026-08-04 12:44:30 +08:00
parent 725914e9f1
commit 33df50b9c5
3 changed files with 0 additions and 239 deletions
@@ -1,36 +0,0 @@
import { useSettingsStore } from '../../stores/settingsStore'
import { useSessionStore } from '../../stores/sessionStore'
import { useSessionRuntimeStore } from '../../stores/sessionRuntimeStore'
import { useTabStore } from '../../stores/tabStore'
export function StatusBar() {
const { currentModel } = useSettingsStore()
const activeTabId = useTabStore((s) => s.activeTabId)
const runtimeSelection = useSessionRuntimeStore((s) =>
activeTabId ? s.selections[activeTabId] : undefined,
)
const projectPath = useSessionStore((s) => s.sessions.find((session) => session.id === activeTabId)?.projectPath)
const projectName = projectPath
? projectPath.split('-').filter(Boolean).pop() || ''
: ''
const modelLabel = runtimeSelection?.modelId ?? currentModel?.name ?? null
return (
<div className="flex h-[var(--statusbar-height)] select-none items-center justify-between border-t border-[var(--color-border)] bg-[var(--color-surface-sidebar)] px-4 text-[11px]">
<div className="flex min-w-0 items-center gap-3">
{projectName && (
<span className="truncate font-mono text-[var(--color-text-secondary)]">{projectName}</span>
)}
</div>
<div className="flex min-w-0 items-center gap-4">
{modelLabel && (
<span className="truncate font-mono text-[var(--color-text-tertiary)]">
{modelLabel}
</span>
)}
</div>
</div>
)
}
-202
View File
@@ -1,202 +0,0 @@
/**
* Mock data for all pages — matches the UI prototypes exactly.
* Replace with real API calls once server integration is done.
*/
// ─── Sessions ─────────────────────────────────────────────────────
export const mockSessions = {
today: [
{ id: 's1', title: 'Refactor login flow', modifiedAt: new Date().toISOString() },
{ id: 's2', title: 'Fix CSS responsive layout', modifiedAt: new Date().toISOString() },
],
previous7Days: [
{ id: 's3', title: 'Add user authentication', modifiedAt: new Date(Date.now() - 3 * 86400000).toISOString() },
{ id: 's4', title: 'Database migration script', modifiedAt: new Date(Date.now() - 5 * 86400000).toISOString() },
],
older: [
{ id: 's5', title: 'Initial project setup', modifiedAt: new Date(Date.now() - 30 * 86400000).toISOString() },
],
}
// ─── Active Session Messages ──────────────────────────────────────
export const mockActiveMessages = [
{
id: 'm1',
role: 'user' as const,
content: "I want to refactor the login flow in `auth.ts`. Let's move the JWT signing logic to a separate helper and add validation for the user payload.",
},
{
id: 'm2',
role: 'assistant' as const,
content: "Understood. I will begin by analyzing the current implementation of `auth.ts`. I'll extract the JWT logic into a new utility function and implement the validation layer as requested.",
thinking: "Looking at the auth.ts file, the JWT signing is currently inline in the login handler. I need to:\n1. Extract signToken() helper\n2. Add Zod validation for LoginPayload\n3. Update the handler to use both",
},
{
id: 'm3',
role: 'tool' as const,
toolName: 'edit_file',
toolStatus: 'success',
filePath: 'src/lib/auth.ts',
content: `export const validatePayload = (user) => { ... }
export const signToken = (payload) => jwt.sign(payload, SECRET);
// 8 OLD LINES REMOVED`,
},
]
// ─── Agent Teams ──────────────────────────────────────────────────
export const mockTeam = {
name: 'session-dev',
memberCount: 4,
members: [
{ id: 'a1', role: 'Architect', status: 'completed' as const, color: '#16a34a' },
{ id: 'a2', role: 'Frontend Dev', status: 'running' as const, color: '#dc2626' },
{ id: 'a3', role: 'Backend Dev', status: 'running' as const, color: '#2563eb' },
{ id: 'a4', role: 'Tester', status: 'idle' as const, color: '#9333ea' },
],
}
export const mockTeamMessages = {
userMessage: "Refactor the authentication middleware to support JWT and OAuth2 simultaneously. Ensure we have proper test coverage for the edge cases.",
assistantMessage: "I've initiated the agent team for this task. The architect is designing the interface, while the developers are preparing the boilerplate for the new strategies.",
systemInfo: `Info: spawning child_processes for parallel development
active: session-dev cluster initiated
ready: 4 agents assigned`,
}
// ─── Agent Transcript ─────────────────────────────────────────────
export const mockTranscript = {
agentName: 'Frontend Dev',
messages: [
{
id: 't1',
role: 'agent' as const,
timestamp: 'P1:42:11',
content: "I've analyzed the component structure. I need to update the `Navigation.tsx` to include the new responsive breakpoints. Initiating local file system audit.",
},
{
id: 't2',
role: 'tool' as const,
toolName: 'BASH',
status: 'SUCCESS' as const,
command: '$ grep -r "breakpoint" .\n./Navigation.tsx: const [isMobile, setIsMobile] = useState(false);\n./Navigation.tsx: // TODO: Add mobile breakpoint check\n./Header.tsx: @media (max-width: 768px) {',
},
{
id: 't3',
role: 'progress' as const,
label: 'Patching Navigation.tsx',
progress: 67,
},
{
id: 't4',
role: 'agent' as const,
timestamp: 'P1:44:35',
content: "Breakpoint logic implemented. I'm now verifying the CSS-in-JS injection to ensure no style collisions with the existing theme.",
images: ['/placeholder-code-1.jpg', '/placeholder-code-2.jpg'],
},
],
teamBar: [
{ id: 'lead', role: 'Lead Claude', active: false, color: '#87736D' },
{ id: 'a2', role: 'Frontend Dev', active: true, color: '#dc2626' },
{ id: 'a3', role: 'Backend Architect', active: false, color: '#2563eb' },
],
}
// ─── Scheduled Tasks ──────────────────────────────────────────────
export const mockScheduledTasks = {
stats: {
totalTasks: 12,
activeHealthy: 9,
nextRun: { name: 'Nightly linting', time: 'Today, 11:30 PM' },
systemHealth: 99.8,
healthPeriod: 'Last 30 days execution rate',
},
tasks: [
{
id: 'task1',
name: 'Nightly linting',
frequency: 'Daily',
lastResult: 'Success' as const,
nextExecution: 'Today, 11:30 PM',
},
{
id: 'task2',
name: 'Clean up temp files',
description: 'Clean TempOutput/**',
frequency: 'Weekly',
lastResult: 'Success' as const,
nextExecution: 'Sun, 2:00 AM',
},
{
id: 'task3',
name: 'Database Vacuum',
description: 'Postgres maintenance',
frequency: 'Monthly',
lastResult: 'Failed (Disk Full)' as const,
nextExecution: 'Dec 01, 9:01 AM',
},
],
}
// ─── Session Controls ─────────────────────────────────────────────
export const mockPermissionModes = [
{ id: 'ask', label: 'Ask permissions', description: 'Confirm every file edit or terminal command.', icon: 'lock' },
{ id: 'auto', label: 'Auto accept edits', description: 'Claude writes to disk without asking.', icon: 'edit_note' },
{ id: 'plan', label: 'Plan mode', description: 'Architecture & reasoning only. No writes.', icon: 'architecture' },
{ id: 'bypass', label: 'Bypass permissions', description: 'Full root access for shell and file system.', icon: 'warning' },
]
export const mockModels = [
{ id: 'fable', name: 'Fable 5', active: false },
{ id: 'opus', name: 'Opus 4.8', active: true },
{ id: 'sonnet', name: 'Sonnet 5', active: false },
{ id: 'haiku', name: 'Haiku 4.5', active: false },
]
export const mockEffortLevels = ['Low', 'Medium', 'High', 'Max']
// ─── Tool Inspection (edit_file diff) ─────────────────────────────
export const mockToolInspection = {
toolType: 'TOOL CALL',
toolName: 'edit_file',
description: 'Updating login logic to use new SDK',
filePath: 'src/lib/auth.ts',
dryRunStatus: 'Dry-run Success',
linesChanged: { added: 12, removed: 8 },
diffLines: [
{ type: 'context' as const, lineNo: 1, content: 'export async function loginCredentials: LoginCredentials): Promise<LoginResponse> {' },
{ type: 'context' as const, lineNo: 2, content: ' try {' },
{ type: 'removed' as const, lineNo: 3, content: ' const response = await legacyHttpClient.authenticate()' },
{ type: 'added' as const, lineNo: 3, content: ' const response = await httpClient.authenticate({' },
{ type: 'added' as const, lineNo: 4, content: ' user: credentials.username,' },
{ type: 'added' as const, lineNo: 5, content: ' pass: credentials.password,' },
{ type: 'context' as const, lineNo: 6, content: ' })' },
{ type: 'context' as const, lineNo: 7, content: '' },
{ type: 'removed' as const, lineNo: 8, content: ' const client = await createClient();' },
{ type: 'added' as const, lineNo: 8, content: ' const client = await newSdkClient.create({' },
{ type: 'added' as const, lineNo: 9, content: ' identifier: credentials.username,' },
{ type: 'added' as const, lineNo: 10, content: ' secret: credentials.password,' },
{ type: 'context' as const, lineNo: 11, content: '' },
{ type: 'added' as const, lineNo: 12, content: ' options: { persistent: true }' },
{ type: 'context' as const, lineNo: 13, content: ' })' },
{ type: 'context' as const, lineNo: 14, content: '' },
{ type: 'context' as const, lineNo: 15, content: ' if (response.status === 200) {' },
{ type: 'context' as const, lineNo: 16, content: ' return response.data;' },
],
}
// ─── New Task Modal ───────────────────────────────────────────────
export const mockNewTaskDefaults = {
models: ['Claude 3.5 Sonnet', 'Claude 3.5 Haiku', 'Claude 3.5 Opus'],
frequencies: ['Hourly', 'Daily at 9:00 AM', 'Weekly', 'Monthly', 'Custom cron'],
}
// ─── Footer / Status Bar ──────────────────────────────────────────
export const mockStatusBar = {
user: 'User Avatar',
username: 'username',
plan: 'Pro Plan',
branch: 'main-branch',
worktreeToggle: 'worktree-toggle',
localSwitch: 'local-switch',
status: 'Ready',
}
-1
View File
@@ -1015,7 +1015,6 @@
--sidebar-width: 280px;
--sidebar-rail-width: 72px;
--titlebar-height: 52px;
--statusbar-height: 36px;
--motion-sidebar-duration: 280ms;
--motion-sidebar-easing: cubic-bezier(0.22, 1, 0.36, 1);