From ba00e85d4fbfdffcfd6484942bf3b5fa2a2bb6d0 Mon Sep 17 00:00:00 2001 From: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Date: Fri, 19 Jun 2026 02:22:37 +0200 Subject: [PATCH] fix(ui): extract "Next best" CTA to ui-btn-nextbest (warm-tinted, no inline utilities) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The most prominent Control CTA was raw inline Tailwind (bg-accent-primary/[0.07] + arbitrary opacities) — a Layer-4 violation that also meant the warm accent never reached it. Extract to a ui-btn-nextbest @layer class, warm-tinted (soft, not a solid slab). Recurring pattern now lives in one place and inherits the brand accent. Token/class-only. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app/globals.css | 6 ++++++ src/components/control/project-intent-panel.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/globals.css b/src/app/globals.css index 4a71ec1b8..78ca019f8 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -1940,6 +1940,12 @@ .ui-btn-ready-primary { @apply inline-flex min-h-11 sm:min-h-0 items-center rounded-lg bg-accent-warm px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-accent-warm-hover; } + /* "Next best" primary CTA — full-width, warm-tinted (soft x.ai accent, not a + solid slab). Extracted from inline utilities so the recurring pattern lives + in one place and inherits the warm brand accent. */ + .ui-btn-nextbest { + @apply w-full rounded-xl border border-accent-warm/40 bg-accent-warm/[0.10] px-4 py-2.5 text-sm font-semibold text-accent-warm transition-colors hover:border-accent-warm/60 hover:bg-accent-warm/[0.16] disabled:opacity-50; + } .ui-btn-ready-action { @apply inline-flex min-h-11 sm:min-h-0 items-center rounded-lg border border-border-default bg-surface-overlay px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-surface-raised; } diff --git a/src/components/control/project-intent-panel.tsx b/src/components/control/project-intent-panel.tsx index 71f81a7a8..623de3187 100644 --- a/src/components/control/project-intent-panel.tsx +++ b/src/components/control/project-intent-panel.tsx @@ -203,7 +203,7 @@ export function IntentButtonPanel({ title={queueBlockedReason ? `${queueBlockedReason}: Next best stays on recovery work and will not consume the queue. Use a queue row's send button to run that item now.` : "The agent re-reads ground truth (git, types, lint, TODOs, roadmap, session handoff), picks the single highest-impact task, and executes. Dispatches immediately, no preview."} - className="w-full rounded-xl border border-accent-primary/30 bg-accent-primary/[0.07] px-4 py-2.5 text-sm font-semibold text-text-primary transition-colors hover:border-accent-primary/50 hover:bg-accent-primary/[0.12] disabled:opacity-50" + className="ui-btn-nextbest" > {sending === primary.id ? "…"