fix(blocks): give a block one tile everywhere it is listed - #6634
Conversation
A block's tile disagreed with the card it named. The canvas brands only third-party integrations and gives everything first-party its role accent, but the command palette, connection lists, tag menus and output pickers all painted straight from the catalog `bgColor` — so Webhook Trigger showed green in the palette and blue on the canvas it was about to be dropped onto, and the five roleless first-party triggers showed catalog blues where the canvas shows neutral. Read the canvas rule from one place (`hasBlockAccent`) and render it through one component (`BlockTile`), then point every surface that lists a block at them: canvas, editor header, preview, toolbar, palette, connection picker, terminal, logs trace rows, connection lists, tag menus, output pickers and the tables workflow sidebar. Folds in the duplication the split had grown: three copies of `TagIcon`, five hand-rolled tile divs, the toolbar's second encoding of the accent rule, a third icon-contrast helper on its own brightness threshold, and the dead `showColoredIcon` prop every caller passed. Tiles now share the chip radius, and the tile forces its own icon colour so popover and command rows painting `[&_svg]:text-*` can no longer wash out a pale brand tile. Large detail headers (preview panel, trace-view detail) keep their own treatment and are left for a follow-up.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Adds Removes duplicated Reviewed by Cursor Bugbot for commit 0dbc209. Configure here. |
Greptile SummaryThe PR centralizes block-tile accent selection and rendering so block-listing surfaces use the same visual identity as the workflow canvas.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/accent.ts | Centralizes the rule distinguishing role-accented first-party blocks from brand-colored third-party integrations. |
| apps/sim/blocks/block-tile.tsx | Introduces the shared tile renderer used to keep block color, icon contrast, sizing, and radius consistent. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.test.tsx | Adds palette coverage for first-party accent tiles and uses a valid statement-level rationale comment inside the test. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx | Migrates the canvas block node to the shared tile component without an eligible unresolved finding. |
Reviews (2): Last reviewed commit: "fix(blocks): give a block one tile every..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ 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 0dbc209. Configure here.
Summary
bgColor. Webhook Trigger showed green in the palette and blue on the canvas it was about to be dropped onto (reported by Emir), and the five roleless first-party triggers (api_trigger,chat_trigger,circleback,input_trigger,manual_trigger) showed catalog blues where the canvas shows neutral.hasBlockAccent) and render it through one component (BlockTile), then point every surface that lists a block at them — canvas, editor header, preview, toolbar, palette, connection picker, terminal, logs trace rows, connection lists, tag menus, output pickers, tables workflow sidebar.TagIcon, 5 hand-rolled tile divs, the toolbar's second encoding of the accent rule, a third icon-contrast helper running its own brightness threshold (0.63 vs 0.75 everywhere else), and the deadshowColoredIconprop that every caller passed as true.[&_svg]:text-*, which outranks a plain utility and was washing out pale brand tiles.Type of Change
Testing
bun run type-checkclean; 2711 workspace tests pass. Newblocks/accent.test.tspins the rule (verified it goes red against the previous one), and a palette test pins that a first-party trigger renders the accent chip while a third-party one keeps its brand tile.Not yet clicked through in a browser — the colour rule is test-covered, but the radius/size unification is worth a visual pass.
Notes
BlockTilereaches the block registry and must not pull it into that bundle.Checklist