From 16ad941a1ec546ee908e09cae49511d35e2e8780 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Sun, 3 May 2026 22:01:18 -0700 Subject: [PATCH] canvas/{Details,Config,Activity}Tab: button hover sweep across 6 buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Six button fixes — same trap patterns shipped on every other tab: DetailsTab: - Save button: bg-accent-strong hover:bg-accent (LIGHTER on white text, AA drop) → bg-accent hover:bg-accent-strong + focus-visible ring. - Confirm Delete: bg-red-600 hover:bg-red-500 (LIGHTER on white text, AA drop) → bg-red-700 + focus-visible danger ring. - Cancel: bg-surface-card hover:bg-surface-card (no-op) → surface-elevated. ConfigTab: - 2× Save buttons: same accent-LIGHTER trap → flipped + focus rings. - Cancel: same no-op → surface-elevated. ActivityTab: - Refresh: same no-op → surface-elevated + focus-visible ring. Co-Authored-By: Claude Opus 4.7 (1M context) --- canvas/src/components/tabs/ActivityTab.tsx | 5 ++++- canvas/src/components/tabs/ConfigTab.tsx | 7 ++++--- canvas/src/components/tabs/DetailsTab.tsx | 14 +++++++++++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/canvas/src/components/tabs/ActivityTab.tsx b/canvas/src/components/tabs/ActivityTab.tsx index 9a144cfe..8f90e51d 100644 --- a/canvas/src/components/tabs/ActivityTab.tsx +++ b/canvas/src/components/tabs/ActivityTab.tsx @@ -110,8 +110,11 @@ export function ActivityTab({ workspaceId }: Props) { Full Trace diff --git a/canvas/src/components/tabs/ConfigTab.tsx b/canvas/src/components/tabs/ConfigTab.tsx index 8682073b..700a267d 100644 --- a/canvas/src/components/tabs/ConfigTab.tsx +++ b/canvas/src/components/tabs/ConfigTab.tsx @@ -65,11 +65,11 @@ function AgentCardSection({ workspaceId }: { workspaceId: string }) { {error &&
{error}
}
+ className="px-2 py-1 bg-surface-card hover:bg-surface-elevated hover:text-ink text-[10px] rounded text-ink-mid transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-1 focus-visible:ring-offset-surface">Cancel
) : ( @@ -956,7 +956,8 @@ export function ConfigTab({ workspaceId }: Props) { type="button" onClick={() => handleSave(true)} disabled={!isDirty || saving} - className="px-3 py-1.5 bg-accent-strong hover:bg-accent text-xs rounded text-white disabled:opacity-30 transition-colors" + // Same accent-LIGHTER fix shipped on every other tab. + className="px-3 py-1.5 bg-accent hover:bg-accent-strong text-xs rounded text-white disabled:opacity-30 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60 focus-visible:ring-offset-1 focus-visible:ring-offset-surface" > {saving ? "Restarting..." : "Save & Restart"} diff --git a/canvas/src/components/tabs/DetailsTab.tsx b/canvas/src/components/tabs/DetailsTab.tsx index 171542bf..3e16ef2b 100644 --- a/canvas/src/components/tabs/DetailsTab.tsx +++ b/canvas/src/components/tabs/DetailsTab.tsx @@ -166,7 +166,10 @@ export function DetailsTab({ workspaceId, data }: Props) { type="button" onClick={handleSave} disabled={saving} - className="px-3 py-1 bg-accent-strong hover:bg-accent text-xs rounded text-white disabled:opacity-50" + // Was bg-accent-strong hover:bg-accent — accent is the + // LIGHTER variant; flipped + focus-visible ring (same + // trap fix shipped on every other tab). + className="px-3 py-1 bg-accent hover:bg-accent-strong text-xs rounded text-white disabled:opacity-50 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60 focus-visible:ring-offset-1 focus-visible:ring-offset-surface" > {saving ? "Saving..." : "Save"} @@ -322,7 +325,10 @@ export function DetailsTab({ workspaceId, data }: Props) { @@ -334,7 +340,9 @@ export function DetailsTab({ workspaceId, data }: Props) { // Return focus to the trigger so keyboard users aren't stranded deleteButtonRef.current?.focus(); }} - className="px-3 py-1 bg-surface-card hover:bg-surface-card text-xs rounded text-ink-mid" + // Was hover:bg-surface-card on top of itself (no-op); + // lift to surface-elevated. + className="px-3 py-1 bg-surface-card hover:bg-surface-elevated hover:text-ink text-xs rounded text-ink-mid transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-1 focus-visible:ring-offset-surface" > Cancel