Skip to content

Conversation

@NoahJenkins
Copy link

@NoahJenkins NoahJenkins commented Aug 30, 2025

This fix addresses a UI bug where the save button remained disabled after renaming an API configuration profile in the Settings view. The issue arose because profile rename operations didn’t trigger the change detection mechanism, preventing users from saving their changes.

Changes Made:

  • SettingsView.tsx: Added setChangeDetected(true) in the onRenameConfig callback to properly trigger change detection when profiles are renamed.
  • SettingsView.spec.tsx: Added a comprehensive test suite covering profile rename scenarios.

Test Coverage Added:

  • Save button enablement when a profile is renamed.
  • VSCode message sending on rename operations.
  • Save functionality after a profile is renamed.
  • Save button state after a successful save.
  • Unsaved changes dialog when navigating away.
  • Dialog interaction (discard vs cancel) behavior.

Problem Solved:

Before: Users could rename profiles, but the save button remained disabled, preventing them from persisting changes.
After: Renaming a profile now properly enables the save button and integrates with the existing change detection system, including unsaved changes warnings.

Technical Details:

The fix ensures that profile rename operations are treated as change events, triggering the change detection mechanism and allowing users to save their changes.
Modifications that require saving are now tracked alongside other UI settings changes. The change detection mechanism now properly tracks profile renames.


Important

Fixes issue in SettingsView.tsx where renaming a profile did not enable the save button, and adds comprehensive tests for profile rename scenarios.

  • Behavior:
    • Fixes issue in SettingsView.tsx where renaming a profile did not enable the save button.
    • Adds setChangeDetected(true) in onRenameConfig callback to trigger change detection.
  • Tests:
    • Adds tests in SettingsView.spec.tsx to cover profile rename scenarios.
    • Tests include save button enablement, VSCode message sending, save functionality, unsaved changes dialog, and dialog interaction behavior.
  • Problem Solved:
    • Previously, users could not save changes after renaming a profile due to disabled save button.
    • Now, renaming a profile enables the save button and integrates with change detection.

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

NoahJenkins and others added 2 commits August 30, 2025 13:00
- Add setChangeDetected(true) when profile is renamed in SettingsView
- Add comprehensive test coverage for profile rename change detection
- Ensure unsaved changes dialog appears when navigating away after rename
- Fix UI state consistency for profile management operations

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copilot AI review requested due to automatic review settings August 30, 2025 18:19
@NoahJenkins NoahJenkins requested review from cte, jr and mrubens as code owners August 30, 2025 18:19
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Aug 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a UI bug where the save button remained disabled after renaming an API configuration profile in the Settings view. The issue was that profile rename operations didn't trigger the change detection mechanism.

  • Added setChangeDetected(true) in the onRenameConfig callback to properly trigger change detection
  • Added comprehensive test coverage for profile rename scenarios
  • Ensured profile renames integrate with the existing change detection system including unsaved changes warnings

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
SettingsView.tsx Added change detection trigger when profiles are renamed
SettingsView.spec.tsx Added comprehensive test suite covering profile rename change detection scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@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 your contribution! I've reviewed the changes and found that while the core fix is correct, there are some issues that need attention before merging.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Aug 30, 2025
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 1, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Sep 2, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 2, 2025
@daniel-lxs
Copy link
Member

I'm unable to reproduce the issue, I can save the API profile without any issue and the change is reflected without any problems:
image
image
image
The little checkmark button is the save button for the rename.

This might be a bit confusing but I would recommend opening a new issue for that, let me know if you have any questions!

@daniel-lxs daniel-lxs closed this Sep 2, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 2, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Sep 2, 2025
@NoahJenkins NoahJenkins deleted the fix/profile-rename-change-detection branch September 2, 2025 15:05
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 Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants