适用于输入框 @、$、#、/ 触发的候选面板(共用 MentionPanel)。
state:projects):不改动滚动位置。用户用滚轮翻到中段后,刷新后仍停在原处。packages/desktop/test/e2e/ui-shell/composer/chat-input-mention-navigation.test.ts
中的 “keeps the wheel scroll position when candidates refresh” 用例:
@前缀 得到长列表。.zcodeignore 去掉最后一个文件(让刷新结果和刷新前有差异),经 Host 广播 state:projects。@,各分组加载完成后首个分组标题与首项在视口内。反馈 ZCT-2122356778527907840(3.18.2):滚轮翻到中段后列表被拉回开头。根因有两处:
面板曾在每次 virtualRows 换引用时滚回选中项;文件、任务分组在 state:projects 刷新时先清空成加载占位,列表高度塌缩。