Skip to content

fix(access): cap approve/reject dialogs to viewport with internal scroll - #726

Open
surojitchowdhury wants to merge 2 commits into
databrickslabs:developmentfrom
surojitchowdhury:fix/access-dialog-scroll-687
Open

fix(access): cap approve/reject dialogs to viewport with internal scroll#726
surojitchowdhury wants to merge 2 commits into
databrickslabs:developmentfrom
surojitchowdhury:fix/access-dialog-scroll-687

Conversation

@surojitchowdhury

@surojitchowdhury surojitchowdhury commented Aug 14, 2026

Copy link
Copy Markdown

Fixes #687

Summary

The notification-launched Approve/Reject access dialogs had no height cap and no internal scroll, so with tall content the dialog grew past the viewport and the Approve/Deny (Reject) buttons fell off-screen (only reachable by zooming the browser out). This caps each dialog to the viewport, scrolls the body internally, and pins the header + action footer so the buttons stay reachable at 100% zoom for any content height.

Before / After (UI)

Same access-request dialog, same content, at a short viewport (~620px tall).

Before (development) — the dialog overflows the viewport: the header is clipped at the top and the Deny / Approve buttons fall off-screen with no way to scroll to them (workaround was zooming the browser out).

Before: approve/deny buttons off-screen

After (this PR) — the dialog caps to the viewport: the header + action footer are pinned and the body scrolls internally, so Deny / Approve stay reachable at 100% zoom.

After: buttons pinned, body scrolls

Change (targeted per-dialog — shared ui/dialog.tsx untouched)

Both handle-access-grant-dialog.tsx and workflow-approval-response-dialog.tsx:

  • DialogContent: add flex flex-col max-h-[85vh] overflow-hidden (flex column capped to 85% of viewport height; flex overrides the base grid via tailwind-merge, base gap-4 still applies).
  • Header: shrink-0 (stays pinned).
  • Body: flex-1 overflow-y-auto so only the middle scrolls; px-1 -mx-1 for focus-ring breathing room. In the workflow dialog a scroll wrapper was added around the content so the footer remains a non-scrolling sibling.
  • DialogFooter: shrink-0 (pinned, always visible).

Scope decision

Fixed per-dialog rather than in the shared DialogContent, whose base is used by every dialog in the app — a central max-h/overflow/flex change would have broad blast radius. The two affected dialogs already have header/body/footer structure, so a ~10-line scoped change fully resolves #687 without risking other dialogs.

Gates

  • yarn type-check (tsc --noEmit): pass.
  • yarn build: success (pre-existing chunk-size warning only).
  • eslint: no new problems (the two files' existing warnings are pre-existing, identical on untouched HEAD).

…abrickslabs#687)

The notification-launched Approve/Reject access dialogs had no height
cap and no internal scroll, so tall content pushed the action buttons
past the viewport, leaving them unreachable at 100% zoom.

Make both dialogs a flex column capped at max-h-[85vh] with overflow
hidden: the header and footer stay shrink-0 (pinned) while the middle
body scrolls (flex-1 overflow-y-auto). The action buttons remain
visible regardless of content height.

Targeted per-dialog fix; the shared ui/dialog.tsx base is left
untouched to avoid regressing every other dialog in the app.

- handle-access-grant-dialog.tsx (Deny/Approve)
- workflow-approval-response-dialog.tsx (Reject/Approve)

Co-authored-by: Isaac
@surojitchowdhury
surojitchowdhury marked this pull request as ready for review August 14, 2026 10:44
@surojitchowdhury
surojitchowdhury requested a review from a team August 14, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Access approve/reject dialogs lack max-height/scroll — Approve/Deny buttons fall off-screen on tall content

1 participant