Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Jul 31, 2025

This PR moves the "max requests" setting from the auto-approve dropdown menu in the main chat UI to the auto-approve tab in the settings panel.

Changes Made

  • Removed max requests input field from AutoApproveMenu.tsx (auto-approve dropdown in chat)
  • Added max requests setting to AutoApproveSettings.tsx below the execute setting
  • Updated component props and TypeScript types to handle allowedMaxRequests
  • Changed persistence behavior from auto-save to save-button-based persistence
  • Fixed linting issues by removing unused imports

Benefits

  • Better UX: Settings are now consolidated in the dedicated settings panel
  • Consistent behavior: Setting now persists via the "Save" button like other settings
  • Cleaner UI: Removes clutter from the auto-approve dropdown menu
  • Logical grouping: Max requests setting is now grouped with other auto-approve settings

Testing

  • ✅ TypeScript compilation passes
  • ✅ ESLint passes with no warnings
  • ✅ All existing tests pass (246 tests)
  • ✅ Setting appears in correct location in auto-approve settings tab
  • ✅ Setting persists correctly via save button

The functionality remains exactly the same - only the location and persistence method have changed.


Important

Move max requests setting from AutoApproveMenu.tsx to AutoApproveSettings.tsx and change persistence to save-button-based.

  • Behavior:
    • Move max requests setting from AutoApproveMenu.tsx to AutoApproveSettings.tsx.
    • Change persistence from auto-save to save-button-based in SettingsView.tsx.
  • Code Changes:
    • Remove allowedMaxRequests from AutoApproveMenu.tsx.
    • Add allowedMaxRequests input field to AutoApproveSettings.tsx.
    • Update SettingsView.tsx to handle allowedMaxRequests with save button.
  • Misc:
    • Fix linting issues by removing unused imports in AutoApproveMenu.tsx.

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

- Remove max requests input field from AutoApproveMenu.tsx
- Add max requests setting to AutoApproveSettings.tsx below execute setting
- Update component props and types to handle allowedMaxRequests
- Ensure setting persists via save button instead of auto-save
- Fix linting issues by removing unused imports
@roomote roomote bot requested review from cte, jr and mrubens as code owners July 31, 2025 15:42
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Jul 31, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this well-structured PR that improves the UX by consolidating settings! I've reviewed the changes and found one critical issue that needs attention, along with some suggestions for consistency and visual improvements.

input.value = input.value.replace(/[^0-9]/g, "")
const value = parseInt(input.value)
const parsedValue = !isNaN(value) && value > 0 ? value : undefined
setCachedStateField("allowedMaxRequests", parsedValue)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical: Missing immediate persistence behavior. The original implementation in AutoApproveMenu.tsx immediately persisted changes via vscode.postMessage. This new implementation only updates the cached state via setCachedStateField, which means the setting won't be saved until the user clicks the Save button. This creates inconsistent behavior compared to how this setting worked before. Should we maintain the immediate persistence behavior for consistency?

const parsedValue = !isNaN(value) && value > 0 ? value : undefined
setCachedStateField("allowedMaxRequests", parsedValue)
}}
style={{ flex: 1, maxWidth: "200px" }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent styling approach: This section mixes Tailwind classes with inline styles. For consistency with the rest of the component, consider using Tailwind classes throughout or following the existing pattern used by other settings sections.

)}

{/* Max Requests Setting */}
<div className="flex flex-col gap-3 mt-6">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing visual grouping: Unlike other conditional settings sections (read-only, write, execute), this max requests setting doesn't have the visual grouping with left border that indicates it's part of the auto-approve feature set. This makes it appear disconnected from the other settings. Should this be grouped visually with the other auto-approve settings?

<div>{t("settings:autoApprove.apiRequestLimit.title")}</div>
</div>
<div className="flex items-center gap-2">
<VSCodeTextField
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a data-testid attribute for testing consistency with other form elements in the component.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 31, 2025
@brunobergher
Copy link
Collaborator

Closing this for now, will make this move most likely after merging #6484

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 31, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants