[PR #3976] Fix permission modal scroll issue when permissions stack #10832

Closed
opened 2026-02-16 18:15:35 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3976

State: closed
Merged: No


Fix Permission Modal Scroll Issue

Problem

When stacked permissions appear (e.g., long edits), the view doesn't scroll to show the permission context, making it hard to review what you're approving without manually scrolling up.

Solution

Added modal-based permission UI that:

  • Auto-scrolls to bottom before showing the modal
  • Displays syntax-highlighted diffs in split view
  • Persists "always accept" approvals to opencode.json
  • Provides responsive layout with scrollable content

Changes

  • New dialog-permission.tsx component with full permission review UI
  • Auto-scroll before permission modal opens
  • Config file persistence for approved permissions
  • Vertically centered modal with dynamic sizing

Notes

  • AI assisted: This PR was created with Claude Code assistance
  • Open to changes: Feel free to modify styling, refactor, or adjust anything to match project standards
  • Core goal: Just want the scroll/stacking issue fixed so permissions are visible without manual scrolling

Testing

  1. Trigger a large edit that requires permission
  2. Modal should appear with content scrolled to bottom
  3. Diff should be visible with syntax highlighting
  4. "Always accept" should persist to opencode.json
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3976 **State:** closed **Merged:** No --- # Fix Permission Modal Scroll Issue ## Problem When stacked permissions appear (e.g., long edits), the view doesn't scroll to show the permission context, making it hard to review what you're approving without manually scrolling up. ## Solution Added modal-based permission UI that: - Auto-scrolls to bottom before showing the modal - Displays syntax-highlighted diffs in split view - Persists "always accept" approvals to `opencode.json` - Provides responsive layout with scrollable content ## Changes - New `dialog-permission.tsx` component with full permission review UI - Auto-scroll before permission modal opens - Config file persistence for approved permissions - Vertically centered modal with dynamic sizing ## Notes - **AI assisted**: This PR was created with Claude Code assistance - **Open to changes**: Feel free to modify styling, refactor, or adjust anything to match project standards - **Core goal**: Just want the scroll/stacking issue fixed so permissions are visible without manual scrolling ## Testing 1. Trigger a large edit that requires permission 2. Modal should appear with content scrolled to bottom 3. Diff should be visible with syntax highlighting 4. "Always accept" should persist to opencode.json
yindo added the pull-request label 2026-02-16 18:15:35 -05:00
yindo closed this issue 2026-02-16 18:15:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10832