From 6df022900b8a0e1842ee08a3f43cf88f4928cb0b Mon Sep 17 00:00:00 2001 From: Alessandro Pogliaghi Date: Tue, 14 Jul 2026 11:40:02 +0100 Subject: [PATCH] fix(permissions): cap permission prompt height and scroll long content A very long permission request (e.g. a large shell command or MCP tool input) could grow the approval card taller than the viewport, pushing the Allow/Deny buttons off-screen with no way to scroll to them. Cap the ActionSelector card at 80vh and make the pending-action/question region scroll internally, keeping the action buttons pinned and always reachable. Generated-By: PostHog Code Task-Id: 2f1e1451-9626-40b3-80b7-478fe8a43dc8 --- .../action-selector/ActionSelector.tsx | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/primitives/action-selector/ActionSelector.tsx b/packages/ui/src/primitives/action-selector/ActionSelector.tsx index 49699617f3..19e8576f96 100644 --- a/packages/ui/src/primitives/action-selector/ActionSelector.tsx +++ b/packages/ui/src/primitives/action-selector/ActionSelector.tsx @@ -227,9 +227,9 @@ export function ActionSelector({ style={{ outline: "none", }} - className="rounded-(--radius-3) border border-(--gray-6) bg-(--gray-1)" + className="flex max-h-[80vh] flex-col rounded-(--radius-3) border border-(--gray-6) bg-(--gray-1)" > - + {hasSteps && steps && ( ))} - {pendingAction && {pendingAction}} + {(pendingAction || question) && ( + + {pendingAction && ( + {pendingAction} + )} + {question && ( + + {question} + + )} + + )} - - {question} - - {allOptions.map((option, index) => { if (isSubmitOption(option.id) || isCancelOption(option.id)) {