fix(web): close reasoning picker after selection
Fixes #4522
What Changed
- Close the traits picker after selecting a reasoning level.
- Apply the same behavior to boolean and prompt-injected traits, including Ultrathink.
- Keep the close callback optional for standalone
TraitsMenuContentconsumers.
Why
Selecting a reasoning level updates the value, but the controlled picker remains open. The selection handlers update the underlying state without requesting that the parent menu close.
Passing an optional close callback into the menu content keeps the change scoped to the picker while restoring the expected single-selection menu behavior.
UI Changes
Before
https://github.com/user-attachments/assets/52441c2c-cf59-423a-a2a7-31101008cfd9
After
https://github.com/user-attachments/assets/ec2eb672-bbb0-465e-a053-773cd0a04fdc
Verified in the web client with both Claude and Codex reasoning options.
Checklist
- [x] This PR is small and focused
- [x] I explained what changed and why
- [x] I included before/after screenshots for any UI changes
- [x] I included a video for animation/interaction changes
[!NOTE]
Close reasoning picker menu after trait selection
The traits picker menu previously stayed open after a user selected a value. Now,
TraitsMenuContentcalls an optionalonRequestClosecallback after any selection (trait value, boolean toggle, or prompt-injected value), andTraitsPickerpasses a handler that sets menu open state to false.Macroscope summarized 9a5f32b.
[!NOTE] Low Risk Small UI interaction fix in TraitsPicker with an optional callback; no auth, data, or persistence changes.
Overview The traits picker menu stayed open after choosing a reasoning level or other trait.
TraitsMenuContentnow accepts an optionalonRequestCloseand invokes it after a successful select change (including Ultrathink / prompt-injected options) and after boolean On/Off picks.
TraitsPickerpassesonRequestClose={() => setIsMenuOpen(false)}so the controlled menu closes on each selection. Callers that renderTraitsMenuContentwithout the callback are unchanged.Reviewed by Cursor Bugbot for commit 9a5f32b2da9bdf7c7409bd04d27e2ba7a40c603d. Bugbot is set up for automated code reviews on this repo. Configure here.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
e8fa8aee-c0fc-4587-980a-3efaa4b02823You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
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 @coderabbitai help to get the list of available commands.
Approvability
Verdict: Approved
Straightforward UI fix adding an optional onRequestClose callback to close the traits picker after selection. Self-contained change following a standard dropdown pattern with no runtime risk.
You can customize Macroscope's approvability policy. Learn more.
Closing as superseded by #5879, which has merged and covers this change on the current architecture. Thanks for the contribution.