From 0770d88815686a445cc8fd865320c6d7528aa63b Mon Sep 17 00:00:00 2001
From: Ajax Davis
Date: Fri, 16 Jan 2026 08:51:31 +1000
Subject: [PATCH] refactor(web): replace raw HTML with design system components
- Replace raw with Label component in auth pages, profile settings, tool-ideas
- Replace raw with Button in CopyButton, CopyDropdown, ExecutorConfigPanel, PackageManagerSelector, ToolPlayground
- Replace raw
@@ -101,9 +103,7 @@ export default function ForgotPasswordPage() {
)}
-
- Email
-
+
Email
-
- Name
-
+
Name
-
- Username
-
+
Username
@
@@ -245,9 +242,7 @@ export default function SignUpPage() {
-
- Email
-
+
Email
-
- Password
-
+
Password
-
- Display Name
-
+
Display Name
-
- Username
-
+
Username
@
@@ -292,9 +289,7 @@ function ProfileSettingsContent({ isSetupMode }: { isSetupMode: boolean }): Reac
{/* Email (read-only) */}
-
- Email
-
+
Email
-
- Error warning icon
-
-
+
Something went wrong
diff --git a/apps/web/src/app/tool-ideas/ToolIdeasClient.tsx b/apps/web/src/app/tool-ideas/ToolIdeasClient.tsx
index 559e002..85f7c2c 100644
--- a/apps/web/src/app/tool-ideas/ToolIdeasClient.tsx
+++ b/apps/web/src/app/tool-ideas/ToolIdeasClient.tsx
@@ -3,6 +3,7 @@
import { Badge } from '@tpmjs/ui/Badge/Badge';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@tpmjs/ui/Card/Card';
import { Input } from '@tpmjs/ui/Input/Input';
+import { Label } from '@tpmjs/ui/Label/Label';
import { ProgressBar } from '@tpmjs/ui/ProgressBar/ProgressBar';
import { Select } from '@tpmjs/ui/Select/Select';
import { Spinner } from '@tpmjs/ui/Spinner/Spinner';
@@ -99,9 +100,9 @@ export function ToolIdeasClient() {
}, [fetchTools]);
const qualityColor = (score: number) => {
- if (score >= 0.9) return 'text-green-600';
- if (score >= 0.7) return 'text-yellow-600';
- return 'text-red-600';
+ if (score >= 0.9) return 'text-success';
+ if (score >= 0.7) return 'text-warning';
+ return 'text-error';
};
const ToolCard = ({ tool }: { tool: ToolIdea }) => {
@@ -227,12 +228,7 @@ export function ToolIdeasClient() {
{/* Filters */}
-
- Search
-
+
Search
-
- Category
-
+
Category
-
- Verb
-
+
Verb
-
- Min Quality
-
+
Min Quality
{label && {label} }
-
+
);
}
diff --git a/apps/web/src/components/CopyDropdown.tsx b/apps/web/src/components/CopyDropdown.tsx
index 49fd47d..67bcaed 100644
--- a/apps/web/src/components/CopyDropdown.tsx
+++ b/apps/web/src/components/CopyDropdown.tsx
@@ -1,5 +1,6 @@
'use client';
+import { Button } from '@tpmjs/ui/Button/Button';
import { Icon } from '@tpmjs/ui/Icon/Icon';
import { useCallback, useEffect, useRef, useState } from 'react';
import { toast } from 'sonner';
@@ -46,10 +47,11 @@ export function CopyDropdown({
return (
-
setIsOpen(!isOpen)}
- className="inline-flex items-center gap-1 px-2 py-1 text-xs text-foreground-secondary hover:text-foreground hover:bg-surface rounded transition-colors"
+ className="inline-flex items-center gap-1 text-xs text-foreground-secondary hover:text-foreground"
>
{buttonLabel}
@@ -58,24 +60,26 @@ export function CopyDropdown({
size="xs"
className={`transition-transform ${isOpen ? 'rotate-180' : ''}`}
/>
-
+
{isOpen && (
{options.map((option) => (
-
handleCopy(option)}
- className="w-full px-3 py-2 text-left text-sm hover:bg-surface transition-colors"
+ className="w-full px-3 py-2 h-auto text-left justify-start hover:bg-surface"
>
- {option.label}
- {option.description && (
-
- {option.description}
-
- )}
-
+
+
{option.label}
+ {option.description && (
+
+ {option.description}
+
+ )}
+
+
))}
)}
diff --git a/apps/web/src/components/ExecutorConfigPanel.tsx b/apps/web/src/components/ExecutorConfigPanel.tsx
index 2985444..85869ad 100644
--- a/apps/web/src/components/ExecutorConfigPanel.tsx
+++ b/apps/web/src/components/ExecutorConfigPanel.tsx
@@ -142,67 +142,71 @@ export function ExecutorConfigPanel({
{/* Executor Type Selection */}
-
handleTypeChange('default')}
disabled={disabled}
- className={`flex-1 p-3 rounded-lg border-2 text-left transition-colors ${
+ className={`flex-1 p-3 h-auto rounded-lg border-2 text-left justify-start transition-colors ${
executorType === 'default'
? 'border-primary bg-primary/5'
: 'border-border hover:border-foreground-secondary'
- } ${disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'}`}
+ }`}
>
-
-
- {executorType === 'default' && (
-
- )}
+
+
+
+ {executorType === 'default' && (
+
+ )}
+
+
TPMJS Default
-
TPMJS Default
+
+ Free, managed executor hosted by TPMJS
+
-
- Free, managed executor hosted by TPMJS
-
-
+
-
handleTypeChange('custom_url')}
disabled={disabled}
- className={`flex-1 p-3 rounded-lg border-2 text-left transition-colors ${
+ className={`flex-1 p-3 h-auto rounded-lg border-2 text-left justify-start transition-colors ${
executorType === 'custom_url'
? 'border-primary bg-primary/5'
: 'border-border hover:border-foreground-secondary'
- } ${disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer'}`}
+ }`}
>
-
-
- {executorType === 'custom_url' && (
-
- )}
+
+
+
+ {executorType === 'custom_url' && (
+
+ )}
+
+
Custom Executor
-
Custom Executor
+
+ Self-hosted executor on your infrastructure
+
-
- Self-hosted executor on your infrastructure
-
-
+
{/* Custom URL Configuration */}
diff --git a/apps/web/src/components/PackageManagerSelector.tsx b/apps/web/src/components/PackageManagerSelector.tsx
index 2bb5cfb..ce44360 100644
--- a/apps/web/src/components/PackageManagerSelector.tsx
+++ b/apps/web/src/components/PackageManagerSelector.tsx
@@ -1,5 +1,6 @@
'use client';
+import { Button } from '@tpmjs/ui/Button/Button';
import { useCallback, useEffect, useState } from 'react';
export type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun';
@@ -59,18 +60,19 @@ export function PackageManagerSelector({
Package Manager:
{packageManagers.map((pm) => (
- handleSelect(pm.id)}
- className={`px-3 py-1.5 text-xs font-medium transition-colors ${
+ className={`px-3 py-1.5 text-xs font-medium rounded-none ${
selected === pm.id
- ? 'bg-primary text-primary-foreground'
+ ? ''
: 'bg-background text-foreground-secondary hover:bg-surface hover:text-foreground'
}`}
>
{pm.label}
-
+
))}
diff --git a/apps/web/src/components/ToolPlayground.tsx b/apps/web/src/components/ToolPlayground.tsx
index b59986e..15031fd 100644
--- a/apps/web/src/components/ToolPlayground.tsx
+++ b/apps/web/src/components/ToolPlayground.tsx
@@ -7,7 +7,10 @@
import type { TokenBreakdown as TokenData } from '@/lib/ai-agent/tool-executor-agent';
import type { Package, Tool } from '@tpmjs/db';
+import { Button } from '@tpmjs/ui/Button/Button';
+import { Label } from '@tpmjs/ui/Label/Label';
import { Spinner } from '@tpmjs/ui/Spinner/Spinner';
+import { Textarea } from '@tpmjs/ui/Textarea/Textarea';
import { useState } from 'react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
@@ -211,11 +214,11 @@ export function ToolPlayground({ tool }: ToolPlaygroundProps): React.ReactElemen
{tabs.map((tab) => (
- setActiveTab(tab.id)}
- className={`px-4 py-3 text-sm font-medium transition-colors relative ${
+ className={`px-4 py-3 rounded-none text-sm font-medium transition-colors relative ${
activeTab === tab.id
? 'text-foreground border-b-2 border-primary'
: 'text-foreground-secondary hover:text-foreground'
@@ -227,7 +230,7 @@ export function ToolPlayground({ tool }: ToolPlaygroundProps): React.ReactElemen
{tab.badge}
)}
-
+
))}
@@ -237,15 +240,14 @@ export function ToolPlayground({ tool }: ToolPlaygroundProps): React.ReactElemen
{activeTab === 'input' && (
-
- {isExecuting ? (
-
-
- Executing...
-
- ) : (
- 'Execute'
- )}
-
+ {isExecuting ? 'Executing...' : 'Execute'}
+
)}