fix(canvas): show full Agent prompt tooltips - #6961
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Adds Reviewed by Cursor Bugbot for commit 2a74c4b. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR separates compact Agent message previews from their full tooltip labels while preserving existing rendering for other values.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The full tooltip value remains scoped to Agent message inputs, respects existing masking and hydration behavior, passes unchanged through the preview resolver, and updates correctly when its raw source value changes.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/workflows/subblocks/display.ts | Adds a tooltip formatter that preserves complete first-message content while retaining existing display formatting for other values. |
| packages/workflow-renderer/src/lib/overflow-span.tsx | Supports a separate tooltip label and displays it when the visible value was shortened upstream. |
| packages/workflow-renderer/src/workflow-block/sub-block-row-view.tsx | Forwards optional tooltip-only values through all row presentation variants. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx | Supplies full Agent message content to editor tooltips while preserving masking and hydrated labels. |
| apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx | Supplies the same full Agent message tooltip in read-only workflow previews. |
| apps/sim/lib/workflows/subblocks/display.test.ts | Covers full message tooltips for array and serialized forms and confirms plain strings remain unchanged. |
| packages/workflow-renderer/src/workflow-block/sub-block-row-view.test.tsx | Verifies that an upstream-shortened inline value exposes its full tooltip label. |
Reviews (1): Last reviewed commit: "fix(canvas): show full Agent prompt tool..." | Re-trigger Greptile

Summary
Separates compact canvas display values from tooltip labels so long Agent prompts are no longer shortened before the tooltip receives them. Agent cards keep the existing 50-character first-message preview, block sizing, and auto-layout behavior, while editor and read-only preview tooltips receive the complete first-message content. Long plain strings such as Function code remain unchanged.
The renderer now supports an optional full tooltip value and opens the tooltip when the visible text is clipped or when it was shortened upstream. Password masking, selector hydration, regular row tooltip behavior, and structured-value summaries are unchanged.
Fixes: N/A — reported in Slack with no linked GitHub issue.
Slack report and before screenshots: https://sim-ai.slack.com/archives/C093DF8MA21/p1786567692861899
Type of Change
Testing
bun run test lib/workflows/subblocks/display.test.tsinapps/sim: 28 tests passedbun run test src/workflow-block/sub-block-row-view.test.tsxinpackages/workflow-renderer: 1 test passedbun run type-checkinapps/simbun run type-checkinpackages/workflow-renderergit diff --checkReviewers should focus on the display-versus-tooltip separation: the compact Agent chip must remain unchanged while its tooltip exposes the complete first message, including when the compact string itself fits and was truncated upstream.
Checklist
Screenshots/Videos
Before behavior and both comparison screenshots are in the linked Slack thread. No after screenshot is attached because the compact preview and layout intentionally remain visually unchanged; only the tooltip content changes, and that behavior is covered by the focused renderer regression test.