-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix/profile rename change detection #7557
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
Fix/profile rename change detection #7557
Conversation
- 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]>
There was a problem hiding this 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 theonRenameConfigcallback 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.
webview-ui/src/components/settings/__tests__/SettingsView.spec.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
webview-ui/src/components/settings/__tests__/SettingsView.spec.tsx
Outdated
Show resolved
Hide resolved
webview-ui/src/components/settings/__tests__/SettingsView.spec.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>



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:
setChangeDetected(true)in theonRenameConfigcallback to properly trigger change detection when profiles are renamed.Test Coverage Added:
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.tsxwhere renaming a profile did not enable the save button, and adds comprehensive tests for profile rename scenarios.SettingsView.tsxwhere renaming a profile did not enable the save button.setChangeDetected(true)inonRenameConfigcallback to trigger change detection.SettingsView.spec.tsxto cover profile rename scenarios.This description was created by
for 47b40dd. You can customize this summary. It will automatically update as commits are pushed.