From ccff20dae74e7cb6f10612e39bf3b192c0ad00b7 Mon Sep 17 00:00:00 2001 From: ShalokShalom Date: Fri, 20 Nov 2026 14:23:01 +0100 Subject: [PATCH] Keep the host settings action out of the host row's pressable The gear sat in the row's trailing slot, which ComboboxItem renders inside its own pressable, so the row was a button containing a button. HTML forbids that: React aborts the press handling, which is why the first click on the host picker produced a hydration error and only the second one opened anything. ComboboxItem gains a trailingAction slot that renders beside the row's pressable instead of inside it. The split row carries the hover and active background, the pressable keeps the row's padding, and the action column sits outside the click target, so the gear reaches host settings on the first click. --- .../app/src/components/hosts/host-picker.tsx | 4 +- packages/app/src/components/ui/combobox.tsx | 92 +++++++++++++++++-- 2 files changed, 84 insertions(+), 12 deletions(-) diff --git a/packages/app/src/components/hosts/host-picker.tsx b/packages/app/src/components/hosts/host-picker.tsx index ced0be3d55..8a8c8a3fb1 100644 --- a/packages/app/src/components/hosts/host-picker.tsx +++ b/packages/app/src/components/hosts/host-picker.tsx @@ -87,7 +87,7 @@ export function HostPickerOption({ }, [onOpenHostSettings, serverId], ); - const trailingSlot = useMemo(() => { + const trailingAction = useMemo(() => { if (!onOpenHostSettings) return undefined; return ( ` inside a + * `