Skip to content

fix(canvas): raw tooltip shows up when hovering block params#5589

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/canvas-raw-tooltip
Jul 11, 2026
Merged

fix(canvas): raw tooltip shows up when hovering block params#5589
waleedlatif1 merged 2 commits into
stagingfrom
fix/canvas-raw-tooltip

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Hovering a truncated block param value (or a long block name) on the canvas popped the browser's raw native tooltip, dumping the full untruncated content (including raw code) over the graph
  • Root cause: sub-block-row-view.tsx and workflow-block-view.tsx used a native title attribute on truncated spans instead of the styled cursor-following Tooltip
  • Added a small shared OverflowSpan component (built on the existing @sim/emcn floating-tooltip primitives) that shows the styled tooltip only when the text is actually clipped, and swapped both call sites to use it

Type of Change

  • Bug fix

Testing

  • bun run type-check and bun run lint:check pass for the workflow-renderer package
  • bun run check:api-validation and the monorepo boundary check pass
  • Verified with a jsdom render test: no native title attribute is emitted, and the styled floating tooltip renders the full value only on hover when the text overflows

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)

…p on block params

Hovering a truncated subblock value or block name on the canvas popped
the browser's raw native tooltip with the full untruncated content
(including raw code). Replace the `title` attribute with the
cursor-following styled Tooltip, shown only when the text is actually
clipped.
@vercel

vercel Bot commented Jul 11, 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, Comment Jul 11, 2026 4:59am

Request Review

@cursor

cursor Bot commented Jul 11, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentation-only change in workflow-renderer canvas views; no auth, data, or execution logic touched.

Overview
Fixes canvas hover showing the browser’s native title tooltip on truncated block names and param rows, which could dump long raw code/JSON over the graph.

Introduces shared OverflowSpan, built on @sim/emcn’s useFloatingTooltip and isTextClipped, so a styled floating tooltip appears only when text is actually clipped. SubBlockRowView (labels and values) and WorkflowBlockView (block name) now use OverflowSpan instead of title on truncated spans.

Reviewed by Cursor Bugbot for commit 6e06e6c. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces raw browser tooltips on workflow canvas text with styled overflow-only tooltips. The main changes are:

  • Added a shared OverflowSpan component for clipped text.
  • Swapped block parameter titles and values to use the styled tooltip.
  • Swapped workflow block names to use the styled tooltip.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
packages/workflow-renderer/src/lib/overflow-span.tsx Adds the shared clipped-text span and floating tooltip wrapper.
packages/workflow-renderer/src/workflow-block/sub-block-row-view.tsx Uses the new overflow span for sub-block row labels and displayed values.
packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx Uses the new overflow span for workflow block names.

Reviews (2): Last reviewed commit: "fix(canvas): drop unused ResizeObserver ..." | Re-trigger Greptile

Comment thread packages/workflow-renderer/src/lib/overflow-span.tsx Outdated
useFloatingTooltip's canShow already receives the hovered element, so
measuring overflow via useIsOverflowing was redundant — every canvas
row was paying for a ResizeObserver and resize listener it never used.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6e06e6c. Configure here.

@waleedlatif1 waleedlatif1 merged commit 9ee499e into staging Jul 11, 2026
12 of 13 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/canvas-raw-tooltip branch July 11, 2026 04:58
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