Repository navigation
Open chat links on left-click only and offer Copy link - #2081
Conversation
MarkView raises LinkClicked on any button's release, so the right-click that opens the context menu also launched the browser beneath it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Link release handling and URL capture src/Capacitor.App/Views/MarkdownView.cs |
MarkdownView tracks non-left releases, resolves context-menu URLs from pointer targets or keyboard focus, and copies captured URLs when a clipboard is available. |
Conditional Copy link menu item src/Capacitor.App/Views/TextContextMenu.cs, test/Capacitor.App.Tests.Unit/TextContextMenuTests.cs |
TextContextMenu shows “Copy link” only when a context URL exists. Tests verify copying a link without opening it and hiding the item for plain text. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Feature · Severity of issue fixed: Medium
Possibly related PRs
- kurrent-io/kcap-cli#1681: Adds the keyboard-selected link state used as a context-menu URL fallback.
- kurrent-io/kcap-cli#1639: Changes chat link handling, which is also affected by the release-button behavior in this PR.
- kurrent-io/kcap-cli#1646: Adds pointer hit testing for hyperlink and image targets, used here to resolve context-menu URLs.
Suggested reviewers: nortonandreev, alexeyzimarev
Merge Risk: 
Minimal · up to 5556a
-
Link handling and Copy link behavior appear mergeable after normal checks.
Pre-merge checks: 
3
-
Full details: Linked Issues check
-
Explanation
Issue
#2080requires left-click link opening, right-click context-menu behavior without link opening, and a visible "Copy link" action for links.MarkdownViewsuppresses link execution for non-left releases and captures the link for context-menu use.TextContextMenushows the copy row only when a link exists, andCopyLinkAsynccopies the URL. The added tests verify right-click behavior, clipboard content, and hiding the row for plain text.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#2080. The menu visibility predicate, link capture, clipboard action, right-click helper update, and focused tests directly support the requested link and context-menu behavior. No unrelated product change is identified in the supplied whole-PR summary.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #2080 — AI-4684
What & why
MarkView raises
LinkClickedon the release of any mouse button, so a right-click on a chat link launched the browser during the same release that opened the context menu. On macOS that froze the app. Now only a left-button release opens a link. The chat menu gains a "Copy link" row, shown only when the click (or the keyboard's current link) is on a link.Where to look
MarkdownViewrecords the release button in a tunnel handler before MarkView's own release handler fires. A menu row can now be hidden rather than greyed.Verification
Right_clicking_a_link_offers_to_copy_it_without_opening_itfails without the guard (openedcontainshttps://example.com/docs) and passes with itUses_the_probed_terminal_PATH_not_the_process_PATH, reads the local shell PATH and is not touched by this change🤖 Generated with Claude Code
Summary by CodeRabbit