Roo-Code/webview-ui/src/components
roomote[bot] 7ca4901024
fix: prevent empty mode names from being saved (fixes #5766) (#5767)
* 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 <roomote@roocode.com>
2025-08-04 11:03:34 -07:00
..
__tests__ debug: Add ErrorBoundary component for better error handling (#5085) 2025-07-23 08:45:35 -04:00
account fix: standardize tooltip delays to 300ms (#5090) (#5098) 2025-06-26 15:41:32 -04:00
chat style: update highlightLayer style and align to textarea (#6648) 2025-08-04 08:52:21 -05:00
common Add auto-approved cost limits (#6484) 2025-07-31 15:33:09 -04:00
history More tweaks to chatview layout (#5643) 2025-07-12 20:05:18 -04:00
human-relay fix: Adjust the style of the HumanRelayDialog component to increase the maximum height and spacing of the content area (#1791) 2025-03-19 00:09:04 -04:00
marketplace feat: auto-refresh marketplace data when organization settings change (#6446) 2025-07-30 13:52:28 -07:00
mcp Link to marketplace from modes and MCP tab (#5580) 2025-07-11 01:05:32 -04:00
modes fix: prevent empty mode names from being saved (fixes #5766) (#5767) 2025-08-04 11:03:34 -07:00
settings Add Z AI provider (#6657) 2025-08-04 10:06:46 -04:00
ui Add Z AI provider (#6657) 2025-08-04 10:06:46 -04:00
welcome Roo Code Cloud Waitlist CTAs (#6104) 2025-07-23 13:28:30 -04:00
ErrorBoundary.tsx Remove duplicated assignment (#6355) 2025-07-29 10:54:44 -04:00