From ee8eec821340b87061162aec66f5dd5cc52760e9 Mon Sep 17 00:00:00 2001 From: Molecule AI Core-UIUX Date: Sun, 10 May 2026 17:26:45 +0000 Subject: [PATCH] fix(canvas): add focus-visible rings to final 5 component files - A2AEdge.tsx: edge label pill button - OrgCancelButton.tsx: cancel trigger + confirm Yes/No - AttachmentTextPreview.tsx: download, show-all, truncated-dl buttons - form-inputs.tsx: tag remove (red) + section toggle (accent) - secrets-section.tsx: SecretRow/CustomSecretRow remove (red), update, save, scope toggle (amber for global), add-variable buttons - settings-panel.css: UnsavedChangesGuard keep/discard buttons Co-Authored-By: Claude Opus 4.7 --- canvas/src/components/canvas/A2AEdge.tsx | 2 +- .../src/components/canvas/OrgCancelButton.tsx | 6 ++--- .../tabs/chat/AttachmentTextPreview.tsx | 6 ++--- .../components/tabs/config/form-inputs.tsx | 4 ++-- .../tabs/config/secrets-section.tsx | 22 +++++++++---------- canvas/src/styles/settings-panel.css | 10 +++++++++ 6 files changed, 30 insertions(+), 20 deletions(-) diff --git a/canvas/src/components/canvas/A2AEdge.tsx b/canvas/src/components/canvas/A2AEdge.tsx index f41c9403..3ceda44a 100644 --- a/canvas/src/components/canvas/A2AEdge.tsx +++ b/canvas/src/components/canvas/A2AEdge.tsx @@ -119,7 +119,7 @@ function A2AEdgeImpl({ onClick={handleClick} aria-label={ariaLabel} title="Open source workspace's activity feed" - className={`px-2 py-0.5 rounded-full bg-surface-sunken/95 border ${accent} ${accentText} text-[10px] font-medium shadow-md shadow-black/40 backdrop-blur-sm hover:bg-surface-card hover:border-opacity-100 transition-colors cursor-pointer`} + className={`px-2 py-0.5 rounded-full bg-surface-sunken/95 border ${accent} ${accentText} text-[10px] font-medium shadow-md shadow-black/40 backdrop-blur-sm hover:bg-surface-card hover:border-opacity-100 transition-colors cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1`} > {labelText} diff --git a/canvas/src/components/canvas/OrgCancelButton.tsx b/canvas/src/components/canvas/OrgCancelButton.tsx index 644b2e01..7b3025c7 100644 --- a/canvas/src/components/canvas/OrgCancelButton.tsx +++ b/canvas/src/components/canvas/OrgCancelButton.tsx @@ -122,7 +122,7 @@ export function OrgCancelButton({ rootId, rootName, workspaceCount }: Props) { type="button" onClick={handleCancel} disabled={submitting} - className="mol-deploy-cancel px-2 py-0.5 rounded text-[10px] font-semibold" + className="mol-deploy-cancel px-2 py-0.5 rounded text-[10px] font-semibold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-1" > {submitting ? "Deleting…" : "Yes"} @@ -130,7 +130,7 @@ export function OrgCancelButton({ rootId, rootName, workspaceCount }: Props) { type="button" onClick={() => setConfirming(false)} disabled={submitting} - className="px-2 py-0.5 rounded bg-surface-card/80 hover:bg-surface-card text-[10px] text-ink" + className="px-2 py-0.5 rounded bg-surface-card/80 hover:bg-surface-card text-[10px] text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1" > No @@ -148,7 +148,7 @@ export function OrgCancelButton({ rootId, rootName, workspaceCount }: Props) { e.stopPropagation(); setConfirming(true); }} - className="nodrag mol-deploy-cancel mol-deploy-cancel-pulse absolute -top-7 right-1 z-20 flex items-center gap-1 rounded-full px-2.5 py-0.5 text-[10px] font-semibold shadow-md" + className="nodrag mol-deploy-cancel mol-deploy-cancel-pulse absolute -top-7 right-1 z-20 flex items-center gap-1 rounded-full px-2.5 py-0.5 text-[10px] font-semibold shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-1" aria-label={`Cancel deployment of ${rootName}`} > {v} - + ))} @@ -129,7 +129,7 @@ export function Section({ title, children, defaultOpen = true }: { title: string const [open, setOpen] = useState(defaultOpen); return (
- diff --git a/canvas/src/components/tabs/config/secrets-section.tsx b/canvas/src/components/tabs/config/secrets-section.tsx index 504d1d2d..6afafaa2 100644 --- a/canvas/src/components/tabs/config/secrets-section.tsx +++ b/canvas/src/components/tabs/config/secrets-section.tsx @@ -113,9 +113,9 @@ function SecretRow({ label, secretKey, isSet, scope, globalMode, onSave, onDelet {isSet && Set} {scope && } {!editing && isSet && (globalMode || scope !== "global") && ( - + )} -
@@ -131,7 +131,7 @@ function SecretRow({ label, secretKey, isSet, scope, globalMode, onSave, onDelet )} @@ -165,10 +165,10 @@ function CustomSecretRow({ secretKey, scope, globalMode, onSave, onDelete }: { Set {!globalMode && } {canDelete && !editing && ( - + )} {(canDelete || showOverride) && ( - )} @@ -184,7 +184,7 @@ function CustomSecretRow({ secretKey, scope, globalMode, onSave, onDelete }: { )} @@ -297,7 +297,7 @@ export function SecretsSection({ workspaceId, requiredEnv }: { workspaceId: stri
+ className="px-2 py-1 bg-surface-card hover:bg-surface-card text-[10px] rounded text-ink-mid focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1">Cancel
) : ( - )} diff --git a/canvas/src/styles/settings-panel.css b/canvas/src/styles/settings-panel.css index 7a24bae2..2e4e557c 100644 --- a/canvas/src/styles/settings-panel.css +++ b/canvas/src/styles/settings-panel.css @@ -684,6 +684,11 @@ cursor: pointer; } +.guard-dialog__keep-btn:focus-visible { + outline: var(--focus-ring); + outline-offset: var(--focus-ring-offset); +} + .guard-dialog__discard-btn { background: #2563eb; color: #ffffff; @@ -693,6 +698,11 @@ cursor: pointer; } +.guard-dialog__discard-btn:focus-visible { + outline: var(--focus-ring); + outline-offset: var(--focus-ring-offset); +} + /* ── Settings button (top bar) ─────────────────────── */ .settings-button {