Skip to content

fix(ui): harden persisted tool activity rendering - #48

Merged
helsome merged 1 commit into
helsome:mainfrom
Rapeter:feat/tool-activity-timeline
Sep 11, 2026
Merged

helsome merged 1 commit into
helsome:mainfrom
Rapeter:feat/tool-activity-timeline

Conversation

@Rapeter

@Rapeter Rapeter commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • render persisted tool activity with the shared, collapsible activity component
  • keep the presentation layer data-minimized: no raw tool arguments, error messages, tool names, or tool IDs are rendered into the DOM
  • show only validated symbols, a safe duration, and localized status labels
  • add reload rendering and sensitive-data regression coverage

Scope

This is a focused UI privacy hardening related to #19. It does not implement or close #33, which is claimed and has separate typed-event and persisted-timeline requirements.

Verification

  • bun test packages/ui/src/components/agent/ToolActivity.test.tsx packages/ui/src/components/chat/TurnCard.test.tsx
  • bun run typecheck
  • bun run i18n:check

bun test --isolate was also run: the change-specific tests pass; six unrelated Windows environment failures remain (symlink permissions, path separators, and locale formatting).

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这条作为“现有 ToolActivity 的持久化展示 + 安全收敛”本身有价值:复用 live 组件、隐藏 raw args/error/tool id、校验 symbol、补 reload UI 回归都合理。

但先不要把它当 #33 的实现合入:#33 已被另一位贡献者 claim,且 Issue 要求基于 #27 typed events 覆盖 search / financial data / generic tool、running→success/failure/cancelled、retry/fallback、evidence id,以及真实 >=3 工具/数据源录屏。当前 PR 只消费已经持久化的 Message.toolCalls,会和 #33 主实现发生职责重叠。

建议二选一:

  1. 与 #33 assignee 协调,把这部分作为其 timeline 的 persisted-message rendering/security 子模块;或
  2. 明确把本 PR 重命名/重述为一个独立的小型 hardening(不声称解决 #33),并 rebase 到最新 main、跑当前 CI。若走第 2 种,我可以按独立小修重新审,代码方向本身没有明显阻塞。

@Rapeter
Rapeter force-pushed the feat/tool-activity-timeline branch from 47cf380 to e87de53 Compare September 11, 2026 07:36
@Rapeter
Rapeter force-pushed the feat/tool-activity-timeline branch from e87de53 to 13ac92e Compare September 11, 2026 07:52
@Rapeter Rapeter changed the title feat(ui): persist safe tool activity timeline fix(ui): harden persisted tool activity rendering Sep 11, 2026

@helsome helsome left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

作者已经按上一轮意见把范围收敛清楚:这是一个独立的 persisted Tool Activity 隐私 hardening,不再声称完成 #33。实现本身小而明确,隐藏 raw args/error/tool id,保留经过校验的 symbol、时长和状态,并补了 reload 与敏感信息回归测试。可以独立合入。

@helsome
helsome merged commit 926c763 into helsome:main Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Copilot UI] Add a persistent Tool Activity timeline for searches, data calls, and research steps

2 participants