makecindy / makecindy/cindy

新选择器左侧供应商栏项过多时不滚动,溢出叠压到底部「添加模型」footer

Open Beginner friendly
#3,516 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
401
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**客户端版本**: 0.1.64
**反馈类型**: bug

---

## 现象

主会话输入框旁的「新选择器」(统一面板)在使用较多个自定义 API 供应商时,左侧视图筛选栏(rail:★收藏 / 同引擎 / 全部 / 各来源)的格位总高度超过面板可用高度,超出的部分不被裁剪、也不能滚动,直接向下溢出绘制到面板外:多出来的来源图标叠压在底部「添加模型」行的加号按钮上,部分图标甚至超出面板下边缘、盖到下方输入区。右侧模型列表自身可正常滚动,仅左侧 rail 无溢出处理。

## 复现步骤

1. 配置较多自定义 API 供应商(来源数量足够让 rail 格位铺满并超过面板高度)
2. 主会话输入框旁打开模型选择面板(新选择器形态;同样布局也用于 Worker 创建等处的标准模型面板)
3. 观察左侧 rail 底部与「添加模型」footer 区域

## 期望行为

rail 高度受限时在自己内部滚动(或以其它方式收纳多余格位),始终不与底部 footer 重叠。

## 实际行为

rail 不收缩、不滚动、不裁剪,溢出的来源图标绘制到 footer 与面板外区域,视觉上与「添加模型」按钮相互遮挡。

## 源码初步定位(截至当前 main 分支)

- `components/new-chat/UnifiedModelRail.tsx:46` 根节点仅有 `flex w-12 shrink-0 flex-col items-center gap-0.5 border-r px-1.5 py-2`,缺少 `min-h-0` 与纵向滚动/裁剪;父级是行向 flex 容器,rail 子项累计高度超出面板高度时内容按 overflow:visible 向下溢出。
- 对照同级列表列:`components/new-chat/UnifiedModelPanel.tsx:1117` 用了 `flex min-w-0 flex-1 overflow-y-auto` 并显式加 `min-h-0`(该处注释也说明了 min-h-0 对能否滚动的作用),rail 缺了同样的约束。
- 外层的高度钳制链(`ModelSelector.tsx:2756` 起,max-h-full / min-h-0)只把面板列钳进宿主弹层,管不住 rail 自身内容的溢出绘制。

## 建议修法

给 UnifiedModelRail 根节点补 `min-h-0`,并让它内部滚动(如 `overflow-y-auto`,可复用现有 `flashScrollbar` 方案);`w-12 shrink-0` 骨架不变,避免影响现有布局。

## 复现频率

每次都出现(只要来源数量超过面板高度可容纳量即必现),重新打开面板或重启应用均不会恢复。
---
**OS**: darwin arm64 (25.6.0)
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start with components/new-chat/UnifiedModelRail.tsx around line 46 and compare its flex constraints with components/new-chat/UnifiedModelPanel.tsx around line 1117. Inspect the height chain from ModelSelector.tsx around line 2756, then reproduce with enough custom API providers to overflow the rail. Done means the rail contains or scrolls its items without overlapping the footer or input area.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.