From 90b561add06af222db9916e6541647e2cbf995a7 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Sun, 3 May 2026 19:45:24 -0700 Subject: [PATCH] canvas/TerminalTab: semantic status colors + accent Reconnect button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three small UIUX fixes for the workspace terminal status bar. 1. Status dots were hardcoded bg-green-500 / bg-yellow-500 / bg-red-500 / bg-zinc-500 — semantic-token misses. Switched to bg-good / bg-warm / bg-bad / bg-ink-soft so the colors flip with the canvas-wide ramp instead of pinning Tailwind raw values. 2. Reconnect button used hardcoded text-blue-400 / hover:text-blue-300 with no focus ring. Switched to text-accent / hover:text-accent-strong for theme parity, and added focus-visible:ring-accent/60 so keyboard users see where focus lands on a recovery action. 3. Error banner used text-red-400 — switched to text-bad to match the semantic ramp. Status-bar bg/border kept as zinc (terminal body stays dark unconditionally per the Canvas v4 design rule); only the chrome's foreground tokens needed semanticisation. Co-Authored-By: Claude Opus 4.7 (1M context) --- canvas/src/components/tabs/TerminalTab.tsx | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/canvas/src/components/tabs/TerminalTab.tsx b/canvas/src/components/tabs/TerminalTab.tsx index 835cface..1c2c2027 100644 --- a/canvas/src/components/tabs/TerminalTab.tsx +++ b/canvas/src/components/tabs/TerminalTab.tsx @@ -123,15 +123,18 @@ export function TerminalTab({ workspaceId }: Props) { return (
- {/* Status bar — role="status" so connection state changes are announced politely */} + {/* Status bar — role="status" so connection state changes are announced politely. + Terminal body stays dark unconditionally (Canvas v4 design rule), but the + chrome wrapping it now uses semantic status colors so the dot/text stay + readable in both themes. */}
- + {status === "connected" ? "Shell active" : status === "connecting" ? "Connecting..." : status === "error" ? "Connection failed" : "Disconnected"} @@ -139,8 +142,13 @@ export function TerminalTab({ workspaceId }: Props) {
{(status === "disconnected" || status === "error") && ( @@ -149,7 +157,7 @@ export function TerminalTab({ workspaceId }: Props) { {/* Error message — role="alert" announces immediately via assertive live region */} {errorMsg && ( -
+
{errorMsg}
)}