diff --git a/components/terminal/autocomplete/AutocompletePopup.tsx b/components/terminal/autocomplete/AutocompletePopup.tsx index 0edf74e83..40bcbdff1 100644 --- a/components/terminal/autocomplete/AutocompletePopup.tsx +++ b/components/terminal/autocomplete/AutocompletePopup.tsx @@ -273,6 +273,10 @@ const AutocompletePopup: React.FC = ({ const clampedLeft = placement.left; const sharedBoxStyle = { + // border-box so each panel's maxWidth is its true outer width (padding + + // border included). The horizontal clamp's totalWidth sums these maxWidths, + // so this keeps the off-screen math exact even for the padded detail panel. + boxSizing: "border-box" as const, backgroundColor: popupBg, border: `1px solid ${popupBorder}`, borderRadius: "6px",