Skip to content

Conversation

@leonardomso
Copy link

@leonardomso leonardomso commented Jan 14, 2026

Summary

Fixes an issue where clicking links in the OpenCode desktop app would open them in the same window instead of the user's default external browser.

Changes

  • Added click event listener at root level to intercept all link clicks
  • External links (http/https) now use Tauri's shellOpen to open in default browser
  • Prevents markdown links from navigating within the app window

Testing

  1. Run the desktop app: bun run tauri dev
  2. Prompt the AI for a response containing a link
  3. Click the link - it should open in your external browser, not within the app

Related Issue

Fixes #8361

- Intercept link clicks at root level in desktop app
- Use Tauri's shellOpen for http/https URLs
- Prevents links from navigating within the app window
- Fixes issue where markdown links opened in same window
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found:

@tang-vu
Copy link

tang-vu commented Jan 14, 2026

Hi! I also submitted a PR (#8523) addressing this same issue. My PR includes some additional features that might be worth considering:

  • User toggle setting - Let users choose between external browser or in-app navigation
  • Command palette integration - Quick toggle via Mod+Shift+P
  • UI toggle button - Visible in sidebar footer (desktop only)
  • Persisted preference - Setting survives app restarts

Happy to collaborate or consolidate our changes if the maintainers prefer! The core click handler approach is very similar.

@leonardomso
Copy link
Author

leonardomso commented Jan 14, 2026

Hi! I also submitted a PR (#8523) addressing this same issue. My PR includes some additional features that might be worth considering:

  • User toggle setting - Let users choose between external browser or in-app navigation
  • Command palette integration - Quick toggle via Mod+Shift+P
  • UI toggle button - Visible in sidebar footer (desktop only)
  • Persisted preference - Setting survives app restarts

Happy to collaborate or consolidate our changes if the maintainers prefer! The core click handler approach is very similar.

Your PR looks great, I guess we can close this one then, no problem. Thanks for contributing on this!

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.

when click on a link ,in opencode desktop , it opens the link in the same window , not external browser

2 participants