Commit 7ca4901
* fix: prevent empty mode names from being saved (fixes #5766)
- Add frontend validation in ModesView to prevent empty names from being saved
- Add onBlur handler to restore original name if field is left empty
- Add backend validation in CustomModesManager.updateCustomMode using modeConfigSchema
- Provide user feedback when validation fails
- Trim whitespace from mode names before validation
This prevents YAML parsing errors caused by empty mode name fields.
* fix: improve UX by allowing users to empty mode name field
- Remove restriction that prevented users from emptying the name field
- Remove onBlur handler that automatically restored original name
- Allow backend validation to handle empty names and show appropriate errors
- Users can now type freely but invalid saves are prevented by backend validation
Addresses feedback from @daniel-lxs in PR #5767
* fix: allow emptying mode name field but prevent saving when invalid
- Modified onBlur handler to check if name is empty before saving
- If empty, revert to original name instead of saving empty value
- This provides better UX as requested in PR review
* fix: add proper JSON formatting to source map writes for Windows compatibility
---------
Co-authored-by: Roo Code <[email protected]>
1 parent c34e412 commit 7ca4901
File tree
3 files changed
+25
-13
lines changed- src/core/config
- webview-ui/src
- components/modes
- vite-plugins
3 files changed
+25
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
| |||
786 | 790 | | |
787 | 791 | | |
788 | 792 | | |
789 | | - | |
| 793 | + | |
790 | 794 | | |
791 | 795 | | |
792 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
755 | 755 | | |
756 | 756 | | |
757 | 757 | | |
758 | | - | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
759 | 761 | | |
760 | 762 | | |
761 | 763 | | |
762 | | - | |
| 764 | + | |
| 765 | + | |
763 | 766 | | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
769 | 777 | | |
770 | 778 | | |
771 | 779 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
| 91 | + | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
0 commit comments