From 52f094f11f3047ebf9c5815b69095d36b177a3dc Mon Sep 17 00:00:00 2001 From: rcourtman Date: Sat, 13 Jun 2026 23:27:33 +0100 Subject: [PATCH] Converge AI Chat icon actions on ActionIconButton --- .../v6/internal/subsystems/ai-runtime.md | 8 +- .../subsystems/frontend-primitives.md | 6 + .../scripts/shared-template-registry.json | 146 ++++++++ .../AI/Chat/__tests__/AIChat.test.tsx | 52 ++- .../src/components/AI/Chat/index.tsx | 333 +++++++++--------- .../src/components/shared/Button.test.tsx | 44 ++- .../SharedPrimitives.guardrails.test.ts | 86 +++++ .../src/components/shared/buttonModel.ts | 29 +- 8 files changed, 512 insertions(+), 192 deletions(-) diff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.md index 6ec48e166..cc49d2de5 100644 --- a/docs/release-control/v6/internal/subsystems/ai-runtime.md +++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md @@ -52,7 +52,6 @@ leave the transcript without exposing hidden provider/tool metadata. 4. `internal/api/ai_handler.go` shared with `api-contracts`: Pulse Assistant handlers are both an AI runtime control surface and a canonical API payload contract boundary. 5. `internal/api/ai_handlers.go` shared with `api-contracts`: AI settings and remediation handlers are both an AI runtime control surface and a canonical API payload contract boundary. 6. `internal/api/ai_intelligence_handlers.go` shared with `api-contracts`: AI intelligence handlers are both an AI runtime control surface and a canonical API payload contract boundary. - ## Extension Points Guest-family AI runtime code paths (VMs and LXC system containers) share @@ -103,6 +102,13 @@ activity has arrived, and keeping successful raw output behind the details disclosure by default once the turn completes. Pending tools, skipped/canceled tools, failed tools, and completed-turn tool details must remain visible/inspectable; failed output may render inline because it is actionable. +AI Chat icon-only actions own Assistant/session semantics, labels, and +handlers, but their visible button chrome must compose the shared +`ActionIconButton` primitive from `frontend-modern/src/components/shared/Button.tsx`. +Header utilities, session row controls, transcript fallback close/download +controls, activity-dock queued follow-up actions, composer send, footer +help/route actions, and compact dismiss controls must not recreate local +h-6/h-7/h-8/h-9 icon-button class shells. Assistant live workflow status follows OpenCode's current-state timeline model. CANONICAL (supersedes the per-row transcript-status rules elsewhere in diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md index 753d9d1cb..8cd2c4c97 100644 --- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md +++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md @@ -557,6 +557,12 @@ not a replacement status card, CTA band, or page-local nested card. disabled treatment, title fallback, and accessible name wiring must come from that shared primitive rather than page-local ` - + - + - + - + - + - + - + - + {/* Session picker */}
- +
= (props) => { aria-label={`New title for ${session.title || 'Untitled'}`} class="min-w-0 flex-1 rounded border border-blue-300 bg-surface px-2 py-1 text-sm font-medium text-base-content outline-none focus:border-blue-500 focus:ring-1 focus:ring-blue-500 disabled:opacity-70 dark:border-blue-800" /> - - +
- - - +
@@ -4374,19 +4371,20 @@ export const AIChat: Component = (props) => { {/* Close button (Always visible as fallback) */} - + @@ -4398,24 +4396,24 @@ export const AIChat: Component = (props) => {
{AI_CHAT_TRANSCRIPT_FALLBACK_TITLE}
- - +