Skip to content

fix(canvas): show full Agent prompt tooltips - #6961

Open
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
fix/canvas-tooltip-full-value
Open

fix(canvas): show full Agent prompt tooltips#6961
BillLeoutsakosvl346 wants to merge 1 commit into
stagingfrom
fix/canvas-tooltip-full-value

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

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

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

  • bun run test lib/workflows/subblocks/display.test.ts in apps/sim: 28 tests passed
  • bun run test src/workflow-block/sub-block-row-view.test.tsx in packages/workflow-renderer: 1 test passed
  • bun run type-check in apps/sim
  • bun run type-check in packages/workflow-renderer
  • Scoped Biome check across all 7 changed files
  • git diff --check

Reviewers 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

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

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.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 22, 2026 2:18am

Request Review

@BillLeoutsakosvl346
BillLeoutsakosvl346 marked this pull request as ready for review August 22, 2026 02:17
@cursor

cursor Bot commented Aug 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only display/tooltip split with no layout, auth, or data-handling changes. Masking and non-message values keep existing behavior.

Overview
Agent message chips stay compact (50-character first-message preview), but hover tooltips now show the full first-message content instead of the already-truncated string.

Adds getTooltipDisplayValue for message arrays (including JSON-serialized ones) and an optional tooltipValue on OverflowSpan / SubBlockRowView. The tooltip opens when text is clipped or when the visible value was shortened upstream. Editor canvas and read-only preview both pass this through for messages-input; passwords, selector hydration, and long plain strings (e.g. Function code) are unchanged.

Reviewed by Cursor Bugbot for commit 2a74c4b. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR separates compact Agent message previews from their full tooltip labels while preserving existing rendering for other values.

  • Adds full first-message tooltip formatting for parsed and serialized message arrays.
  • Passes optional tooltip values through editor and read-only preview block renderers.
  • Opens tooltips for values shortened upstream as well as values clipped by CSS.
  • Adds focused formatter and renderer regression tests.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author
image

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.

1 participant