GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(web): close reasoning picker after selection by nithish6541 · Pull Request #4758 · pingdotgg/t3code Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
# Conflicts: # apps/web/src/components/chat/TraitsPicker.tsx
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The pointer-cursor additions in this PR duplicate cursor state that the shared primitives already own, so they are no-ops at the call site:
Button's base buttonVariants already includes cursor-pointer (apps/web/src/components/ui/button.tsx), which ComposerControl renders through — so the cursor-pointer on MenuTrigger and on both ComposerControl class branches adds nothing.MenuRadioItem's base classes already include cursor-pointer plus data-disabled:cursor-not-allowed (apps/web/src/components/ui/menu.tsx), so the per-item className="cursor-pointer" only re-states the primitive contract.Separately, the menu already closes on pick via closeOnClick on the radio items (added upstream in #5879, present at the merge base), so the new onOptionSelected close path is a second mechanism for the same behavior — and it is passed before {...persistence}, which makes it clobberable.
Details inline.
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| <MenuRadioItem | ||
| key={value} | ||
| value={value} | ||
| hideIndicator | ||
| className="cursor-pointer" | ||
| closeOnClick | ||
| > |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same here — the cursor-pointer is already part of MenuRadioItem's base classes, so this only re-wraps the element without a behavior change.
| <MenuRadioItem | |
| key={value} | |
| value={value} | |
| hideIndicator | |
| className="cursor-pointer" | |
| closeOnClick | |
| > | |
| <MenuRadioItem key={value} value={value} hideIndicator closeOnClick> |
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| onPromptChange={onPromptChange} | ||
| modelOptions={modelOptions} | ||
| allowPromptInjectedEffort={allowPromptInjectedEffort} | ||
| onOptionSelected={() => setIsMenuOpen(false)} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Two problems with this close path:
closeOnClick, so Base UI closes the menu on pick (merge-base behavior from fix(web): trait menu closes after you pick a level #5879). This callback adds a second, imperative close for the same interaction; if it isn't fixing a case closeOnClick misses, prefer dropping the prop rather than keeping two close mechanisms.onOptionSelected is declared on TraitsMenuContentProps, which TraitsPicker also accepts but does not destructure, so a consumer-supplied onOptionSelected flows into the ...persistence rest object and — because {...persistence} is spread after this line — silently overrides the menu-close handler.Smallest fix for (2): destructure onOptionSelected in TraitsPicker's signature (calling it alongside setIsMenuOpen(false)), or move {...persistence} above this prop so the close handler wins.
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| key={option.id} | ||
| value={option.id} | ||
| hideIndicator | ||
| className="cursor-pointer" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
MenuRadioItem already sets cursor-pointer (and data-disabled:cursor-not-allowed) in its own base classes, so this call-site class re-declares primitive-owned cursor state without changing rendering. Cursor ownership should stay in the primitive; consider dropping it here.
hideIndicator
- className="cursor-pointer"Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ? "min-w-0 max-w-40 shrink cursor-pointer justify-start overflow-hidden whitespace-nowrap sm:max-w-48" | ||
| : "shrink-0 cursor-pointer whitespace-nowrap", |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
These two branches carry contextual layout only; cursor-pointer comes from Button's base variant, so adding it here duplicates the primitive contract inside a call-site class string.
| ? "min-w-0 max-w-40 shrink cursor-pointer justify-start overflow-hidden whitespace-nowrap sm:max-w-48" | |
| : "shrink-0 cursor-pointer whitespace-nowrap", | |
| ? "min-w-0 max-w-40 shrink justify-start overflow-hidden whitespace-nowrap sm:max-w-48" | |
| : "shrink-0 whitespace-nowrap", |
Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| }} | ||
| > | ||
| <MenuTrigger | ||
| className="cursor-pointer" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
MenuTrigger renders ComposerControl → Button, whose base buttonVariants already includes cursor-pointer, so this trigger-level class has no effect and splits cursor ownership across the trigger and the rendered control. Suggest removing it and letting Button own the cursor.
<MenuTrigger
- className="cursor-pointer"
render={Posted via Macroscope — UI Consistency
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Approved c4fdd43 Small, self-contained UI fix that adds a callback to close the menu picker after selection. The unresolved comments are style suggestions about redundant cursor-pointer classes and minor prop ordering, not blocking issues. You can customize Macroscope's approvability policy. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Note 🤖 GPT-5.6 Sol responding on behalf of Theo We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together. Closing as covered by the merged trait-picker fix. The current menu items already close on selection through closeOnClick, and shared controls supply pointer styling. The added callback path would duplicate that behavior. A remaining failure should identify the specific current picker and input method. Related work: #5879. If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed. If GitHub does not let you reopen it, leave a comment here and we'll take another look. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.