
bug: session/trace view does not render all annotation queues in dropdown
快速结论:在 Langfuse Session/Trace 视图中,通过“Annotate”下拉菜单选择 Annotation Queue 时,如果队列数量超过浏览器可视高度,下拉菜单不会出现滚动条,导致部分队列无法被选中。优先排查 DropdownMenuContent 组件是否缺少 max-height 和 overflow-y-auto 样式。
问题场景
用户在 Langfuse 自托管实例(版本 3.174.0)的 Session 或 Trace 视图页面中,点击“Annotate”按钮旁边的下拉菜单,尝试将会话或追踪添加到某个 Annotation Queue 时触发。该问题在 Safari、Firefox 和 Chrome 中均可复现。
报错原文
Bug: When trying to add a session or trace to an annotation queue via the dropdown selector in the session / trace view, the dropdown is not scrollable and thus prevents selecting the appropriate annotation queue if you have more annotation queues than window height in the browser.
Resizing the browser window hides annotation queues with no way to select them.
原因分析
该 Bug 的根本原因是 DropdownMenuContent 组件使用了 overflow-hidden 样式,但没有设置 max-height 或滚动行为。因此当 Annotation Queue 列表超出视口高度时,超出部分被直接裁剪,用户无法通过滚动查看更多选项。
环境排查
- Langfuse 版本:3.174.0(自托管)
- 浏览器:Safari / Firefox / Chrome(非浏览器差异问题)
- 受影响前端文件:
web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx - 基础组件文件:
web/src/components/ui/dropdown-menu.tsx(第 69 行附近存在overflow-hidden样式)
解决步骤
-
定位文件:打开
web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx。 -
修改第 139 行:找到
<DropdownMenuContent>组件,添加className属性,设置max-h-[300px] overflow-y-auto。// 修改前 <DropdownMenuContent> // 修改后 <DropdownMenuContent className="max-h-[300px] overflow-y-auto"> -
一致性说明:该模式已在代码库中其他地方使用(例如
MultiSelectKeyValues组件采用了max-h-[300px] overflow-y-auto作为可滚动下拉菜单的样式),因此该修改符合现有惯例。
验证方法
重新构建前端并部署后,在 Session 或 Trace 视图中打开“Annotate”下拉菜单,确保当 Annotation Queue 数量超出浏览器可视高度时,下拉菜单出现竖直滚动条,所有队列均可被滚动选中。可以尝试缩小/放大浏览器窗口来模拟不同视口高度。


![[Question]: using latest image(v0.23.1) can not enable docling](https://www.chat-gpts.plus/wp-content/uploads/2026/06/12440-35fa5ab2-768x403.jpg)