Skip to content

Fix desktop chat markdown external links#623

Closed
CodeZeno wants to merge 1 commit intopingdotgg:mainfrom
CodeZeno:fix/chat-markdown-external-links
Closed

Fix desktop chat markdown external links#623
CodeZeno wants to merge 1 commit intopingdotgg:mainfrom
CodeZeno:fix/chat-markdown-external-links

Conversation

@CodeZeno
Copy link
Copy Markdown
Contributor

@CodeZeno CodeZeno commented Mar 9, 2026

What Changed

  • Route external markdown links in chat through the native desktop external-open path when running in Electron.
  • Keep the regular web app on plain anchor behavior with no desktop-specific click interception.
  • Limit the change to chat markdown external links only.

Why

In v0.0.8, clicking external links in chat did not work on Windows in the desktop app. I confirmed the broken behavior on Windows before this change and verified the fix there.

I have not confirmed whether macOS was affected, so this PR is intentionally scoped to the Windows-confirmed bug rather than claiming a broader regression.

This approach keeps the PR small and avoids changing browser behavior for the web build.

UI Changes

None. This is a behavior-only fix for external link handling in the desktop app.

Verification

  • bun lint
  • bun typecheck
  • Manual verification on Windows desktop app

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No visual UI changes, so screenshots are not applicable
  • I included a video for animation/interaction changes

Note

Handle ChatMarkdown external link clicks in Electron by invoking readNativeApi().shell.openExternal in ChatMarkdown.tsx to fix desktop chat markdown external links

Add environment-aware anchor rendering in ChatMarkdown.tsx, importing isElectron and wiring onClick to readNativeApi().shell.openExternal(href) in Electron; keep _blank with rel='noreferrer' elsewhere.

📍Where to Start

Start with the markdownComponents.a renderer in ChatMarkdown.tsx.

Macroscope summarized e957bbe.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c937bc00-d271-47f8-a155-f3cd51cad40a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CodeZeno CodeZeno force-pushed the fix/chat-markdown-external-links branch from 544fb67 to e957bbe Compare March 9, 2026 06:28
@CodeZeno
Copy link
Copy Markdown
Contributor Author

CodeZeno commented Mar 9, 2026

Closing this since PR #599 already covers the same user-facing fix for external links in the desktop app.

I confirmed the broken behavior on Windows in v0.0.8, but after reviewing #599 it appears to address the same path centrally in Electron by routing external opens through the validated desktop shell.openExternal(...) flow.

My branch uses a narrower React-side fix in ChatMarkdown.tsx, but I don’t think it adds enough on top of #599 to justify a separate PR.

I have not confirmed whether macOS was affected.

Closing as redundant.

@CodeZeno CodeZeno closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant