From 94ce743bd03a950eed2505b148d66cd686ce6770 Mon Sep 17 00:00:00 2001 From: Saravana Achu Mac Date: Sat, 9 May 2026 12:56:52 -0700 Subject: [PATCH] refactor(ui): replace one-off visual language with shared Badge components - Replace .stat-chip with Badge in PresetMarketplace, BacktestTab, MembershipTab - Replace .saved-setup-id-chip with Badge in SimpleView - Replace .screener-sector-chip with Badge in ScreenerView - Replace .health-pill with Badge in TradeProfileManager - Remove CSS definitions for one-off classes from index.css - All components now use shared Badge from product adapter - Verify: audit:ui (0 findings), audit:ui:strict (0 findings), typecheck, build --- .../UI_UX_PLATFORM_CORE_MIGRATION_ROADMAP.md | 0 .../LAUNCH_READY_UI_UX_ROADMAP.md | 0 ...PRODUCTION_GRADE_UX_REMEDIATION_ROADMAP.md | 0 web/src/components/PresetMarketplace.tsx | 5 ++- web/src/components/TradeProfileManager.tsx | 15 ++++---- web/src/index.css | 38 ------------------- web/src/tabs/BacktestTab.tsx | 17 +++++---- web/src/tabs/MembershipTab.tsx | 15 ++++---- web/src/views/ScreenerView.tsx | 12 +++--- web/src/views/SimpleView.tsx | 22 +++-------- 10 files changed, 37 insertions(+), 87 deletions(-) rename docs/{ => completed}/UI_UX_PLATFORM_CORE_MIGRATION_ROADMAP.md (100%) rename docs/{ => inprogress}/LAUNCH_READY_UI_UX_ROADMAP.md (100%) rename docs/{ => inprogress}/PRODUCTION_GRADE_UX_REMEDIATION_ROADMAP.md (100%) diff --git a/docs/UI_UX_PLATFORM_CORE_MIGRATION_ROADMAP.md b/docs/completed/UI_UX_PLATFORM_CORE_MIGRATION_ROADMAP.md similarity index 100% rename from docs/UI_UX_PLATFORM_CORE_MIGRATION_ROADMAP.md rename to docs/completed/UI_UX_PLATFORM_CORE_MIGRATION_ROADMAP.md diff --git a/docs/LAUNCH_READY_UI_UX_ROADMAP.md b/docs/inprogress/LAUNCH_READY_UI_UX_ROADMAP.md similarity index 100% rename from docs/LAUNCH_READY_UI_UX_ROADMAP.md rename to docs/inprogress/LAUNCH_READY_UI_UX_ROADMAP.md diff --git a/docs/PRODUCTION_GRADE_UX_REMEDIATION_ROADMAP.md b/docs/inprogress/PRODUCTION_GRADE_UX_REMEDIATION_ROADMAP.md similarity index 100% rename from docs/PRODUCTION_GRADE_UX_REMEDIATION_ROADMAP.md rename to docs/inprogress/PRODUCTION_GRADE_UX_REMEDIATION_ROADMAP.md diff --git a/web/src/components/PresetMarketplace.tsx b/web/src/components/PresetMarketplace.tsx index 9ee662b..2fe879d 100644 --- a/web/src/components/PresetMarketplace.tsx +++ b/web/src/components/PresetMarketplace.tsx @@ -19,6 +19,7 @@ import { STRATEGY_PRESETS } from '../lib/PresetRegistry'; import { Button } from './ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from './ui/card'; import { PageHeader } from './ui/page-header'; +import { Badge } from './ui/Primitives'; interface PresetMarketplaceProps { onSelect: (preset: StrategyPreset) => void; @@ -74,7 +75,7 @@ const StrategyMarketplaceCard: React.FC<{ -
V{index + 1}.4
+ V{index + 1}.4
@@ -185,7 +186,7 @@ export const PresetMarketplace: React.FC = ({ onSelect, description="Browse reusable strategy profiles with preconfigured risk posture and execution bias." />
-
{allPresets.length} presets
+ {allPresets.length} presets {onClose ? (
- Capital: {capitalHealth} + Capital: {capitalHealth} {botState.accountSnapshot && ( - + LP: {coverageStatus} - + )} - Lifecycle: {lifecycleStatus} - Reconciliation: {reconciliationDrift} - Locks: {lockStatus} + Lifecycle: {lifecycleStatus} + Reconciliation: {reconciliationDrift} + Locks: {lockStatus}
{/* Win rate section */} diff --git a/web/src/index.css b/web/src/index.css index b49a878..e4e5aa3 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -1080,26 +1080,6 @@ body { box-shadow: var(--card-shadow); } -.stat-chip { - display: inline-flex; - align-items: center; - gap: 8px; - padding: 6px 12px; - border-radius: 999px; - border: 1px solid var(--border); - background: var(--card-elevated); - color: var(--muted-foreground); - font-size: 11px; - font-weight: 700; -} - -.stat-chip[data-tone="success"] { - color: #16a34a; -} - -.stat-chip[data-tone="danger"] { - color: #dc2626; -} .trading-sidebar-nav { flex: 1; @@ -2238,11 +2218,6 @@ body { white-space: nowrap; } -.saved-setup-id-chip, -.saved-setup-updated { - text-transform: none !important; - letter-spacing: 0 !important; -} .saved-setup-timeline { display: grid; @@ -2332,19 +2307,6 @@ body { gap: 7px; } -.screener-sector-chip { - min-height: 32px !important; - border-radius: 999px !important; - padding: 0 12px !important; - font-size: 11px !important; - font-weight: 700 !important; -} - -.screener-sector-chip[data-active="true"] { - border-color: var(--accent) !important; - background: var(--accent-soft) !important; - color: var(--accent) !important; -} .screener-more-select { width: 150px; diff --git a/web/src/tabs/BacktestTab.tsx b/web/src/tabs/BacktestTab.tsx index 2a2c4cc..0c64b96 100644 --- a/web/src/tabs/BacktestTab.tsx +++ b/web/src/tabs/BacktestTab.tsx @@ -7,6 +7,7 @@ import { fetchTradeProfiles } from '../lib/profileApi'; import { PageHeader } from '../components/ui/page-header'; import { Card, CardContent } from '../components/ui/card'; import { Button } from '../components/ui/button'; +import { Badge } from '../components/ui/Primitives'; import { Select } from '../components/ui/select'; interface BacktestTabProps { @@ -84,18 +85,18 @@ export const BacktestTab: React.FC = ({ previewAsCustomer = fa
- + Role: {isAdminAccount ? 'admin' : 'customer'} - - + + Preview Mode: {previewAsCustomer ? 'customer view' : 'off'} - - + + ENABLE_BACKTEST: {String(runtimeFlags.enableBacktest)} - - + + BACKTEST_CUSTOMER_ENABLED: {String(runtimeFlags.customerEnabled)} - +
{!backtestGateLoading && !backtestEnabled && (

diff --git a/web/src/tabs/MembershipTab.tsx b/web/src/tabs/MembershipTab.tsx index 47464e3..0106b7a 100644 --- a/web/src/tabs/MembershipTab.tsx +++ b/web/src/tabs/MembershipTab.tsx @@ -15,6 +15,7 @@ import { TIER_POLICIES } from '../lib/TierPolicy'; import { PageHeader } from '../components/ui/page-header'; import { Card, CardContent } from '../components/ui/card'; import { Button } from '../components/ui/button'; +import { Badge } from '../components/ui/Primitives'; const PlanCard: React.FC<{ id: string; @@ -66,9 +67,9 @@ const PlanCard: React.FC<{

{isElite && ( - + Peak - + )} @@ -77,10 +78,10 @@ const PlanCard: React.FC<{

{price}

/mo -
+ Professional grade DNA -
+

{ />

- 3 tiers - Preview pricing - Product direction only + 3 tiers + Preview pricing + Product direction only
{SECTORS.slice(0, 6).map(s => ( - + ))}