Skip to content

feat: Add provider-level todo list toggle with advanced settings section #5624

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 10 commits into
base: main
Choose a base branch
from

Conversation

roomote-bot
Copy link
Collaborator

@roomote-bot roomote-bot commented Jul 12, 2025

This PR implements a provider-level toggle to disable todo lists, similar to the existing diff edits toggle. Both settings are now organized in a collapsible Advanced Settings section to prevent UI crowding.

Key changes:

  • Added todoListEnabled field to provider settings schema
  • Implemented migration logic for global to provider-level settings
  • Created TodoListSettingsControl component for UI toggle
  • Created AdvancedSettingsSection to group diff and todo list settings
  • Updated system prompt generation to respect todoListEnabled setting
  • Updated task creation logic to conditionally include update_todo_list tool
  • Added comprehensive tests for tool inclusion/exclusion logic
  • Added translation keys for new settings UI

The implementation follows established patterns for provider-level settings with automatic migration and backward compatibility. All tests pass and the build is successful.


Important

Adds provider-level toggle for todo lists with migration logic, UI components, and tests, organized in an Advanced Settings section.

  • Behavior:
    • Adds enableTodoList field to provider settings schema in provider-settings.ts.
    • Updates getEnvironmentDetails.ts to conditionally include reminder section based on enableTodoList.
    • Updates task creation logic in Task.ts to conditionally include update_todo_list tool.
  • Migration:
    • Implements migration logic in ProviderSettingsManager.ts to migrate todo list settings to provider-level.
  • UI:
    • Creates TodoListSettingsControl component for UI toggle.
    • Creates AdvancedSettingsSection to group diff and todo list settings.
    • Updates ApiOptions.tsx to include AdvancedSettingsSection.
  • Testing:
    • Adds tests in index.spec.ts to verify tool inclusion/exclusion logic based on enableTodoList.
  • Localization:
    • Adds translation keys for new settings UI in multiple locale files.

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

- Add todoListEnabled field to provider settings schema
- Implement migration logic for global to provider-level settings
- Create TodoListSettingsControl component for UI toggle
- Create AdvancedSettingsSection to group diff and todo list settings
- Update system prompt generation to respect todoListEnabled setting
- Update task creation logic to conditionally include update_todo_list tool
- Add comprehensive tests for tool inclusion/exclusion logic
- Add translation keys for new settings UI

This allows users to disable todo lists at the API profile level,
similar to how diff edits can be disabled, with both toggles
organized in a collapsible advanced settings section.
@roomote-bot roomote-bot requested review from mrubens, cte and jr as code owners July 12, 2025 14:04
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request UI/UX UI/UX related or focused labels Jul 12, 2025
const { t } = useAppTranslation()

const handleTodoListEnabledChange = useCallback(
(e: any) => {
Copy link

Choose a reason for hiding this comment

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

Consider replacing the generic 'any' type for the event parameter with a more specific type (e.g. React.ChangeEvent) for better type safety.

Suggested change
(e: any) => {
(e: React.ChangeEvent<HTMLInputElement>) => {

Copy link

delve-auditor bot commented Jul 12, 2025

No security or compliance issues detected. Reviewed everything up to fb92feb.

Security Overview
  • 🔎 Scanned files: 46 changed file(s)
Detected Code Changes

The diff is too large to display a summary of code 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 12, 2025
@mrubens
Copy link
Collaborator

mrubens commented Jul 12, 2025

@roomote-bot some feedback:

  1. There's no backfill required - there's not currently a setting for this. alwaysAllowUpdateTodoList is something different - it's about whether the user needs to approve the todo list updates. This new feature is about whether the tool should be available to the profile at all.
  2. Put custom temperature and rate limit under the advanced settings toggle as well
  3. The "Advanced Settings" text in the button is running onto two lines for some reason.

Please fix all of that and update the PR.

@roomote-bot
Copy link
Collaborator Author

Hi @mrubens, thanks for the feedback! I understand the issues you've raised:

  1. No backfill required - You're right, there's no existing setting for this provider-level todo list toggle. The alwaysAllowUpdateTodoList is a different global setting that controls user approval for todo list updates, not whether the tool is available at all.

  2. Move settings under Advanced Settings - I'll move the custom temperature and rate limit controls under the advanced settings toggle as well.

  3. Fix text wrapping - I'll address the "Advanced Settings" text running onto two lines.

I'm working on implementing these fixes now and will update the PR shortly. Thanks for the clear guidance!

- Remove unnecessary backfill logic for non-existent setting
- Move temperature and rate limit controls under advanced settings toggle
- Fix text wrapping issue with whitespace-nowrap class

Addresses feedback from issue #5624
@mrubens
Copy link
Collaborator

mrubens commented Jul 12, 2025

@roomote-bot a couple more things:

  1. The UI of the advanced toggle is still not right. The "Advanced Settings" text is overlaid on the caret, and the alignment is weird. Also, the left border when expanded is overkill.
  2. Can you update the references to update_todo_list in the various prompts to be conditional on the feature being enabled?

@roomote-bot
Copy link
Collaborator Author

Hi @mrubens! I've seen your comment and I'm working on both issues:

  1. Advanced Settings UI fixes: I'll fix the text overlay on the caret, alignment issues, and remove the excessive left border when expanded in the CodeIndexPopover component.

  2. Conditional update_todo_list references: I'll update the references to update_todo_list in the various prompts to be conditional based on whether the provider-level todo list toggle feature is enabled.

I'll analyze the current implementation, implement the fixes, and report back with another comment when completed. Thanks for the detailed feedback!

roomote-bot added a commit that referenced this pull request Jul 12, 2025
…tional

- Fix Advanced Settings button layout with proper flex spacing and alignment
- Remove excessive left border when expanded (pl-0)
- Make update_todo_list tool conditional on alwaysAllowUpdateTodoList setting
- Update architect mode instructions to be conditional on tool availability
- Update reminder text to be conditional on feature being enabled
- Filter out empty tool descriptions from tools list
- Update test snapshots to reflect conditional behavior

Fixes issues reported in GitHub issue #5624
roomote-bot and others added 7 commits July 12, 2025 11:34
…tional

- Fix Advanced Settings button layout with proper flex spacing and alignment
- Remove excessive left border when expanded (pl-0)
- Make update_todo_list tool conditional on alwaysAllowUpdateTodoList setting
- Update architect mode instructions to be conditional on tool availability
- Update reminder text to be conditional on feature being enabled
- Filter out empty tool descriptions from tools list
- Update test snapshots to reflect conditional behavior

Fixes issues reported in GitHub issue #5624
@@ -72,7 +72,7 @@ export const modes: readonly ModeConfig[] = [
description: "Plan and design before implementation",
groups: ["read", ["edit", { fileRegex: "\\.md$", description: "Markdown files only" }], "browser", "mcp"],
customInstructions:
"1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps and create a todo list using the `update_todo_list` tool. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n4. As you gather more information or discover new requirements, update the todo list to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine the todo list.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable todo lists rather than lengthy markdown documents. Use the todo list as your primary planning tool to track and organize the work that needs to be done.**",
"1. Do some information gathering (using provided tools) to get more context about the task.\n\n2. You should also ask the user clarifying questions to get a better understanding of the task.\n\n3. Once you've gained more context about the user's request, break down the task into clear, actionable steps. If the `update_todo_list` tool is available, create a todo list using it. Each todo item should be:\n - Specific and actionable\n - Listed in logical execution order\n - Focused on a single, well-defined outcome\n - Clear enough that another mode could execute it independently\n\n4. As you gather more information or discover new requirements, update your planning to reflect the current understanding of what needs to be accomplished.\n\n5. Ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and refine your approach.\n\n6. Include Mermaid diagrams if they help clarify complex workflows or system architecture. Please avoid using double quotes (\"\") and parentheses () inside square brackets ([]) in Mermaid diagrams, as this can cause parsing errors.\n\n7. Use the switch_mode tool to request that the user switch to another mode to implement the solution.\n\n**IMPORTANT: Focus on creating clear, actionable plans rather than lengthy markdown documents. Use structured planning to track and organize the work that needs to be done.**",
Copy link
Collaborator

@mrubens mrubens Jul 12, 2025

Choose a reason for hiding this comment

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

I'm not sure the best thing to do here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

3 participants