feat(tui): use mouse for permission buttons#9305
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Found a potential duplicate: PR #7967: "feat(tui): add mouse hover and click support to permission prompt" Why it's related: This PR appears to address the same feature - adding mouse interaction support to permission-related UI elements in the TUI. Both PRs involve enabling mouse click/hover functionality for permission prompts/buttons. You should verify whether #7967 is already merged or if it covers the same functionality before proceeding with #9305. |
There was a problem hiding this comment.
Pull request overview
This PR adds mouse interaction support to permission prompt buttons in the TUI, allowing users to hover over and click buttons similar to the existing question tool functionality. Additionally, it includes an unmentioned bug fix that prevents duplicate permission replies.
Changes:
- Added mouse event handlers (
onMouseOverandonMouseUp) to permission prompt buttons - Fixed a control flow bug where "reject" replies could fall through to send "once" replies
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| reply: "reject", | ||
| requestID: props.request.id, | ||
| }) | ||
| return |
There was a problem hiding this comment.
it would fall thru and send allow once as well.
send reject, then send allow once.
just sends reject now
There was a problem hiding this comment.
ahh
im on my phone btw so i cant see the content super well
There was a problem hiding this comment.
Yeah all good.
The other blocks also have a return.
A switch expression is prolly better
What does this PR do?
The question tool is cool to click and use the TUI with a mouse.
This adds similar functionality
How did you verify your code works?
Screen.Recording.2026-01-19.at.8.54.30.am.mov