Fix desktop chat markdown external links#623
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
544fb67 to
e957bbe
Compare
|
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 My branch uses a narrower React-side fix in I have not confirmed whether macOS was affected. Closing as redundant. |
What Changed
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 lintbun typecheckChecklist
Note
Handle ChatMarkdown external link clicks in Electron by invoking
readNativeApi().shell.openExternalin ChatMarkdown.tsx to fix desktop chat markdown external linksAdd environment-aware anchor rendering in ChatMarkdown.tsx, importing
isElectronand wiringonClicktoreadNativeApi().shell.openExternal(href)in Electron; keep_blankwithrel='noreferrer'elsewhere.📍Where to Start
Start with the
markdownComponents.arenderer in ChatMarkdown.tsx.Macroscope summarized e957bbe.