From ef4e51abcfffc6bafeecc7b02aafb8501124ad38 Mon Sep 17 00:00:00 2001 From: Willie Date: Wed, 11 Mar 2026 17:37:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20simplify=20remaining=20components?= =?UTF-8?q?=20=E2=80=94=20remove=20hand-drawn=20styling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace wobbly→radius, colors→palette, animate-sketch-in→animate-fade-in, animate-pulse-gentle→animate-pulse across Skeleton, Toast, ConfirmDialog, EmptyState, ErrorBoundary, StreamProgressBar, FilterTagInput, BlockStamp, RiskMeter, FileViewerModal, SkillPickerModal, HubManagerModal, InstallForm. Remove fontFamily overrides (now inherited from body), decoration="tape" props from Card, dashed borders, rotation transforms, and hard-coded shadows. BlockStamp simplified to clean inline-flex badge, no rotation. --- ui/src/components/ConfirmDialog.tsx | 18 ++++-------- ui/src/components/EmptyState.tsx | 3 +- ui/src/components/ErrorBoundary.tsx | 2 -- ui/src/components/FileViewerModal.tsx | 19 +++++------- ui/src/components/FilterTagInput.tsx | 10 +++---- ui/src/components/HubManagerModal.tsx | 32 +++++++------------- ui/src/components/InstallForm.tsx | 3 +- ui/src/components/Skeleton.tsx | 10 +++---- ui/src/components/SkillPickerModal.tsx | 33 +++++++-------------- ui/src/components/StreamProgressBar.tsx | 14 ++++----- ui/src/components/Toast.tsx | 9 +++--- ui/src/components/audit/BlockStamp.tsx | 39 +++++-------------------- ui/src/components/audit/RiskMeter.tsx | 10 +++---- 13 files changed, 69 insertions(+), 133 deletions(-) diff --git a/ui/src/components/ConfirmDialog.tsx b/ui/src/components/ConfirmDialog.tsx index 683a0507c..351940d79 100644 --- a/ui/src/components/ConfirmDialog.tsx +++ b/ui/src/components/ConfirmDialog.tsx @@ -1,7 +1,7 @@ import { useEffect, type ReactNode } from 'react'; import Card from './Card'; import HandButton from './HandButton'; -import { wobbly } from '../design'; +import { radius } from '../design'; import { useFocusTrap } from '../hooks/useFocusTrap'; interface ConfirmDialogProps { @@ -58,20 +58,14 @@ export default function ConfirmDialog({ {/* Dialog */}
- -

+ +

{title}

-
+
{message}
diff --git a/ui/src/components/EmptyState.tsx b/ui/src/components/EmptyState.tsx index b552172e0..6447ff23d 100644 --- a/ui/src/components/EmptyState.tsx +++ b/ui/src/components/EmptyState.tsx @@ -12,13 +12,12 @@ export default function EmptyState({ icon: Icon, title, description, action }: E return (

{title}

diff --git a/ui/src/components/ErrorBoundary.tsx b/ui/src/components/ErrorBoundary.tsx index 23e44d815..fc883aba3 100644 --- a/ui/src/components/ErrorBoundary.tsx +++ b/ui/src/components/ErrorBoundary.tsx @@ -28,13 +28,11 @@ export class ErrorBoundary extends Component {

Something went wrong

{this.state.error?.message || 'An unexpected error occurred.'}

diff --git a/ui/src/components/FileViewerModal.tsx b/ui/src/components/FileViewerModal.tsx index a8dd6b9c0..a2c595e8b 100644 --- a/ui/src/components/FileViewerModal.tsx +++ b/ui/src/components/FileViewerModal.tsx @@ -13,7 +13,7 @@ import CopyButton from './CopyButton'; import HandButton from './HandButton'; import { api, type SkillFileContent } from '../api/client'; import { handTheme } from '../lib/codemirror-theme'; -import { wobbly } from '../design'; +import { radius } from '../design'; interface FileViewerModalProps { skillName: string; @@ -74,15 +74,15 @@ export default function FileViewerModal({ skillName, filepath, sourcePath, onClo {/* Modal */}
- + {/* Header */}

{filepath} {loading && (
-

+

Loading...

@@ -111,7 +108,7 @@ export default function FileViewerModal({ skillName, filepath, sourcePath, onClo {error && (
-

+

{error}

diff --git a/ui/src/components/FilterTagInput.tsx b/ui/src/components/FilterTagInput.tsx index 0a4961d46..35ac4ac23 100644 --- a/ui/src/components/FilterTagInput.tsx +++ b/ui/src/components/FilterTagInput.tsx @@ -1,6 +1,6 @@ import { useState, useRef } from 'react'; import { X } from 'lucide-react'; -import { wobbly } from '../design'; +import { radius } from '../design'; interface FilterTagInputProps { label: string; @@ -38,20 +38,19 @@ export default function FilterTagInput({ label, patterns, onChange, color }: Fil
inputRef.current?.focus()} > {patterns.map((p, i) => ( {p}
diff --git a/ui/src/components/HubManagerModal.tsx b/ui/src/components/HubManagerModal.tsx index 2e3815943..e60c218d1 100644 --- a/ui/src/components/HubManagerModal.tsx +++ b/ui/src/components/HubManagerModal.tsx @@ -3,7 +3,7 @@ import { Plus, Trash2, Server } from 'lucide-react'; import Card from './Card'; import HandButton from './HandButton'; import { HandInput } from './HandInput'; -import { wobbly } from '../design'; +import { radius } from '../design'; export interface SavedHub { label: string; @@ -105,17 +105,14 @@ export default function HubManagerModal({ {/* Dialog */}
- + {/* Header */}
-

+

Manage Hubs

@@ -127,19 +124,13 @@ export default function HubManagerModal({
- + {hub.label} - + {hub.url}
@@ -181,11 +172,8 @@ export default function HubManagerModal({ )} {/* Add hub form */} -
-

+

+

Add Hub

diff --git a/ui/src/components/InstallForm.tsx b/ui/src/components/InstallForm.tsx index 9b0cc72bd..b3b049cda 100644 --- a/ui/src/components/InstallForm.tsx +++ b/ui/src/components/InstallForm.tsx @@ -304,7 +304,7 @@ export default function InstallForm({ }; const formContent = ( - +
setOpen(!open)} className="flex items-center gap-2 text-pencil-light hover:text-pencil transition-colors cursor-pointer mb-3" style={{ - fontFamily: 'var(--font-hand)', background: 'none', border: 'none', padding: 0, diff --git a/ui/src/components/Skeleton.tsx b/ui/src/components/Skeleton.tsx index bea9aae59..1dbf1f1c4 100644 --- a/ui/src/components/Skeleton.tsx +++ b/ui/src/components/Skeleton.tsx @@ -1,4 +1,4 @@ -import { wobbly } from '../design'; +import { radius } from '../design'; interface SkeletonProps { className?: string; @@ -6,7 +6,7 @@ interface SkeletonProps { } export default function Skeleton({ className = '', variant = 'text' }: SkeletonProps) { - const base = 'animate-pulse-gentle bg-muted'; + const base = 'animate-pulse bg-muted'; if (variant === 'circle') { return ( @@ -21,7 +21,7 @@ export default function Skeleton({ className = '', variant = 'text' }: SkeletonP return (
); } @@ -29,7 +29,7 @@ export default function Skeleton({ className = '', variant = 'text' }: SkeletonP return (
); } @@ -37,7 +37,7 @@ export default function Skeleton({ className = '', variant = 'text' }: SkeletonP /** A full loading skeleton for a page */ export function PageSkeleton() { return ( -
+
diff --git a/ui/src/components/SkillPickerModal.tsx b/ui/src/components/SkillPickerModal.tsx index de386d858..ebebcb501 100644 --- a/ui/src/components/SkillPickerModal.tsx +++ b/ui/src/components/SkillPickerModal.tsx @@ -3,7 +3,7 @@ import { Download, Search } from 'lucide-react'; import Card from './Card'; import HandButton from './HandButton'; import { HandCheckbox } from './HandInput'; -import { wobbly } from '../design'; +import { radius } from '../design'; import { useFocusTrap } from '../hooks/useFocusTrap'; import type { DiscoveredSkill } from '../api/client'; @@ -103,20 +103,14 @@ export default function SkillPickerModal({ {/* Dialog */}
- -

+ +

Select Skills to Install

-

+

{source}

@@ -133,10 +127,9 @@ export default function SkillPickerModal({ placeholder="Filter skills..." value={filter} onChange={(e) => setFilter(e.target.value)} - className="w-full pl-8 pr-3 py-1.5 text-sm border-2 border-muted bg-paper text-pencil placeholder:text-muted-dark outline-none focus:border-pencil-light" + className="w-full pl-8 pr-3 py-1.5 text-sm border-2 border-muted bg-paper text-pencil placeholder:text-muted-dark outline-none focus:border-pencil-light font-mono" style={{ - borderRadius: wobbly.sm, - fontFamily: "'Courier New', monospace", + borderRadius: radius.sm, }} />

@@ -166,17 +159,11 @@ export default function SkillPickerModal({ onChange={() => toggle(skill.path)} />
- + {skill.name} {skill.path !== '.' && skill.path !== skill.name && ( - + {skill.path} )} diff --git a/ui/src/components/StreamProgressBar.tsx b/ui/src/components/StreamProgressBar.tsx index 5cce41263..2d1f27a59 100644 --- a/ui/src/components/StreamProgressBar.tsx +++ b/ui/src/components/StreamProgressBar.tsx @@ -1,6 +1,6 @@ import type { LucideIcon } from 'lucide-react'; import Card from './Card'; -import { wobbly, colors } from '../design'; +import { radius, palette } from '../design'; interface StreamProgressBarProps { count: number; @@ -30,7 +30,7 @@ export default function StreamProgressBar({
- + {total > 0 ? labelRunning : labelDiscovering}
@@ -43,19 +43,19 @@ export default function StreamProgressBar({ {total > 0 && ( <>
-
+
{count} / {total} {units} {eta !== null && ~{eta}s remaining}
diff --git a/ui/src/components/Toast.tsx b/ui/src/components/Toast.tsx index f19e45a54..a69d8abb3 100644 --- a/ui/src/components/Toast.tsx +++ b/ui/src/components/Toast.tsx @@ -1,6 +1,6 @@ import { createContext, useContext, useState, useCallback, type ReactNode } from 'react'; import { X, CheckCircle, AlertTriangle, XCircle, Info } from 'lucide-react'; -import { wobbly } from '../design'; +import { radius, shadows } from '../design'; interface Toast { id: number; @@ -61,11 +61,10 @@ export function ToastProvider({ children }: { children: ReactNode }) { return (
diff --git a/ui/src/components/audit/BlockStamp.tsx b/ui/src/components/audit/BlockStamp.tsx index 58ec23376..47bdb3c80 100644 --- a/ui/src/components/audit/BlockStamp.tsx +++ b/ui/src/components/audit/BlockStamp.tsx @@ -1,42 +1,19 @@ import { ShieldOff, CircleCheck } from 'lucide-react'; -import { wobbly } from '../../design'; export default function BlockStamp({ isBlocked }: { isBlocked: boolean }) { if (isBlocked) { return ( -
- - - Blocked - -
+ + + Blocked + ); } return ( -
- - - Pass - -
+ + + Pass + ); } diff --git a/ui/src/components/audit/RiskMeter.tsx b/ui/src/components/audit/RiskMeter.tsx index db52ac6bc..b29a3c9c7 100644 --- a/ui/src/components/audit/RiskMeter.tsx +++ b/ui/src/components/audit/RiskMeter.tsx @@ -1,4 +1,4 @@ -import { wobbly } from '../../design'; +import { radius } from '../../design'; import { riskColor, riskBgColor } from './helpers'; export default function RiskMeter({ riskLabel, riskScore }: { riskLabel: string; riskScore: number }) { @@ -6,20 +6,20 @@ export default function RiskMeter({ riskLabel, riskScore }: { riskLabel: string; return (
- + Risk {riskLabel.toUpperCase()}