Repository navigation
fix(settings): stop React #185 in Voice speech-model dropdown (crashes 7f93d89c, 362b566d) - #10028
Conversation
📝 WalkthroughWalkthroughVoicePane now creates its default voice settings once per component instance and reuses them when voice settings are absent. Tests cover absent voice settings, a typed empty speech catalog, exposed model-state refresh calls, and single invocation across repeated re-renders. Skill release revisions and release mappings were updated, while malformed snapshot registry continuations were corrected. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/settings/VoicePane.react185.test.tsx (1)
92-94: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid pinning the helper’s allocation strategy.
The effect-stability test already catches the actual regression. This assertion would fail if
getDefaultVoiceSettings()were later optimized to return a shared immutable value, even thoughVoicePaneremains correct.Suggested simplification
- it('getDefaultVoiceSettings allocates a fresh object each call (root-cause guard)', () => { - expect(getDefaultVoiceSettings()).not.toBe(getDefaultVoiceSettings()) - })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0f54fb26-7cc1-4ecc-9046-611837c3e306
📥 Commits
Reviewing files that changed from the base of the PR and between bc301de and 6bd55b825bb5a17259656226020f6872862f5c0a.
📒 Files selected for processing (2)
src/renderer/src/components/settings/VoicePane.react185.test.tsxsrc/renderer/src/components/settings/VoicePane.tsx
VoicePane created a fresh fallback on every render when settings.voice was absent, changing effect dependencies and repeatedly issuing speech IPC and model-state refreshes. Keep a per-pane lazy default with stable identity and cover the behavior in the existing VoicePane suite. Fixes crash reports 7f93d89c (macOS) and 362b566d (Windows).
6bd55b8 to
a1e4344
Compare
Regenerate skill bundle registries against the current remote release tag set so the PR freshness gate matches a clean CI checkout.
… (crashes 7f93d89c, 362b566d) (stablyai#10028)
Description
Fixes a renderer crash on Settings → Voice. Opening the Speech Model dropdown could trigger React error #185, “Maximum update depth exceeded,” and take down the settings error boundary.
When persisted settings did not yet contain
settings.voice,VoicePanecalledgetDefaultVoiceSettings()during every render. The fresh object changedupdateVoiceSettingson every render, which re-armed the speech-data effect; that effect performs store writes and IPC that render the pane again. With the Radix dropdown open, the unbounded churn reached React’s update-depth guard.Crash reports:
7f93d89c(macOS, 1.4.148) and362b566d(Windows, 1.4.150).Fix
userModelsarray between pane instances.VoicePanesuite and assert that catalog/model-state fetches remain single-shot across parent re-renders when voice settings are absent.main.main’s generated copies stale.Fix evidence
Without the fix, the focused regression fails deterministically:
With the fix:
ELI5
For users without saved voice preferences, the page kept building a new “default preferences” box every time it redrew. React treated that new box as a change, fetched voice data again, redrew again, and repeated until it crashed. The page now creates one private default box per mounted pane and reuses it.
Risk and compatibility
settings.voiceobjects are still used unchanged.Made with Orca 🐋