Skip to content

fix: prevent auto-approve menu overflow #5578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daniel-lxs
Copy link
Collaborator

@daniel-lxs daniel-lxs commented Jul 10, 2025

Description

Fixes the auto-approve menu overflow issue when expanded with all 10 toggles visible.

Problem

When the auto-approve menu is expanded, it shows all 10 toggle buttons (each 80px tall) plus additional UI elements, easily exceeding 800px total height. Without height constraints, the menu pushes other content out of view.

Solution

  • Added Tailwind classes max-h-[400px] overflow-y-auto to the expanded content container
  • This limits the menu height and adds a scrollbar when needed
  • Maintains all functionality while keeping the UI usable

Changes

  • Modified AutoApproveMenu.tsx to add height constraint with Tailwind classes
  • Added comprehensive tests to verify the overflow behavior

Testing

  • All tests pass ✅
  • Menu properly scrolls when content exceeds 400px
  • Collapse/expand functionality works as expected

Important

Fixes overflow in AutoApproveMenu by adding height constraint and scrollbar, with tests to verify behavior.

  • UI Fix:
    • In AutoApproveMenu.tsx, added Tailwind classes max-h-[400px] overflow-y-auto to limit menu height and add scrollbar.
  • Testing:
    • Added tests in AutoApproveMenu.spec.tsx to verify menu expands/collapses correctly and handles overflow with scrollbar.
    • Tests ensure enabled actions list displays correctly when toggles are active.

This description was created by Ellipsis for 1c29772. You can customize this summary. It will automatically update as commits are pushed.

- Add max-h-[400px] and overflow-y-auto Tailwind classes to expanded content
- Ensures menu remains usable when all 10 toggles are displayed
- Add tests to verify overflow behavior
@daniel-lxs daniel-lxs requested review from mrubens, cte and jr as code owners July 10, 2025 18:54
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Jul 10, 2025
Copy link

delve-auditor bot commented Jul 10, 2025

No security or compliance issues detected. Reviewed everything up to 1c29772.

Security Overview
  • 🔎 Scanned files: 2 changed file(s)
Detected Code Changes
Change Type Relevant files
Bug Fix ► AutoApproveMenu.tsx
    Add scrollable container with max height for expanded content
► AutoApproveMenu.spec.tsx
    Add tests for overflow behavior
Refactor ► McpToolRow.tsx
    Update UI components and styling
► McpView.tsx
    Modify server toggle implementation
► McpToolRow.spec.tsx
    Update tests for UI changes

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 10, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Jul 10, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: PR [Needs Review]
Development

Successfully merging this pull request may close these issues.

2 participants