Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: help tooltip renders inline (no portal) to fix positioning in scroll containers

Louis Beaumontc1e5a7d56e48
diff --git a/apps/screenpipe-app-tauri/components/ui/help-tooltip.tsx b/apps/screenpipe-app-tauri/components/ui/help-tooltip.tsx
index cd0d77875..9bc5233c0 100644
--- a/apps/screenpipe-app-tauri/components/ui/help-tooltip.tsx
+++ b/apps/screenpipe-app-tauri/components/ui/help-tooltip.tsx
@@ -4,23 +4,32 @@
import { HelpCircle } from "lucide-react";
import {
- Tooltip,
- TooltipContent,
- TooltipProvider,
- TooltipTrigger,
-} from "@/components/ui/tooltip";
+ Popover,
+ PopoverTrigger,
+} from "@/components/ui/popover";
+import * as PopoverPrimitive from "@radix-ui/react-popover";
+import { cn } from "@/lib/utils";
export function HelpTooltip({ text }: { text: string }) {
return (
- <TooltipProvider>
- <Tooltip>
- <TooltipTrigger asChild>
+ <Popover>
+ <PopoverTrigger asChild>
+ <button type="button" className="inline-flex">
<HelpCircle className="h-3.5 w-3.5 text-muted-foreground/50 hover:text-muted-foreground cursor-default shrink-0 transition-colors duration-150" />
- </TooltipTrigger>
- <TooltipContent side="bottom" align="start" className="max-w-[260px]">
- <p className="text-xs">{text}</p>
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
+ </button>
+ </PopoverTrigger>
+ <PopoverPrimitive.Content
+ side="bottom"
+ align="start"
+ sideOffset={4}
+ collisionPadding={16}
+ className={cn(
+ "z-50 max-w-[260px] rounded-md border bg-popover px-3 py-1.5 text-popover-foreground shadow-md",
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2"
+ )}
+ >
+ <p className="text-xs">{text}</p>
+ </PopoverPrimitive.Content>
+ </Popover>
);
}