Skip to content

feat(chat): show block display names and brand icons for schema reads#5666

Merged
waleedlatif1 merged 1 commit into
stagingfrom
feat/chat-read-block-titles
Jul 14, 2026
Merged

feat(chat): show block display names and brand icons for schema reads#5666
waleedlatif1 merged 1 commit into
stagingfrom
feat/chat-read-block-titles

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Tool rows for copilot read calls on block/integration schemas now show the block's display name instead of the raw type id ("Read Gmail" instead of "Read gmail_v2")
  • The block's brand icon renders inline before the label, using the existing getBareIconStyle theme-safe bare-icon pattern
  • New getReadTargetBlock resolver handles components/blocks/{type}.json (via getBlock) and components/integrations/{service}/... (via getLatestBlock, so legacy variants resolve to the canonical block); every other path keeps the existing generic labeling

Type of Change

  • Improvement

Testing

Unit tests for the resolver and the read-title wiring; full home + copilot suites passing (852 tests), typecheck clean

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 14, 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 Jul 14, 2026 2:31am

Request Review

@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only labeling and icon display for copilot read tools; no auth, data, or execution path changes.

Overview
Copilot read tool rows in agent groups now use human-friendly block names and inline brand icons when the path targets a block or integration schema, instead of raw type ids like gmail_v2.

A new getReadTargetBlock resolver maps components/blocks/{type}.json via getBlock and components/integrations/{service}/... via getLatestBlock; other VFS paths keep existing labels. resolveToolDisplay in store-utils uses the block’s name for titles (e.g. “Read Gmail”), and ToolCallItem receives params, resolves the block for read calls, and renders the block icon with getBareIconStyle. AgentGroup forwards params into each tool row. Unit tests cover the resolver and read-title behavior; global vitest block registry mock adds getLatestBlock.

Reviewed by Cursor Bugbot for commit fc254c0. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes copilot read tool rows show friendlier schema targets. The main changes are:

  • Resolves block schema paths to block display names.
  • Resolves integration component paths to the latest service block.
  • Shows the resolved block brand icon in agent tool rows.
  • Adds resolver and display-title tests.
  • Extends the Vitest block-registry mock for getLatestBlock.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
apps/sim/lib/copilot/tools/client/read-block.ts Adds the read-target resolver for block and integration component paths.
apps/sim/lib/copilot/tools/client/store-utils.ts Uses the resolver before generic read-target labeling.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx Renders the resolved block icon next to read tool labels.
apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx Passes tool-call params into the tool-call row component.
apps/sim/lib/copilot/tools/client/read-block.test.ts Adds tests for read-target block resolution.
apps/sim/lib/copilot/tools/client/store-utils.test.ts Adds display-title tests for schema read labels.
apps/sim/vitest.setup.ts Adds getLatestBlock to the shared registry mock.

Reviews (2): Last reviewed commit: "feat(chat): show block display names and..." | Re-trigger Greptile

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

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1 waleedlatif1 merged commit 09d58cc into staging Jul 14, 2026
18 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/chat-read-block-titles branch July 14, 2026 02:39
@waleedlatif1

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 fc254c0. Configure here.

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