From f73a7c22e40b7979be7bc768e18920a6217e27fe Mon Sep 17 00:00:00 2001 From: Zappy Date: Sat, 25 Apr 2026 14:41:13 +0100 Subject: [PATCH] style: refactor inline styles to utility classes in page.tsx --- frontend/src/app/globals.css | 62 ++++++++++++++++++++++++++++++++++++ frontend/src/app/page.tsx | 61 ++++++++--------------------------- 2 files changed, 75 insertions(+), 48 deletions(-) diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 230daba..efdb728 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -784,6 +784,7 @@ h2 { color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.3); } + /* ── Skeleton loaders ────────────────────────────────────────── */ .skeleton-shimmer { position: absolute; @@ -978,3 +979,64 @@ h2 { .error-retry-btn:hover { opacity: 0.85; } + +/* ── Refactored Utility Classes (Issue #35) ─────────────────── */ +.portfolio-subtitle { + margin-bottom: 2.5rem; +} + +.goal-title { + font-size: 1.25rem; + margin-bottom: 4px; +} + +.goal-subtitle { + font-size: 0.9rem; +} + +.goal-status-text { + font-size: 0.85rem; + font-weight: 600; + margin-top: 4px; +} + +.progress-stats { + display: flex; + justify-content: space-between; + font-size: 0.85rem; + color: var(--text-muted); + font-weight: 500; +} + +.allocation-title { + display: flex; + align-items: center; + gap: 8px; + font-size: 1.1rem; + margin-bottom: 1.25rem; + margin-top: 1rem; +} + +.chat-title { + margin: 0; + font-size: 1.25rem; +} + +.chat-status { + display: flex; + align-items: center; + gap: 6px; + font-size: 0.85rem; + color: var(--success); +} + +.proactive-label { + display: flex; + align-items: center; + gap: 6px; + font-size: 0.75rem; + color: var(--accent-primary); + margin-bottom: 4px; + font-weight: 600; + text-transform: uppercase; +} \ No newline at end of file diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 7f59317..cc2fb55 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -98,6 +98,7 @@ export default function Home() { timestamp: payload.timestamp, }; setMessages((prev) => [...prev, agentMsg]); + console.log("[App] Agent message received", payload.text); // Parse allocations if present const parsedAllocations = parseAllocationsFromMessage(payload.text); @@ -126,6 +127,7 @@ export default function Home() { // Register goal with notification server on mount useEffect(() => { if (wsConnected) { + console.log("[App] Registering goal..."); registerGoal({ currentBalance: goalData.currentBalance, targetAmount: goalData.targetAmount, @@ -148,6 +150,7 @@ export default function Home() { setMessages((prev) => [...prev, userMsg]); setInputState(""); setIsTyping(true); + console.log("[App] User sent message:", userMsg.text); // Mock agent response delay setTimeout(() => { @@ -185,7 +188,7 @@ export default function Home() { {/* Left Panel - Dashboard */}

Smasage Portfolio

-

+

Real-time on-chain tracking • Stellar Mainnet 🚀

@@ -207,18 +210,16 @@ export default function Home() {
-

+

European Vacation

-

+

Target: $18,000 by Aug 2026

Status: {goalStatus} @@ -236,15 +237,7 @@ export default function Home() { style={{ width: `${progress}%` }} >

-
+
68% Completed $5,550 Remaining
@@ -252,16 +245,7 @@ export default function Home() { )}
-

+

Active Strategy Routes

@@ -289,18 +273,10 @@ export default function Home() {
-

+

OpenClaw Agent

-
+
(
{msg.proactive && ( -
+
Proactive Nudge
)} @@ -365,4 +330,4 @@ export default function Home() { ); -} +} \ No newline at end of file