Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(chat): approval card and terminal block readable in the light theme; a waiting call says it waits (CA)

purplef648e189ec49
diff --git a/e2e/ca-shots.spec.ts b/e2e/ca-shots.spec.ts
index 320e0baa..f1f1e0ec 100644
--- a/e2e/ca-shots.spec.ts
+++ b/e2e/ca-shots.spec.ts
@@ -90,7 +90,7 @@ test.describe('CA shots', () => {
await page.waitForTimeout(2500)
await shot(page, `code-${theme}-${width}-1-waiting`)
for (let i = 0; i < 4; i++) {
- const allow = page.getByRole('button', { name: /^(Allow|Approve|Apply|Run|Accept)/ }).first()
+ const allow = page.getByRole('button', { name: /^(Approve|Apply all|Run ⏎|Run)$/ }).first()
if (await allow.isVisible().catch(() => false)) {
await allow.click()
await page.waitForTimeout(1200)
@@ -110,7 +110,7 @@ test.describe('CA shots', () => {
await page.waitForTimeout(2500)
await shot(page, 'agent-dark-1280-1-waiting')
for (let i = 0; i < 4; i++) {
- const allow = page.getByRole('button', { name: /^(Allow|Approve|Apply|Run|Accept)/ }).first()
+ const allow = page.getByRole('button', { name: /^(Approve|Apply all|Run ⏎|Run)$/ }).first()
if (await allow.isVisible().catch(() => false)) {
await allow.click()
await page.waitForTimeout(1200)
diff --git a/src/components/chat/CodexConfirmDialog.tsx b/src/components/chat/CodexConfirmDialog.tsx
index 4b9a6af8..1531457a 100644
--- a/src/components/chat/CodexConfirmDialog.tsx
+++ b/src/components/chat/CodexConfirmDialog.tsx
@@ -87,7 +87,7 @@ export function CodexConfirmDialog() {
<div className="px-3">
<pre
data-testid="confirm-command"
- className="max-h-48 overflow-auto rounded-md bg-gray-950 dark:bg-black/50 px-3 py-2 t-mono leading-relaxed text-gray-100 whitespace-pre-wrap break-all"
+ className="lu-on-dark max-h-48 overflow-auto rounded-md bg-gray-950 dark:bg-black/50 px-3 py-2 t-mono leading-relaxed text-gray-100 whitespace-pre-wrap break-all"
>
{pending.command && !plain ? pending.command : plain ? <><span className="select-none text-gray-500">$ </span>{plain}</> : '(no command preview)'}
</pre>
@@ -100,7 +100,7 @@ export function CodexConfirmDialog() {
<button
onClick={() => answer(true)}
autoFocus
- className="inline-flex items-center gap-1.5 px-3 py-1 rounded-md t-control font-medium bg-gray-900 text-white hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-200 transition-colors"
+ className="lu-control lu-primary inline-flex items-center gap-1.5 px-3 t-control font-medium"
>
Run <kbd className="t-micro opacity-60 font-sans">⏎</kbd>
</button>
diff --git a/src/components/chat/ToolCallBlock.tsx b/src/components/chat/ToolCallBlock.tsx
index 457a0305..fc752fc7 100644
--- a/src/components/chat/ToolCallBlock.tsx
+++ b/src/components/chat/ToolCallBlock.tsx
@@ -27,6 +27,7 @@ import { parseWorkflowMark } from '../../api/mcp/workflow-mark'
import { isSelfControlToolName } from '../../lib/settings-tool-names'
import { useChatStore } from '../../stores/chatStore'
import { useCommandRulesStore } from '../../stores/commandRulesStore'
+import { useCodexConfirmStore } from '../../stores/codexConfirmStore'
import { suggestRuleFor } from '../../lib/agent-core/command-rules'
import { toolCallTitle, diffStat, shellExitCode, hasToolTitle, stripAnsi } from '../../lib/tool-call-title'
import { toolRegistry } from '../../api/mcp/tool-registry'
@@ -286,7 +287,13 @@ function ToolCallBlockImpl({ toolCall, onApprove, onReject }: Props) {
const isRunning = toolCall.status === 'running'
const isPending = toolCall.status === 'pending_approval'
const isFailed = toolCall.status === 'failed' || toolCall.status === 'rejected'
- const title = toolCallTitle(toolCall.toolName, toolCall.args, toolCall.status, toolRegistry.displayName(toolCall.toolName))
+ // The Code tab keeps a call 'running' while its confirm card waits; the row
+ // says it waits, not that it runs (CA U1).
+ const waitsOnCard = useCodexConfirmStore((st) =>
+ isRunning && !!st.pending && st.pending.toolName === toolCall.toolName
+ && JSON.stringify(st.pending.args ?? {}) === JSON.stringify(toolCall.args ?? {}),
+ )
+ const title = toolCallTitle(toolCall.toolName, toolCall.args, waitsOnCard ? 'pending_approval' : toolCall.status, toolRegistry.displayName(toolCall.toolName))
const stat = diffStat(toolCall.diff)
const isShell = toolCall.toolName === 'shell_execute'
const exitCode = isShell ? shellExitCode(toolCall.result) : null
@@ -395,7 +402,7 @@ function ToolCallBlockImpl({ toolCall, onApprove, onReject }: Props) {
>
<ToolIcon size={13} className="text-gray-400 dark:text-gray-500 shrink-0" />
{/* CA U1: what the call did, in words; the internal name is the tooltip. */}
- <span data-testid="tool-title" className={`t-control truncate min-w-0 ${isRunning ? 'lu-tool-shimmer' : 'text-gray-600 dark:text-gray-400'}`}>
+ <span data-testid="tool-title" className={`t-control truncate min-w-0 ${isRunning && !waitsOnCard ? 'lu-tool-shimmer' : 'text-gray-600 dark:text-gray-400'}`}>
{title.verb}
{title.target && (
<>
@@ -639,7 +646,7 @@ A user 2026-06-07 fix this lived inside the collapsed details, so a
{/* Result (raw text). The inline media preview now renders
always-visible above the collapsible (a user 2026-06-07). */}
{isShell && (
- <pre data-testid="tool-terminal" className="t-mono leading-relaxed rounded-md bg-gray-950 dark:bg-black/50 text-gray-100 px-3 py-2 overflow-auto scrollbar-thin max-h-[300px] whitespace-pre-wrap break-words">
+ <pre data-testid="tool-terminal" className="lu-on-dark t-mono leading-relaxed rounded-md bg-gray-950 dark:bg-black/50 text-gray-100 px-3 py-2 overflow-auto scrollbar-thin max-h-[300px] whitespace-pre-wrap break-words">
<span className="select-none text-gray-500">$ </span>{typeof toolCall.args?.command === 'string' ? toolCall.args.command : ''}
{toolCall.result ? `\n${stripAnsi(toolCall.result)}` : ''}
</pre>