Skip to content

fix(blocks): render SubBlockConfig.tooltip in sub-block label#5234

Open
sanidhyasin wants to merge 1 commit into
simstudioai:mainfrom
sanidhyasin:fix/subblock-tooltip-render
Open

fix(blocks): render SubBlockConfig.tooltip in sub-block label#5234
sanidhyasin wants to merge 1 commit into
simstudioai:mainfrom
sanidhyasin:fix/subblock-tooltip-render

Conversation

@sanidhyasin

Copy link
Copy Markdown

Summary

SubBlockConfig.tooltip is defined in apps/sim/blocks/types.ts (tooltip?: string // Tooltip text displayed via info icon next to the title) but was never rendered. renderLabel in sub-block.tsx reads config.title and config.required but ignored config.tooltip, so block configs that set it — e.g. pi.ts and textract.ts — showed no help text in the editor.

This wires up the field: when config.tooltip is set, an Info icon is rendered next to the field title, and hovering it shows the tooltip text. It reuses the Tooltip.Root/Trigger/Content pattern already used a few lines below in the same renderLabel for the invalid-JSON warning, and matches its icon styling (size-3, flex-shrink-0, text-muted-foreground).

Fixes #4071

Type of Change

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

Testing

  • bunx @biomejs/biome check on the changed file passes with no fixes/warnings.
  • Verified the existing block configs that already set tooltip (pi.ts, textract.ts) now surface an info icon with their help text next to the corresponding field label; fields without a tooltip are unchanged.
  • This is a small, presentational addition that mirrors an existing rendering branch in the same function; there is no existing unit-test harness around renderLabel, so no test was added.

Reviewers: the only behavioral change is the new conditional block inside renderLabel; everything else (required asterisk, label suffix, invalid-JSON warning, copy/wand/toggle controls) is untouched.

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

With a sub-block that sets tooltip (e.g. the PI block's "Personal access token" field), an info icon now appears immediately after the field title; hovering it shows the configured text. Fields with no tooltip render exactly as before.

The tooltip field on SubBlockConfig was defined in blocks/types.ts but
never rendered. renderLabel in sub-block.tsx reads title and required
but ignored tooltip, so configs that set it (e.g. pi, textract) showed
no help text.

Render an Info icon with the tooltip text next to the field title,
reusing the Tooltip pattern already used in this file for the invalid
JSON warning.
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 27, 2026 5:57am

Request Review

@cursor

cursor Bot commented Jun 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Presentational UI-only change in the editor label row; no data, auth, or execution paths affected.

Overview
Fixes missing help text for workflow block fields that already define tooltip on SubBlockConfig (e.g. PI and Textract blocks).

When config.tooltip is set, renderLabel now shows a muted Info icon beside the field title; hover displays the configured string via the same Tooltip pattern used for the invalid-JSON warning. Fields without tooltip are unchanged.

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

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR renders configured sub-block tooltips in the editor label area. The main changes are:

  • Adds the Info icon to the existing lucide-react import.
  • Shows an info icon when config.tooltip is present.
  • Uses the existing Tooltip.Root, Tooltip.Trigger, and Tooltip.Content pattern near the sub-block label.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx Adds a conditional tooltip icon and content rendering path for sub-block labels.

Reviews (1): Last reviewed commit: "fix(blocks): render SubBlockConfig.toolt..." | Re-trigger Greptile

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.

fix(blocks): SubBlockConfig.tooltip field defined but not rendered in sub-block label

1 participant