From 82ca9613c71822b8ca356febb1dde147a8e1b23c Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Fri, 13 Nov 2026 00:40:53 +1100 Subject: [PATCH] fix(chat): anchor the More popover outside the tooltip chain (#1862) Nested inside TooltipTrigger as-child, PopoverTrigger's PopperAnchor ref resolved to a component object instead of the button, so the popover never became positioned and its content stayed parked off-screen at translate(0, -200%): the menu opened in state only, invisible to the user. Wrapping the tooltip in an explicit PopoverAnchor makes the anchor the real button element, so the menu renders beside it. The tooltip (accessible name More), the menu items, and the rename/branch dialog are unchanged. Adds ui/test/chat-more-menu.test.ts, a browser behaviour check (vite dev server + headless Chrome over CDP, API mocked in-page) that fails on the old nesting with the menu at (0, -526) and passes with it in the viewport; it skips when no Chrome binary is installed. --- ui/src/chat/ChatSessionActions.vue | 37 ++-- ui/test/chat-more-menu.test.ts | 333 +++++++++++++++++++++++++++++ 2 files changed, 355 insertions(+), 15 deletions(-) create mode 100644 ui/test/chat-more-menu.test.ts diff --git a/ui/src/chat/ChatSessionActions.vue b/ui/src/chat/ChatSessionActions.vue index ef071bc69..dc327e205 100644 --- a/ui/src/chat/ChatSessionActions.vue +++ b/ui/src/chat/ChatSessionActions.vue @@ -16,6 +16,7 @@ import { Button } from "@/components/ui/button"; import { Separator } from "@/components/ui/separator"; import { Popover, + PopoverAnchor, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; @@ -100,21 +101,27 @@ function submitPrompt(): void {