refactor(dashboard): extract Settings, Memory, Auth, and Model Presets from styles.css
Sweep 3 of the styles.css split. Five settings-related blocks moved out of the monolith into a single co-located SettingsModal.css. styles.css 3304 → 2509 (–795 lines). Blocks moved: - /* === Settings Layout === */ (194 lines) - /* === Notifications Settings === */ (28 lines) - /* === Memory Settings === */ (112 lines) - /* === Auth Provider Cards === */ + /* === Provider Connection Status === */ (165 lines combined) - /* === Settings: Model Presets === */ (93 lines) - Settings lane badges + descriptions (~27 lines) Mobile @media rules whose selectors matched the moved blocks were also migrated into SettingsModal.css's mobile block. Kept global with documented reasons: - .auth-status-badge (and color modifiers) — consumed outside settings by ModelOnboardingModal and ClaudeCliProviderCard. - .settings-empty-state, .settings-muted, .settings-loading — broad reuse across BackendConnectionErrorPage, PluginManager, MemoryView etc. Cross-component imports added: MemoryView.tsx and ModelOnboardingModal.tsx now import SettingsModal.css to reach memory-* / auth-provider-card classes they consume. Test: settings-mobile.test.tsx had two assertions that incorrectly matched literal pixel values; updated to the actual var(--space-*) token values present in the rules. Verified live in browser (settings + memory tabs render cleanly). styles.css total reduction across the three sweeps: 4551 → 2509 (–45%). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useState, useMemo, useCallback, useEffect } from "react";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import "./MemoryView.css";
|
||||
import "./SettingsModal.css";
|
||||
import type { MemoryFileInfo, MemoryRetrievalTestResult } from "../api";
|
||||
import { FileEditor } from "./FileEditor";
|
||||
import { useMemoryData } from "../hooks/useMemoryData";
|
||||
|
||||
Reference in New Issue
Block a user