Skip to content

improvement(canvas): improve code tooltip readability - #7138

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/code-tooltip-readability
Aug 26, 2026
Merged

improvement(canvas): improve code tooltip readability#7138
waleedlatif1 merged 1 commit into
stagingfrom
codex/code-tooltip-readability

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Add line numbers and wrapped code to canvas code previews
  • Match terminal gutter spacing and keep wider tooltips viewport-safe

Type of Change

  • Improvement

Testing

  • Tested manually in the browser with a Function block and multi-line JavaScript
  • bun run lint
  • bun run check:audits
  • bun run test and bun run type-check in the affected packages

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)

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Building Building Preview Aug 26, 2026 11:51pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR improves canvas code-preview readability while keeping tooltips within the viewport.

  • Extends PopoverContent.maxWidth to accept CSS length expressions while preserving numeric pixel values.
  • Widens code hover cards and enables line numbers, wrapping, compact gutter spacing, and vertical-only scrolling.
  • Updates hover-card tests for the new width, gutter, padding, and wrapping behavior.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or non-blocking defects identified.

The new CSS-width value is hardcoded and viewport-clamped, numeric callers retain their previous behavior, and the code viewer’s wrapping and gutter layout support the intended vertically scrollable preview.

Important Files Changed

Filename Overview
packages/emcn/src/components/popover/popover.tsx Safely broadens the maximum-width API to support trusted CSS length expressions while retaining existing numeric behavior.
packages/workflow-renderer/src/lib/code-hover-card.tsx Adds a viewport-clamped wider tooltip and configures the code viewer for wrapped text, line numbers, and vertical scrolling.
packages/workflow-renderer/src/lib/overflow-span-mount.test.tsx Updates focused assertions to reflect the revised tooltip width and wrapped gutter presentation.

Reviews (1): Last reviewed commit: "improvement(canvas): improve code toolti..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit c2d9423 into staging Aug 26, 2026
4 of 5 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/code-tooltip-readability branch August 26, 2026 23:56
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