Skip to content

✨ feat(chat-input): improve mention menu skill and tool icons#13722

Merged
Innei merged 2 commits into
canaryfrom
feat/chat-input-mention-item-icon
Apr 10, 2026
Merged

✨ feat(chat-input): improve mention menu skill and tool icons#13722
Innei merged 2 commits into
canaryfrom
feat/chat-input-mention-item-icon

Conversation

@Innei

@Innei Innei commented Apr 10, 2026

Copy link
Copy Markdown
Member

πŸ’» Change Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ‘· build
  • ⚑️ perf
  • βœ… test
  • πŸ“ docs
  • πŸ”¨ chore

πŸ”— Related Issue

N/A

πŸ”€ Description of Change

  • improve ChatInput mention menu rendering for skill and tool entries
  • normalize placeholder avatar values such as MCP_AVATAR so they no longer leak into the UI as raw text
  • use theme-aware fallback icons for missing skill avatars to preserve contrast in dark mention popups
  • keep mention icon frames clipped so avatar fallback content cannot break menu layout

πŸ§ͺ How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

πŸ“Έ Screenshots / Videos

Before After
Mention menu could display raw placeholder avatar text and low-contrast skill fallback icons Mention menu shows stable MCP/skill fallback icons with correct contrast and clipped icon frames

πŸ“ Additional Information

  • previous cross-repository PR became unusable after the fork repository was removed, so this PR recreates the change from the upstream branch

Innei added 2 commits April 10, 2026 20:35
- Add MentionItemIcon with SkillAvatar, McpIcon, and Avatar fallbacks
- Strip placeholder avatars ending with _AVATAR
- Tweak mention item icon frame (overflow, border-radius)

Made-with: Cursor
Copilot AI review requested due to automatic review settings April 10, 2026 13:12
@vercel

vercel Bot commented Apr 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Apr 10, 2026 1:12pm

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@codecov

codecov Bot commented Apr 10, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 66.55%. Comparing base (b95720d) to head (08d0f5e).
⚠️ Report is 3 commits behind head on canary.

Additional details and impacted files
@@            Coverage Diff            @@
##           canary   #13722     +/-   ##
=========================================
  Coverage   66.55%   66.55%             
=========================================
  Files        2023     2023             
  Lines      170857   170857             
  Branches    20591    17330   -3261     
=========================================
  Hits       113708   113708             
  Misses      57025    57025             
  Partials      124      124             
Flag Coverage Ξ”
app 58.55% <ΓΈ> (ΓΈ)
database 92.66% <ΓΈ> (ΓΈ)
packages/agent-runtime 79.72% <ΓΈ> (ΓΈ)
packages/context-engine 83.33% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.36% <ΓΈ> (ΓΈ)
packages/file-loaders 87.02% <ΓΈ> (ΓΈ)
packages/memory-user-memory 74.74% <ΓΈ> (ΓΈ)
packages/model-bank 99.86% <ΓΈ> (ΓΈ)
packages/model-runtime 84.29% <ΓΈ> (ΓΈ)
packages/prompts 70.05% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/utils 90.14% <ΓΈ> (ΓΈ)
packages/web-crawler 88.66% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 65.79% <ΓΈ> (ΓΈ)
Services 52.12% <ΓΈ> (ΓΈ)
Server 66.35% <ΓΈ> (ΓΈ)
Libs 52.82% <ΓΈ> (ΓΈ)
Utils 91.01% <ΓΈ> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the ChatInput mention menu to render skill/tool icons more consistently by introducing a dedicated icon component, handling placeholder avatar strings (e.g. MCP_AVATAR) so they don’t appear as raw text, and ensuring icon frames stay clipped within the menu layout.

Changes:

  • Replace inline skill/tool avatar rendering with a new MentionItemIcon component that normalizes placeholder avatar values and provides category-based fallbacks.
  • Improve mention menu icon frame styling to prevent overflow and keep icons clipped with consistent rounding.
  • Remove now-unneeded React createElement usage from mention category generation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/features/ChatInput/InputEditor/useMentionCategories.tsx Switches skill/tool item icon rendering to MentionItemIcon and removes the old inline avatar renderer.
src/features/ChatInput/InputEditor/MentionMenu/style.ts Adds overflow clipping and rounding to the icon container to prevent layout breakage from fallback content.
src/features/ChatInput/InputEditor/MentionItemIcon.tsx New component that normalizes placeholder avatar strings and provides skill/tool fallback icons or an Avatar when available.

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Innei Innei merged commit b5f98bd into canary Apr 10, 2026
51 checks passed
@Innei Innei deleted the feat/chat-input-mention-item-icon branch April 10, 2026 17:35
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.

2 participants