You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by xx...@apache.org on 2026/09/23 04:56:05 UTC
(maka) branch feat/workhub-result-return updated: fix(workhub): show result wake as system notice
This is an automated email from the ASF dual-hosted git repository.
xxhZs pushed a commit to branch feat/workhub-result-return
in repository https://gitbox.apache.org/repos/asf/maka.git
The following commit(s) were added to refs/heads/feat/workhub-result-return by this push:
new 9cd0d74e9b fix(workhub): show result wake as system notice
9cd0d74e9b is described below
commit 9cd0d74e9bdfc8e2c4eae38737ed9fb33e7b8cf8
Author: xxhZs <84...@users.noreply.github.com>
AuthorDate: Wed Sep 23 12:55:59 2026 +0800
fix(workhub): show result wake as system notice
Generated-by: OpenAI Codex
---
.../normal-delegation-demo.mp4 | Bin 667771 -> 655754 bytes
.../result-update-system-notice.png | Bin 0 -> 162682 bytes
...ub-result-return-acceptance-2026-09-22.zh-CN.md | 4 +++-
.../__tests__/chat-turn-answer-identity.test.tsx | 14 ++++++++------
packages/ui/src/chat-turn.tsx | 17 +++++++++--------
5 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/docs/images/pr/workhub-result-return/normal-delegation-demo.mp4 b/docs/images/pr/workhub-result-return/normal-delegation-demo.mp4
index f135e8ecbc..518f8b2fbb 100644
Binary files a/docs/images/pr/workhub-result-return/normal-delegation-demo.mp4 and b/docs/images/pr/workhub-result-return/normal-delegation-demo.mp4 differ
diff --git a/docs/images/pr/workhub-result-return/result-update-system-notice.png b/docs/images/pr/workhub-result-return/result-update-system-notice.png
new file mode 100644
index 0000000000..8342c9addc
Binary files /dev/null and b/docs/images/pr/workhub-result-return/result-update-system-notice.png differ
diff --git a/docs/workhub-result-return-acceptance-2026-09-22.zh-CN.md b/docs/workhub-result-return-acceptance-2026-09-22.zh-CN.md
index 27a7f94730..46713ad341 100644
--- a/docs/workhub-result-return-acceptance-2026-09-22.zh-CN.md
+++ b/docs/workhub-result-return-acceptance-2026-09-22.zh-CN.md
@@ -86,8 +86,10 @@
## 2026-09-23 普通委派录屏
-[观看不提示汇报的 WorkHub 委派与回包录屏](images/pr/workhub-result-return/normal-delegation-demo.mp4)。视频由 Playwright 直接录制实际 Electron WorkHub 窗口,时长约 16 秒;使用独立 profile、现有 DeepSeek V4.1 Flash 连接及真实模型响应。只发送一条普通委派消息:
+[观看不提示汇报的 WorkHub 委派与回包录屏](images/pr/workhub-result-return/normal-delegation-demo.mp4)。视频由 Playwright 直接录制实际 Electron WorkHub 窗口,时长约 19 秒;使用独立 profile、现有 DeepSeek V4.1 Flash 连接及真实模型响应。只发送一条普通委派消息:
> 在已有任务「普通委派验收-订单汇总」里,统计工作目录 orders.csv 中 status 为 paid 的订单数和金额总计,把结果写入 report.json,字段为 paid_count 和 paid_total。
消息没有要求完成后汇报,也没有提到 `WorkHubResult`。目标任务写出 `report.json`,独立读取确认 `paid_count=3`、`paid_total=40`。WorkHub 随后自动出现“任务结果更新”,由完成的结果 Turn `whf_5a17b5906f2d4999c72ea730e5453a5865501aedbf884adf` 汇报这两个数值及报告内容;期间没有第二条用户消息。从发送到确认回包约 12 秒。
+
+后续 UI 修复使 Host 的结果触发不再渲染为右侧用户消息气泡。更新后的录屏展示居中的“任务结果更新 · 任务名”系统状态和下方正常的回包;[查看结果更新时的真实窗口截图](images/pr/workhub-result-return/result-update-system-notice.png)。这次重新跑出的结果 Turn `whf_6d36239582ed6d806724eccd66c9a45b5720d81034d64a82` 已完成,独立读取的报告仍为 `paid_count=3`、`paid_total=40`。
diff --git a/packages/ui/src/__tests__/chat-turn-answer-identity.test.tsx b/packages/ui/src/__tests__/chat-turn-answer-identity.test.tsx
index f9cbcb6520..a9f2c1e76e 100644
--- a/packages/ui/src/__tests__/chat-turn-answer-identity.test.tsx
+++ b/packages/ui/src/__tests__/chat-turn-answer-identity.test.tsx
@@ -856,13 +856,15 @@ test('states the outcome without a duration when none is recorded, and localizes
});
-test('WorkHub feedback is labelled as a task result rather than a user request', async () => {
+test('WorkHub feedback is a system notice without a user message bubble', async () => {
const { container, root } = domRoot();
await renderTurn(root,{
- ...turnWith([]),
- user:{id:'feedback',role:'user',text:'Release report',ts:1,hostOrigin:{kind:'workhub_result',eventId:'feedback',actionId:'action',delegationId:'delegation',targetSessionId:'target',targetTurnId:'target-turn'}},
+ ...turnWith([{ ...ANSWER, live: false }]),
+ status: 'completed',
+ user:{id:'feedback',role:'user',text:'Order summary',ts:1,hostOrigin:{kind:'workhub_result',eventId:'feedback',actionId:'action',delegationId:'delegation',targetSessionId:'target',targetTurnId:'target-turn'}},
});
- assert.ok(container.textContent.includes('Task result update'));
- assert.ok(container.textContent.includes('Release report'));
- assert.ok(container.querySelector('article[aria-label="Task result update"]'));
+ assert.ok(container.textContent.includes('Task result update · Order summary'));
+ assert.equal(container.querySelectorAll('.maka-user-message').length, 0);
+ assert.ok(container.querySelector('[role="status"][aria-label="Task result update · Order summary"]'));
+ assert.ok(container.textContent.includes('the answer'));
});
diff --git a/packages/ui/src/chat-turn.tsx b/packages/ui/src/chat-turn.tsx
index 462ae33733..3193c5f14b 100644
--- a/packages/ui/src/chat-turn.tsx
+++ b/packages/ui/src/chat-turn.tsx
@@ -558,10 +558,13 @@ export const TurnView = memo(function TurnView(props: {
</Marker>
)}
{turn.user?.hostOrigin?.kind === 'workhub_result' && (
- <Marker variant="host-origin" role="note" title={turn.user.hostOrigin.targetSessionId}>
- <GitBranch size={ICON_SIZE.meta} aria-hidden="true" />
- <span>{copy.workHubResultReceived}</span>
- </Marker>
+ <ChatSystemMessage
+ className="maka-chat-system-message"
+ icon={<GitBranch size={ICON_SIZE.meta} aria-hidden="true" />}
+ aria-label={`${copy.workHubResultReceived} · ${turn.user.text}`}
+ >
+ {copy.workHubResultReceived} · {turn.user.text}
+ </ChatSystemMessage>
)}
{turn.user?.hostOrigin?.kind === 'agent_graph' && (
<Marker
@@ -576,12 +579,10 @@ export const TurnView = memo(function TurnView(props: {
{props.transientMessages?.map((message) => (
<TransientUserMessage key={message.id} message={message} />
))}
- {turn.user && (
+ {turn.user && turn.user.hostOrigin?.kind !== 'workhub_result' && (
<LocalizedChatMessage
accessibleLabel={
- turn.user.hostOrigin?.kind === 'workhub_result'
- ? copy.workHubResultReceived
- : turn.user.hostOrigin?.kind === 'legacy_automation'
+ turn.user.hostOrigin?.kind === 'legacy_automation'
? copy.legacyAutomationTriggered
: copy.userAriaLabel
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org