Skip to content

[desktop] fix model selector dropdown scroll and truncated name tooltip#3647

Merged
esengine merged 1 commit into
esengine:main-v2from
Li-Charles-One:fix/3628-model-selector-scroll
Jun 10, 2026
Merged

[desktop] fix model selector dropdown scroll and truncated name tooltip#3647
esengine merged 1 commit into
esengine:main-v2from
Li-Charles-One:fix/3628-model-selector-scroll

Conversation

@Li-Charles-One

Copy link
Copy Markdown
Contributor

问题

  1. 模型名称显示不全 ([Bug]: 选择模型名称存在显示不全的问题 #3628):当模型名称较长时(如 siliconflow 平台的模型带前缀),下拉列表中会被截断显示为 "deepseek-v4-...",用户无法确认完整名称。

  2. 模型列表无法滚动 ([Feature]: 模型列表显示不全,无法滚动 #3629):当配置的模型数量较多时,下拉列表没有滚动条,超出屏幕的模型无法选择。

修复

1. 添加滚动支持

.modelsw__menu 添加:

  • max-height: 280px — 限制下拉列表最大高度
  • overflow-y: auto — 超出时显示滚动条

2. 添加 Tooltip 显示完整名称

给模型名称和提供商名称添加 title 属性,鼠标悬停时显示完整文本:

  • <span className="modelsw__model" title={m.model}>
  • <span className="modelsw__provider" title={providerLabel(...)}>

验证

  • npm run typecheck 通过
  • npm run check:css 通过
  • npm test 通过(93 tests)

截图

修复前:模型名称被截断,长列表无法滚动
修复后:鼠标悬停显示完整名称,列表可滚动

@github-actions github-actions Bot added desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 9, 2026
@SivanCola

Copy link
Copy Markdown
Collaborator

建议放张真实的图,或者生成一张mock数据的效果图

@Li-Charles-One Li-Charles-One force-pushed the fix/3628-model-selector-scroll branch from f9c81c1 to 5802ad9 Compare June 9, 2026 08:27
@Li-Charles-One

Copy link
Copy Markdown
Contributor Author

效果说明

修复前:

  • 模型名称过长时被截断(如 \siliconflow/qwen2.5-...\),无法看到完整名称
  • 模型数量多时列表无滚动条,超出屏幕的模型无法选择

修复后:

  • 列表添加 \max-height: 280px\ + \overflow-y: auto\,超出时可滚动
  • 截断的名称和提供商添加了 \ itle\ 属性,鼠标悬停时浏览器原生 tooltip 显示完整文本(如 \siliconflow/qwen2.5-72b-instruct\)
  • 滚动条使用细条样式(6px),与主题颜色一致

💡 悬停截断的名称会显示完整文本,列表可滚动

验证: typecheck ✅ check:css ✅ test ✅ (93 tests)

@Li-Charles-One

Copy link
Copy Markdown
Contributor Author

建议放张真实的图,或者生成一张mock数据的效果图

[](url
98c49f7b82cab57734b9281447b45f0f
)

…d names (esengine#3628, esengine#3629)

- Add max-height and overflow-y: auto to model dropdown menu
- Add title attribute to model name and provider for full text tooltip
- Fixes long model names being truncated without way to see full name
- Fixes model list not being scrollable when there are many models
@Li-Charles-One Li-Charles-One force-pushed the fix/3628-model-selector-scroll branch from 5802ad9 to 125265c Compare June 10, 2026 03:46

@esengine esengine left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks, this tidies up the model switcher nicely.

@esengine esengine merged commit 71247d7 into esengine:main-v2 Jun 10, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants