Skip to content

Make chat links open correctly#199

Merged
jsgrrchg merged 2 commits into
mainfrom
fix-chat-raw-url-links
Jun 3, 2026
Merged

Make chat links open correctly#199
jsgrrchg merged 2 commits into
mainfrom
fix-chat-raw-url-links

Conversation

@jsgrrchg
Copy link
Copy Markdown
Owner

@jsgrrchg jsgrrchg commented Jun 3, 2026

Summary

  • Autolink raw http:// and https:// URLs in AI chat Markdown content.
  • Route renderer-created external windows through Electron's shell.openExternal so website and email links open in the user's default browser or mail app.
  • Add focused coverage for raw chat URLs and external window-open protocol policy.

Root Cause

The chat Markdown renderer only handled explicit Markdown links like [label](url), so bare URLs stayed as plain text. After making them clickable, those links still used regular anchors with target="_blank"; Electron was not intercepting those window-open requests, so external sites opened in app-owned BrowserWindows instead of the user's browser.

Validation

  • npm --prefix apps/desktop test -- src/features/ai/components/MarkdownContent.test.tsx
  • npm --prefix apps/desktop test -- src-electron/main/window.test.ts
  • npx --prefix apps/desktop tsc -p apps/desktop/tsconfig.electron.json --noEmit

Closes #195

@jsgrrchg jsgrrchg marked this pull request as ready for review June 3, 2026 15:43
@jsgrrchg jsgrrchg merged commit 59792e1 into main Jun 3, 2026
12 checks passed
@jsgrrchg jsgrrchg deleted the fix-chat-raw-url-links branch June 3, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Raw URLs in AI chat messages are not clickable

1 participant