Skip to content

fix(custom-blocks): stop image icons blowing up on class-sized surfaces#5878

Merged
TheodoreSpeaks merged 1 commit into
stagingfrom
fix/at-trigger
Jul 23, 2026
Merged

fix(custom-blocks): stop image icons blowing up on class-sized surfaces#5878
TheodoreSpeaks merged 1 commit into
stagingfrom
fix/at-trigger

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • Custom block image icons blew up to full container width on any surface that sizes block icons with a class (size-[14px]) instead of a fixed-size tile wrapper — hit the @-mention dropdown, chat context mention chips, and the files editor mention/slash menus
  • Root cause: makeImageIcon appended a trailing size-full that won the twMerge conflict against every consumer size class; each surface had to be point-patched with inline styles (like the earlier subagent tool-row fix)
  • Inverted the precedence: size-full is now only the default and any consumer size class or inline style wins; tile surfaces that want the image to fill (canvas node, toolbar, search modal, editor headers, terminal, trace view, etc.) opt in with [&_img]:size-full on their fixed wrapper — a missed surface now renders a small icon instead of a page-breaking image
  • Added overflow-hidden to the fill tiles so image corners clip to the tile rounding, brought connection-blocks into the fill contract, sized img icons in the files suggestion menus, and reverted the now-unneeded inline-style workaround in the chat tool-call row

Type of Change

  • Bug fix

Testing

Tested manually against a live workspace with a published custom block: @-mention dropdown renders the uploaded icon at 14px, toolbar tile still fills 16px, canvas tile precedence verified at 24px. lint:check, tsc --noEmit, check:api-validation:strict, and custom-block unit tests all pass.

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 Jul 23, 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 23, 2026 3:27am

Request Review

@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only icon sizing and Tailwind class precedence; no auth, data, or API behavior changes.

Overview
Fixes custom block uploaded image icons rendering at full width on surfaces that size block icons with classes (e.g. size-[14px]) instead of a fixed tile wrapper—mention menus, chat tool rows, and similar flows.

makeImageIcon no longer appends a trailing size-full that won Tailwind merge conflicts against consumer size classes. size-full is the default when nothing else sizes the icon; parent wrappers that want the image to fill a colored tile now opt in with overflow-hidden and [&_img]:size-full (or [&_img]:!size-full where needed). Class-only surfaces get explicit [&_img]:size-[14px] in shared suggestion menu chrome.

Removes the chat subagent tool-row inline width/height workaround now that class sizing works. Touches workflow editor, toolbar, terminal, trace view, tables/chat output pickers, preview/canvas blocks, and workflow-renderer tile headers for the same contract.

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

@greptile-apps

greptile-apps Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR corrects custom-block image sizing across inline and tiled icon surfaces. The main changes are:

  • Makes consumer size classes override the image icon's default size-full.
  • Explicitly fills and clips image icons inside fixed-size tiles.
  • Sizes image icons in file-editor suggestion menus.
  • Removes the obsolete inline sizing workaround from chat tool rows.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/blocks/custom/custom-block-icon.tsx Changes class precedence so consumer dimensions override the default full-size image class.
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/suggestion-menu-chrome.ts Adds 14px sizing and pointer behavior for image-based icons in suggestion rows.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx Removes inline image dimensions now that the shared icon class order is corrected.
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/connection-blocks.tsx Opts image icons into filling the fixed tile while retaining 9px sizing for SVG glyphs.
packages/workflow-renderer/src/workflow-block/workflow-block-view.tsx Makes image icons fill and clip to the fixed 24px workflow-block tile.

Reviews (1): Last reviewed commit: "fix(custom-blocks): stop image icons blo..." | Re-trigger Greptile

@TheodoreSpeaks
TheodoreSpeaks merged commit 0199508 into staging Jul 23, 2026
21 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the fix/at-trigger branch July 23, 2026 08:11
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