Skip to content

Commit 2069ddf

Browse files
committed
fix(desktop): report a failed Option-click open
The handler cancels the native click, so a rejected openExternal would leave the link silently unopened. Report it like the context menu's open action does.
1 parent 12aeb52 commit 2069ddf

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎apps/web/src/components/ChatMarkdown.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2998,7 +2998,14 @@ const CHAT_MARKDOWN_COMPONENTS = {
29982998
if (isElectron && event.altKey) {
29992999
event.preventDefault();
30003000
event.stopPropagation();
3001-
void readLocalApi()?.shell.openExternal(href);
3001+
void readLocalApi()
3002+
?.shell.openExternal(href)
3003+
.catch((cause) =>
3004+
reportMarkdownActionFailure(
3005+
{ operation: "open-link-external", target: href },
3006+
cause,
3007+
),
3008+
);
30023009
}
30033010
return;
30043011
}

0 commit comments

Comments
 (0)