Commit fc2c886
committed
fix: prevent empty mode names from being saved (#5766)
- Add local state management for mode name input field to allow visual emptying
- Implement onBlur validation to only save non-empty names
- Add backend validation using modeConfigSchema.safeParse()
- Ensure empty names are never written to YAML files
This allows users to clear the name field visually while preventing
invalid empty names from being persisted to configuration files.1 parent 0f994fc commit fc2c886
File tree
2 files changed
+41
-3
lines changed- src/core/config
- webview-ui/src/components/modes
2 files changed
+41
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
404 | 412 | | |
405 | 413 | | |
406 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
| |||
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
221 | 233 | | |
222 | 234 | | |
223 | 235 | | |
| |||
725 | 737 | | |
726 | 738 | | |
727 | 739 | | |
728 | | - | |
729 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
730 | 747 | | |
731 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
732 | 760 | | |
733 | 761 | | |
734 | | - | |
| 762 | + | |
735 | 763 | | |
736 | 764 | | |
737 | 765 | | |
| 766 | + | |
| 767 | + | |
738 | 768 | | |
739 | 769 | | |
740 | 770 | | |
| |||
0 commit comments