feat(tui): mouse support — click, scroll, overlay dismiss #116

Merged
claude-desktop merged 2 commits from tui/mouse-support-112 into main 2026-04-12 18:45:03 +00:00
Collaborator

Summary

  • Plumb Event::Mouse through the full dispatch chain (event stream → overlays → screens)
  • Hit-test helper hit_test(rect, column, row) for click target detection
  • Sidebar click navigation: click a sidebar row to switch screens
  • Click outside an overlay to close it; clicks inside are consumed
  • Scroll wheel support in gallery, entities, presets, model browser
  • mouse_enabled config guard — tui.toml [tui] mouse_enabled = false disables capture
  • overlay_rect() trait method for hit-testing overlay bounds
  • 5 new integration tests + 3 unit tests for hit_test

Closes charles/loom#112

Test plan

  • cargo test -p loom-tui — all tests pass
  • cargo clippy -p loom-tui -- -D warnings — clean
  • Manual: click sidebar items to navigate between screens
  • Manual: scroll wheel in gallery grid moves selection
  • Manual: open help (?), click outside to dismiss
  • Manual: set mouse_enabled = false in tui.toml, verify mouse has no effect

🤖 Generated with Claude Code

## Summary - Plumb `Event::Mouse` through the full dispatch chain (event stream → overlays → screens) - Hit-test helper `hit_test(rect, column, row)` for click target detection - Sidebar click navigation: click a sidebar row to switch screens - Click outside an overlay to close it; clicks inside are consumed - Scroll wheel support in gallery, entities, presets, model browser - `mouse_enabled` config guard — `tui.toml` `[tui] mouse_enabled = false` disables capture - `overlay_rect()` trait method for hit-testing overlay bounds - 5 new integration tests + 3 unit tests for hit_test Closes charles/loom#112 ## Test plan - [x] `cargo test -p loom-tui` — all tests pass - [x] `cargo clippy -p loom-tui -- -D warnings` — clean - [ ] Manual: click sidebar items to navigate between screens - [ ] Manual: scroll wheel in gallery grid moves selection - [ ] Manual: open help (`?`), click outside to dismiss - [ ] Manual: set `mouse_enabled = false` in tui.toml, verify mouse has no effect 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Plumb mouse events through the full dispatch chain:

- hit_test() helper for rect-based mouse coordinate checks
- Sidebar click navigation: left-click on sidebar items navigates
- Gallery/entities/presets/model-browser scroll wheel moves selection
- Overlay click-outside-to-close with per-overlay rect tracking
- All overlays swallow mouse events inside their bounds
- Config mouse_enabled field (default true) gates mouse capture
- terminal::init_with_mouse() conditionally enables EnableMouseCapture

Closes charles/loom#112

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
claude-desktop changed target branch from tui/test-harness-fixes to main 2026-04-12 18:40:11 +00:00
charles force-pushed tui/mouse-support-112 from e3acf9e445 to f0fd06d622
All checks were successful
QA / qa (pull_request) Successful in 34m11s
2026-04-12 18:44:57 +00:00
Compare
claude-desktop deleted branch tui/mouse-support-112 2026-04-12 18:45:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/loom!116
No description provided.