t3code icon indicating copy to clipboard operation
t3code copied to clipboard

fix(web): close reasoning picker after selection

Open eimexdev opened this issue 4 months ago • 2 comments

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 TraitsMenuContent consumers.

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, TraitsMenuContent calls an optional onRequestClose callback after any selection (trait value, boolean toggle, or prompt-injected value), and TraitsPicker passes 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. TraitsMenuContent now accepts an optional onRequestClose and invokes it after a successful select change (including Ultrathink / prompt-injected options) and after boolean On/Off picks.

TraitsPicker passes onRequestClose={() => setIsMenuOpen(false)} so the controlled menu closes on each selection. Callers that render TraitsMenuContent without the callback are unchanged.

Reviewed by Cursor Bugbot for commit 9a5f32b2da9bdf7c7409bd04d27e2ba7a40c603d. Bugbot is set up for automated code reviews on this repo. Configure here.

eimexdev avatar Jul 25 '26 15:07 eimexdev

[!IMPORTANT]

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e8fa8aee-c0fc-4587-980a-3efaa4b02823

You can disable this status message by setting the reviews.review_status to false in 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot] avatar Jul 25 '26 15:07 coderabbitai[bot]

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.

macroscopeapp[bot] avatar Jul 25 '26 15:07 macroscopeapp[bot]

Closing as superseded by #5879, which has merged and covers this change on the current architecture. Thanks for the contribution.

juliusmarminge avatar Aug 15 '26 11:08 juliusmarminge