mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-26 01:11:20 +00:00
* fix: handle mode selector empty state on workspace switch When switching between VS Code workspaces, if the current mode from workspace A is not available in workspace B, the mode selector would show an empty string. This fix adds fallback logic to automatically switch to the default "code" mode when the current mode is not found in the available modes list. Changes: - Import defaultModeSlug from @roo/modes - Add fallback logic in selectedMode useMemo to detect when current mode is not available and automatically switch to default mode - Add tests to verify the fallback behavior works correctly - Export defaultModeSlug in test mock for consistent behavior * fix: prevent infinite loop by moving fallback notification to useEffect * fix: prevent infinite loop by using ref to track notified invalid mode * refactor: clean up comments in ModeSelector fallback logic --------- Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com> |
||
|---|---|---|
| .. | ||
| ApiConfigSelector.spec.tsx | ||
| BatchFilePermission.spec.tsx | ||
| BrowserSessionRow.aspect-ratio.spec.tsx | ||
| BrowserSessionRow.disconnect-button.spec.tsx | ||
| BrowserSessionRow.spec.tsx | ||
| ChatRow.diff-actions.spec.tsx | ||
| ChatRow.rate-limit-wait.spec.tsx | ||
| ChatRow.run-slash-command.spec.tsx | ||
| ChatTextArea.spec.tsx | ||
| ChatView.keyboard-fix.spec.tsx | ||
| ChatView.notification-sound.spec.tsx | ||
| ChatView.spec.tsx | ||
| CheckpointRestoreDialog.spec.tsx | ||
| CloudTaskButton.spec.tsx | ||
| CodeIndexPopover.auto-populate.spec.tsx | ||
| CommandExecution.spec.tsx | ||
| CommandPatternSelector.spec.tsx | ||
| ErrorRow.spec.tsx | ||
| FollowUpSuggest.spec.tsx | ||
| IndexingStatusBadge.spec.tsx | ||
| ModeSelector.spec.tsx | ||
| OpenMarkdownPreviewButton.spec.tsx | ||
| ShareButton.spec.tsx | ||
| SlashCommandItemSimple.spec.tsx | ||
| TaskActions.spec.tsx | ||
| TaskHeader.spec.tsx | ||
| TooManyToolsWarning.spec.tsx | ||
| WarningRow.spec.tsx | ||