Skip to content

fix(ui): keep permission dock buttons in view on long requests#29004

Closed
Arcadi4 wants to merge 1 commit into
anomalyco:devfrom
Arcadi4:fix/web-ui-permission-overflow
Closed

fix(ui): keep permission dock buttons in view on long requests#29004
Arcadi4 wants to merge 1 commit into
anomalyco:devfrom
Arcadi4:fix/web-ui-permission-overflow

Conversation

@Arcadi4

@Arcadi4 Arcadi4 commented May 23, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #28979

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A long permission.patterns could push the permission dock past its slot under the session header. The page's overflow: hidden then clipped the action buttons off-screen.

The fix:

  1. max-height: min(40dvh, calc(100dvh - var(--sticky-accordion-top, 0px))) — caps the dock height to ~40% of the viewport while reserving the inherited sticky-header offset (--sticky-accordion-top is already set inline on the scroll container in message-timeline.tsx when the session title is shown).
  2. :has(> permission-patterns) { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr); align-items: stretch } — the load-bearing scroll fix. The intermediate permission-row (a grid) was missing min-height: 0, so it grew to fit its children and overflow-y: auto on permission-patterns never engaged. Forcing the grid track to minmax(0, 1fr) finally constrains the child.
  3. overscroll-behavior: contain + bottom-only mask-image — scroll doesn't bubble to the page, and a 24px fade at the bottom edge signals more content below.

How did you verify your code works?

Reproduced the bug with a Playwright fixture that injects a PermissionV1.Request with 40 long bash patterns into a mock-server-backed session (uses the mockOpenCodeServer pattern from packages/app/e2e/utils/mock-server.ts). See the verification script in the comment below.

Screenshots / recordings

The content body is scrollable.

PixPin_2026-06-23_20-28-01

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@Arcadi4 Arcadi4 requested a review from adamdotdevin as a code owner May 23, 2026 16:22
Cap the dock with a measured max-height matching the available slot
under the session header, and make the patterns row a flex grid track
with min-height: 0 so long content scrolls inside the dock with a fading
bottom mask instead of pushing the action buttons off-screen.
@Arcadi4 Arcadi4 force-pushed the fix/web-ui-permission-overflow branch from 942bd41 to c2f68a5 Compare May 23, 2026 16:28
@thdxr thdxr requested review from Brendonovich and Hona as code owners June 11, 2026 00:18
@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

@Arcadi4

Arcadi4 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@Hona @Brendonovich As this is automatically closed, I opened a new one #33563. Please consider reviewing that one instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Cannot click the permission button when the request is SUPER FREAKING LONG

1 participant