Roo-Code/webview-ui/src
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__ Command argument hints and change release engineer to a command (#6333) 2025-07-29 00:42:28 -04:00
components fix: prevent empty mode names from being saved (fixes #5766) (#5767) 2025-08-04 11:03:34 -07:00
context use assistantMessageParser class instead of parseAssistantMessage (#5341) 2025-08-04 10:02:30 -04:00
hooks feat: add ESC key handling for modes, API provider, and indexing settings popovers (#6175) 2025-07-28 23:04:23 -04:00
i18n Add Z AI provider (#6657) 2025-08-04 10:06:46 -04:00
lib Add shadcn/ui + Storybook 2025-01-30 12:50:09 -08:00
oauth Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
utils Add Cerebras as a provider (#6392) 2025-07-31 18:17:54 -04:00
vite-plugins fix: prevent empty mode names from being saved (fixes #5766) (#5767) 2025-08-04 11:03:34 -07:00
App.tsx debug: Add ErrorBoundary component for better error handling (#5085) 2025-07-23 08:45:35 -04:00
index.css feature: add toggle for disable mcp server tool from prompt (#3551) 2025-06-20 19:14:59 -04:00
index.tsx PNPM + Turbo monorepo + Nightly releases (#3407) 2025-05-21 21:01:20 -07:00
preflight.css Bring most of Tailwind's preflight.css back 2025-02-03 12:18:28 -08:00
types.d.ts Welcome page OAuth (#1913) 2025-03-23 10:08:16 -04:00
vite-env.d.ts Remove lucide 2025-01-30 14:47:59 -08:00