Repository navigation
fix(agent): make begin form mode options reactive to language switch - #20128
Conversation
The mode select options in the Begin form were built at module scope with i18next's `t`, so their labels were resolved only once at module load and remained in the previous language until a manual page refresh. Move the options inside the component using `useTranslation` and memoize them on `t`, so they re-translate immediately when the language changes.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesBegin form mode options
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Changing the UI language refreshes the mode labels, and no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. A rabbit checks the options’ names Comment ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
|
Summary
The mode select options in the Begin form were built at module scope with i18next's
t, so their labels were resolved only once at module load and remained in the previous language until a manual page refresh. Move the options inside the component usinguseTranslationand memoize them ont, so they re-translate immediately when the language changes.