fix: clip QuickAddAgentPopover items to container border-radius

Add overflow-hidden to PopoverContent so hover backgrounds on the
bottom item stay clipped within the rounded corners. Also restore
role=menu on the keyboard-navigable container (lost during revert).
This commit is contained in:
Taylor Ho
2026-05-20 08:58:40 -07:00
parent 91f398f68e
commit 940935f563

View File

@@ -301,9 +301,14 @@ export function QuickAddAgentPopover({
return (
<Popover open={open} onOpenChange={onOpenChange}>
<PopoverTrigger asChild>{children}</PopoverTrigger>
<PopoverContent align="end" className="w-72 p-0" sideOffset={6}>
<PopoverContent
align="end"
className="w-72 overflow-hidden p-0"
sideOffset={6}
>
<div
className="flex max-h-80 flex-col"
role="menu"
onKeyDown={(e) => {
const container = e.currentTarget;
const buttons = Array.from(
@@ -344,7 +349,11 @@ export function QuickAddAgentPopover({
No agents available.
</div>
) : (
<div aria-label="Available agents" className="py-1" role="listbox">
<div
aria-label="Available agents"
className="py-1"
role="listbox"
>
{items.map((item) => {
const itemKey = getItemKey(item);
const isInChannel = item.kind === "running-in-channel";