Repository navigation
fix(composer): show command results as a single-line notice strip - #1038
Conversation
The "/" command result panel was a bordered card with a "Command failed" title row above the message, which repeated the command as a "/goal: " prefix. A busy conversation therefore read as a hard failure. Every result is now one strip: a tone icon, the command name as a chip, the message and a close button. A busy conversation is a yellow warning with a shorter message, errors are red and plain notices gray. /loop results use the same strip; the created task's prompt keeps its own truncated line so the cancel command stays visible. Closes Stack-Cairn#1037
xiaozhou26
left a comment
There was a problem hiding this comment.
Reviewed notice tone/accessibility, command-chip truncation, long loop prompt limits, cancel visibility, scrollable lists and close behavior. Browser exercised warning/error/info and loop-created/list/empty states, including long text and narrow screens; busy /goal restores draft and retries while idle. No merge blocker found.
Integration: merged #1038/#1040/#1042 locally on v2-kbrian@2075465b without conflicts. Shared UI/GUI/WebUI typechecks, GUI 3407 passed / 10 skipped, WebUI 809 passed, both Vite production builds, UI boundaries and diff checks passed. Browser: real shared components with GUI and WebUI styles at 1280/390/320px; 36 goal active/waiting/editing geometry cases, 144 notice cases across language/theme, busy /goal draft restoration and idle resend, plus existing queue/goal and branch/disclosure interactions. Windows Edge-specific tests skip on macOS; Chrome measurements supplement geometry checks. Native Tauri/live-model E2E not performed.

「/」指令的本地结果面板原来是带边框的卡片:标题一行(会话忙时是「指令执行失败」),正文再以
/goal:开头。会话忙只是暂时不能发送,却显示成失败;指令名重复出现,一条提示占两到三行。Closes #1037
改动
aria-label),不再单独占一行。tone: "warning",role="status"),错误为红色(role="alert"),普通提示为灰色。/loop的结果用同一种提示条:/loop cancel <id>,始终可见。ComposerCommandPanel,两端同时生效;composerCommands.ts的面板状态新增可选字段command、tone,只在本地渲染,不进入转录区,也不发给模型。截图
桌面 GUI(调试版真机,运行中发送
/goal):黄色会话忙提示,草稿放回输入框。桌面 GUI:
/loop list没有任务时的灰色提示条。WebUI 390 宽(Gateway 内嵌 WebUI):
/loop list灰色提示条,以及/loop cancel缺少 id 时的红色用法错误(多行文案在条内换行,关闭按钮不被挤出)。验证
upstream/v2-kbrian2075465git diff --check通过test/chat/composer-command-notice.test.mjs:会话忙映射为 warning 且带指令名、文案不再带/goal:前缀;错误、普通提示三种语气的图标与角色;/loop创建与列表的提示条(无边框、Repeat 图标、/loop标签、取消命令、列表行、停用删除线、空列表)。test/chat/command-notice-long-command-chip.test.mjs:长指令名标签有宽度上限并截断,不挤掉文案和关闭按钮(复审时写成先失败的回归)。test/chat/command-notice-loop-long-prompt.test.mjs:长提示词在创建结果里单行截断、悬停看全文(复审时写成先失败的回归)。test/chat/composer-commands.test.mjs:断言随面板状态的新字段调整(message不带前缀、command单独给出)。cargo test在 Windows 基线也有 23 条环境失败,本 PR 不改src-tauri;两条按 CWD 读源码,在crates/agent-gui下重跑通过)/goal出现黄色提示、/loop list灰色提示;WebUI 390 宽/loop list与/loop cancel(缺 id)各验一遍;用户验收通过。/goal放进等待队列,不会出现会话忙提示,所以会话忙的截图只有桌面端。