Roo-Code/webview-ui
Roo Code 4c32fdae55 fix: refresh provider settings on profile switch in Settings view
When switching Configuration Profiles within the Settings/Providers tab,
provider settings were not refreshing because:

1. The cachedState update happened asynchronously (useEffect) after the
   render cycle, causing child components to mount with stale config
2. ApiOptions and provider components retained local state from the
   previous profile since they were not remounted

Three fixes applied:
- Changed profile-switch useEffect to synchronous render-time state
  update (React "adjusting state when a prop changes" pattern)
- Added key={currentApiConfigName} on ApiOptions to force full remount
  on profile switch, resetting all local state in provider components
- Added sync effects and write-back guards in OpenAICompatible.tsx to
  prevent stale header overwrites

Closes #11450
2026-02-13 15:29:12 +00:00
..
audio feat: move play audio to webview to ensure cross-platform (#3659) 2025-05-20 01:15:05 -04:00
public Remove CRA cruft 2025-01-30 14:38:41 -08:00
src fix: refresh provider settings on profile switch in Settings view 2026-02-13 15:29:12 +00:00
.gitignore PR cleanup 2025-03-12 11:23:06 -04:00
components.json Remove lucide 2025-01-30 14:47:59 -08:00
eslint.config.mjs Preserve model settings when selecting a specific OpenRouter provider (#3915) 2025-05-23 23:22:41 -07:00
index.html Fix linter warning + run prettier on everything (#3581) 2025-05-13 15:16:24 -07:00
package.json Add React Compiler integration to webview-ui (#9565) 2026-01-29 01:32:27 -05:00
tsconfig.json Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-08-28 11:18:45 -07:00
turbo.json Improve turbo task dependency declarations (#4323) 2025-06-04 09:32:27 -07:00
vite.config.ts refactor: remove browser use functionality entirely (#11392) 2026-02-11 18:11:21 -07:00
vitest.config.ts Show console logging in vitests when the --no-silent flag is set (#7467) 2025-08-28 12:51:21 -04:00
vitest.setup.ts Show console logging in vitests when the --no-silent flag is set (#7467) 2025-08-28 12:51:21 -04:00