-
Notifications
You must be signed in to change notification settings - Fork 0
feat: make TUI grid clickable #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: narthur <[email protected]>
Co-authored-by: narthur <[email protected]>
|
You have run out of free Bugbot PR reviews for this billing cycle. This will reset on January 30. To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial. |
🚀 Pre-release Build ReadyTest builds are ready! Install directly using the # Install the pre-release
bin install https://github.com/PinePeakDigital/buzz/releases/tag/pr-180-latest buzz-pr-180# Run the pre-release
buzz-pr-180# Uninstall the pre-release
bin remove buzz-pr-180Direct Download LinksOr download binaries directly from the pre-release page:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds mouse click support to the TUI grid, allowing users to click on goals to open their details view - providing the same functionality as keyboard navigation with Enter.
Key Changes:
- Mouse event support is now enabled in the TUI
- Click-to-goal coordinate mapping accounts for grid layout, scroll position, and terminal dimensions
- Comprehensive test coverage ensures correct click handling across various scenarios
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| main.go | Enables mouse cell motion events and adds mouse message handler in updateApp that triggers on left button release when no modal is open |
| handlers.go | Implements handleMouseClick function that converts screen coordinates to goal indices, accounting for header offset, cell dimensions, column layout, and scroll position |
| handlers_test.go | Adds comprehensive tests for mouse click functionality including edge cases (empty space, header clicks, scroll offsets, modal state guards, button/action filtering) |
Adds mouse click support to the TUI grid so clicking a goal opens its details view (same as keyboard navigation with Enter).
Changes
main.go): Addedtea.WithMouseCellMotion()to program initializationmain.go): Addedtea.MouseMsgcase inupdateApp, triggering on left button release when no modal is openhandlers.go): NewhandleMouseClickfunction converts screen coordinates to goal index accounting for:Tests cover click positioning across rows/columns, scroll offsets, empty space handling, and modal state guards.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.