From 63f17bf40ecefa4e4184340a0a0e49055faed51a Mon Sep 17 00:00:00 2001
From: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Date: Sun, 10 May 2026 09:31:46 +0000
Subject: [PATCH] refactor(web): use @bytelyst/ui CardButton primitive (UI
audit #9)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Now that @bytelyst/ui@0.1.6 ships , replace the local
`.card-button` className shim (added to layout-fixes.css §25 in the
prior commit) with the real primitive.
Conversions:
- components/StrategyWizard.tsx — risk style (3 cards) + hours pickers
- views/SimpleView.tsx — new-buy + manage-holding plan cards
- tabs/MyStrategiesTab.tsx — diagnostic accordion toggle
Removes layout-fixes.css §25 (.card-button) — no longer needed.
Updates docs/ui/UI_AUDIT.md Pattern A to reflect that the design-system
fix has shipped.
Generated with [Devin](https://cli.devin.ai/docs)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
---
docs/ui/UI_AUDIT.md | 2 +-
web/src/components/StrategyWizard.tsx | 15 ++++++-------
web/src/layout-fixes.css | 32 ---------------------------
web/src/tabs/MyStrategiesTab.tsx | 7 +++---
web/src/views/SimpleView.tsx | 15 ++++++-------
5 files changed, 18 insertions(+), 53 deletions(-)
diff --git a/docs/ui/UI_AUDIT.md b/docs/ui/UI_AUDIT.md
index d1b407a..5c73f26 100644
--- a/docs/ui/UI_AUDIT.md
+++ b/docs/ui/UI_AUDIT.md
@@ -76,7 +76,7 @@ So a Button intended as a "card-style action" (e.g. a title above a prompt) will
grep -rEn '
{/* 6. Action */}
diff --git a/web/src/views/SimpleView.tsx b/web/src/views/SimpleView.tsx
index 5525f42..831dba4 100644
--- a/web/src/views/SimpleView.tsx
+++ b/web/src/views/SimpleView.tsx
@@ -24,6 +24,7 @@ import {
type TriggerMode,
} from './tradePlansState';
import { useTradePlansNavigationState } from './useTradePlansNavigationState';
+import { CardButton } from '@bytelyst/ui';
type SimpleHolding = {
symbol: string;
@@ -1006,14 +1007,13 @@ export function SimpleView() {
-
{
dispatch({ type: 'clear-feedback' });
dispatch({ type: 'set-selected-holding-trade-id', value: null });
updateDraft('side', 'buy');
}}
- className={`card-button h-auto justify-start rounded-[1.25rem] border px-5 py-5 text-left transition ${
+ className={`h-auto justify-start rounded-[1.25rem] border px-5 py-5 text-left transition ${
draft.side === 'buy'
? 'border-[var(--primary)] bg-[var(--accent-soft)]'
: 'border-[var(--border)] bg-[var(--card-elevated)]'
@@ -1023,9 +1023,8 @@ export function SimpleView() {
New short-term buy plan
Arm a dip-buy trigger and let the app manage the profit exit after fill.
-
-
+ {
dispatch({ type: 'clear-feedback' });
if (availableSellHoldings.length > 0) {
@@ -1034,7 +1033,7 @@ export function SimpleView() {
updateDraft('side', 'sell');
}
}}
- className={`card-button h-auto justify-start rounded-[1.25rem] border px-5 py-5 text-left transition ${
+ className={`h-auto justify-start rounded-[1.25rem] border px-5 py-5 text-left transition ${
draft.side === 'sell'
? 'border-[var(--primary)] bg-[var(--accent-soft)]'
: 'border-[var(--border)] bg-[var(--card-elevated)]'
@@ -1044,7 +1043,7 @@ export function SimpleView() {
Manage an existing holding
Choose a filled holding and place it back under managed profit-taking.
-
+