Skip to content

fix(copilot): show custom block names in read tool rows - #7044

Merged
j15z merged 2 commits into
stagingfrom
fix/mship-showing-custom-block-id
Aug 24, 2026
Merged

fix(copilot): show custom block names in read tool rows#7044
j15z merged 2 commits into
stagingfrom
fix/mship-showing-custom-block-id

Conversation

@j15z

@j15z j15z commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve organization custom block read paths through the client block registry
  • Show custom block labels and icons in Copilot tool rows instead of raw type IDs
  • Subscribe tool rows and the message parser to custom-block overlay hydration: built-in blocks are in the static registry from first render, but custom blocks arrive from an async query after mount, so a row rendered before hydration (e.g. reloading a chat) resolved to the raw type id and never recomputed

Type of Change

  • Bug fix

Testing

  • bunx vitest run (71 focused tests)
  • bun run type-check
  • bun run lint
  • bun run apps/sim/scripts/check-block-registry.ts origin/staging
  • bun run check:audits
  • bun run docs-manifest:check

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 24, 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 Aug 24, 2026 8:45pm

Request Review

@cursor

cursor Bot commented Aug 24, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Display-only Copilot UI changes with targeted tests; no auth, data, or execution-path changes.

Overview
Copilot read tool rows now resolve organization/custom-blocks/*.json paths through the block registry, so labels show human names (e.g. Invoice Parser) instead of raw type ids.

getReadTargetBlock and resolveToolDisplay were extended for those paths; ToolCallItem and MessageContent subscribe to useCustomBlockOverlayVersion so icons and titles refresh when the custom-block overlay hydrates after mount (same signal as notifyBlockOverlayChanged). MessageContent re-runs parseBlocks when the overlay version changes so display titles update in the transcript.

Tests cover path resolution, display text, and jsdom hydration scenarios for icons and read titles.

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

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR resolves organization custom-block read paths through the client block registry and refreshes existing Copilot read rows when custom-block metadata hydrates.

  • Adds custom-block label and icon resolution for organization read paths.
  • Subscribes parsed messages and tool rows to overlay updates.
  • Adds regression coverage for metadata that becomes available after mount.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported stale metadata path now subscribes to overlay changes and re-resolves both labels and icons after hydration.

Important Files Changed

Filename Overview
apps/sim/lib/copilot/tools/client/read-block.ts Extends read-target resolution to organization custom-block schemas through the overlay-aware block registry.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx Recomputes parsed tool-call display titles whenever the custom-block overlay version changes.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx Re-resolves read-target icons on overlay updates so rows mounted before hydration refresh correctly.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content-overlay.test.tsx Verifies that an already-mounted read title refreshes after custom-block registry hydration.

Reviews (2): Last reviewed commit: "fix(copilot): refresh custom block metad..." | Re-trigger Greptile

Comment thread apps/sim/lib/copilot/tools/client/read-block.ts
@j15z

j15z commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile

@j15z

j15z commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor 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.

✅ 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 913dd20. Configure here.

@j15z
j15z merged commit 49e2bb5 into staging Aug 24, 2026
31 checks passed
@j15z
j15z deleted the fix/mship-showing-custom-block-id branch August 24, 2026 22:06
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