Skip to content

improvement(workflow): add compact code hover previews - #7074

Merged
icecrasher321 merged 2 commits into
stagingfrom
codex/code-hover-tooltips
Aug 25, 2026
Merged

improvement(workflow): add compact code hover previews#7074
icecrasher321 merged 2 commits into
stagingfrom
codex/code-hover-tooltips

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • add compact syntax-highlighted code previews for code fields on workflow canvases
  • keep previews interactive and scrollable while reusing the platform tooltip appearance
  • add shared compact Code.Viewer density and focused hover behavior tests

Type of Change

  • Improvement

Testing

  • bun run lint
  • bun run lint:check
  • bun run check:audits (33 audits)
  • 115 workflow-renderer tests
  • 6 tooltip tests
  • 4 code-preview resolver tests
  • @sim/emcn and @sim/workflow-renderer type-checks
  • tested manually in the workflow canvas

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 25, 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 25, 2026 8:01pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds compact, syntax-highlighted previews for clipped workflow code values and extends the shared code viewer and popover styling to support them.

  • Resolves preview language metadata for code fields in editor and read-only workflow canvases.
  • Adds accessible keyboard, pointer, touch, and pen interactions for opening and navigating previews.
  • Introduces compact Code.Viewer density and shared tooltip-style popover appearance.
  • Adds focused resolver, rendering, accessibility, and interaction tests.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported keyboard and touch accessibility gap is addressed by focusable dialog semantics, explicit activation controls, focus retention, and regression coverage.

Important Files Changed

Filename Overview
packages/workflow-renderer/src/lib/code-hover-card.tsx Implements the interactive preview with clipped-content gating, keyboard and touch activation, focus retention, delayed pointer transitions, and Escape handling.
packages/workflow-renderer/src/lib/overflow-span.tsx Routes code values to the new rich hover card while preserving the existing tooltip path for ordinary clipped text.
packages/emcn/src/components/code/code.tsx Adds compact read-only viewer density while keeping virtualized and non-virtualized line sizing aligned.
apps/sim/lib/workflows/blocks/code-preview.ts Produces previews only for non-password, non-empty string code fields and normalizes supported syntax languages.
packages/workflow-renderer/src/lib/overflow-span-mount.test.tsx Covers delayed pointer opening, pointer transfer into the preview, keyboard focus and Escape behavior, and touch toggling.

Reviews (2): Last reviewed commit: "fix(workflow): address code preview revi..." | Re-trigger Greptile

Comment thread packages/workflow-renderer/src/lib/code-hover-card.tsx

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 14 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/sim/lib/workflows/blocks/code-preview.ts
Comment thread packages/emcn/src/components/popover/popover.tsx Outdated
Comment thread packages/workflow-renderer/src/lib/code-hover-card.tsx
@icecrasher321

Copy link
Copy Markdown
Collaborator Author

@greptile

@icecrasher321
icecrasher321 merged commit b515fe0 into staging Aug 25, 2026
29 checks passed
@icecrasher321
icecrasher321 deleted the codex/code-hover-tooltips branch August 25, 2026 20:19
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