Repository navigation
fix: respect mouse capture when routing hyperlink clicks - #5064
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (14)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughLink activation, fallback replay, and link-hover processing now depend on mouse capture. Failed plugin link handlers return an error and consume the click without fallback replay. Frame presentation can write to a supplied writer and clears frame hyperlinks when shell mouse capture is preferred. Tests cover delayed replies, link routing, hover behavior, and hyperlink composition. Documentation describes link handling for both mouse-capture settings. Suggested reviewers: Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The reviewed link-routing changes have no identified issue requiring a fix before merge; normal checks can proceed. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 8 files. (6 skipped: 6 unsupported.)
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
|
Hmm not merge ready fo sho, pretty sure we break file:/// and similar things |
7512870 to
0d90e59
Compare
0d90e59 to
9e90688
Compare
|
@coderabbitai full review Please review the current head, 9e90688. This revision uses the existing mouse-capture setting to choose link ownership and removes the file/app opener and confirmation dialog. Full Windows checks and the isolated plugin smoke test passed. |
✅ Action performedFull review finished. |
akbash-bot
left a comment
There was a problem hiding this comment.
Reviewed 9e90688. No blocking findings.
Capture-based link ownership is consistent across presentation, hover, and click handling. Internal destinations remain available to plugins, native links return when capture is disabled, and plugin launch errors do not trigger an external fallback. Direct terminal attach retains its separate ANSI path. The HTTP(S)-only opener and documented native-shortcut tradeoff keep this change bounded.
Local verification: just test-one link passed all 102 selected tests. All PR checks are green. An independent code review found no material issues. JJ supplied the physical Windows Terminal verification; I did not repeat that test on Windows.
…am test literal - mouse.rs: proper fork/base/upstream 3-way (git merge-file). Restores the fork's workspace context-menu click path (silently dropped when taking the pure v0.9.5 blob: fork CI clippy flagged the now-dead menu_button field + 3 chrome_context tests red) while keeping upstream's sidebar-toggle relocation (herdrdev#4734) and hyperlink mouse-capture fix (herdrdev#5064). - platform/*: move supports_browser_open ahead of mod tests (clippy items_after_test_module), cargo fmt. - headless tests: add browser_open field to upstream's new ServerEvent literal (E0063 test-target only; cargo check --workspace --tests gates). Local full-suite residuals proven environmental, not regressions: container SIGPIPE collateral (remote_bridge child) and upstream tests that write fixture agent-detection markers into the real herdr-dev config dir mid-suite -> agent_explain reads garbage override (passes with pristine XDG dirs / after removing marker residue: 47/47).
Windows Terminal can open a hyperlink before Herdr receives the Ctrl-click, bypassing matching plugins such as the Obsidian handler in #4874.
This uses the existing mouse-capture setting to choose who handles links:
Capture on suppresses native opening of labeled links, including macOS Command-click. Switch capture off to restore it. This also disables Herdr's mouse controls, including clicking tabs and dragging split borders.
Windows Terminal can still intercept URLs it detects in visible text. The docs explain setting
"experimental.detectURLs": falsewhen reliable plugin priority is needed for those URLs. Herdr does not change terminal settings.The file/app opener and confirmation dialog are deferred. There is no new setting, dependency or protocol change. The HTTP(S)-only fallback from #2942 is preserved.
Validation:
just checkpassed with 3,378 Rust tests and 12 existing skips. Formatting, Clippy and script checks passed.Refs #4874.