From 19af93743024af841cc5aa0fc84227037e6710c1 Mon Sep 17 00:00:00 2001 From: 4rcadia <97033226+Arcadi4@users.noreply.github.com> Date: Sat, 23 May 2026 12:13:36 -0400 Subject: [PATCH] fix(ui): keep permission dock buttons in view on long requests Long permission.patterns push the dock footer buttons off-screen. Cap the dock with a viewport-relative max-height that also reserves the inherited sticky-header offset, and constrain the patterns grid row with min-height: 0 / minmax(0, 1fr) so overflow-y: auto engages instead of growing the wrapper. A bottom-only mask fades the scroll edge; no JavaScript measurement or runtime resize observers needed. --- packages/ui/src/components/message-part.css | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/message-part.css b/packages/ui/src/components/message-part.css index 78d574d8a135..6f37c0a46ff1 100644 --- a/packages/ui/src/components/message-part.css +++ b/packages/ui/src/components/message-part.css @@ -720,7 +720,7 @@ flex-direction: column; gap: 0; min-height: 0; - max-height: 100dvh; + max-height: min(40dvh, calc(100dvh - var(--sticky-accordion-top, 0px))); [data-slot="permission-body"] { display: flex; @@ -746,6 +746,13 @@ align-items: center; } + [data-slot="permission-row"]:has(> [data-slot="permission-patterns"]) { + flex: 1; + min-height: 0; + grid-template-rows: minmax(0, 1fr); + align-items: stretch; + } + [data-slot="permission-icon"] { display: inline-flex; align-items: center; @@ -792,8 +799,11 @@ flex: 1; min-height: 0; overflow-y: auto; + overscroll-behavior: contain; scrollbar-width: none; -ms-overflow-style: none; + -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%); + mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent 100%); &::-webkit-scrollbar { display: none;