fix(chat): preserve async agent display names in traces - #7686
fix(chat): preserve async agent display names in traces#7686BillLeoutsakosvl346 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Browser verificationBefore/after using the real Sim formatter and activity-row components with synthetic launch data. This is an isolated component preview, not a live model conversation. The full display name replaces the cut-off ID-derived label; IDs and layout are unchanged. Wait-any wording and two-digit counts are preserved. Narrow panels still use the existing end ellipsis; old traces without launch metadata retain their fallback. Automated tests separately exercise persistence compaction and reload. |
Greptile SummaryThis PR preserves bounded async-agent launch identity through chat persistence so control-tool traces can display full agent names rather than truncated IDs.
Confidence Score: 5/5The PR appears safe to merge, with no outstanding actionable findings. No changes were made after the previous review. The earlier cross-turn concern was manually resolved after BillLeoutsakosvl346 explained that control handles are turn-scoped, rejected across turns, and may reuse IDs, making the message-scoped lookup intentional.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/copilot/chat/async-agent-display.ts | Introduces bounded validation and compaction of async-agent launch identity. |
| apps/sim/lib/copilot/chat/persisted-message.ts | Retains compact launch identity while stripping other persisted tool-result output. |
| apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx | Builds a message-scoped launch-name map and uses it when formatting async-agent control tools. |
| apps/sim/lib/copilot/tools/tool-display.ts | Adds optional display-name resolution while preserving humanized-ID fallbacks. |
| apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.test.ts | Covers live, serialized, persisted, span-based, malformed, and fallback display-name behavior. |
| apps/sim/lib/copilot/chat/persisted-message.test.ts | Verifies that only bounded successful async-launch identity survives persistence compaction. |
| apps/sim/lib/copilot/tools/tool-display.test.ts | Verifies full display names, wait modes, counts, and unknown-ID fallbacks. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Async agent launch result] --> B[Validate and compact identity]
B --> C[Persist agent ID and display name]
C --> D[Reload message blocks]
B --> E[Parse live message blocks]
D --> F[Build message-scoped name map]
E --> F
F --> G[Resolve control-tool title]
G --> H[Display full agent name]
Reviews (2): Last reviewed commit: "fix(chat): preserve async agent display ..." | Re-trigger Greptile
|
@cubic-dev-ai review this PR |
@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete. |


Summary
Type of Change
Testing
Checklist