editor: Fix open_url command not handling non-channel server URLs#44293
editor: Fix open_url command not handling non-channel server URLs#44293NimitzDEV wants to merge 3 commits intozed-industries:mainfrom
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @NimitzDEV on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@NimitzDEV Thanks for this! We shouldn't add a regex, but we should update the code so that if we fail to parse it using the existing functions we fallback to opening the browser. That might require shuffling some code around. |
|
@ConradIrwin Hi, Thanks for the feedback! I updated the fix to avoid using regex as suggested. Also, while working on this, I noticed a potential issue in the |
|
Thanks for taking the time to make this better! As I was reviewing this change, I realized that we didn't want to run the risk of overloading the open url request (because then we might end up redirecting back and forth between the web and the editor), so I spent a bit of time playing, and ended up with the change in #44910 instead. |
- **Fix editor::OpenUrl on zed links** - **Fix cmd-clicking links too** Closes #44293 Closes #43833 Release Notes: - The `editor::OpenUrl` action now works for links to https://zed.dev - Clicking on a link to a Zed channel or channel-note within the editor no-longer redirects you via the web. --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
- **Fix editor::OpenUrl on zed links** - **Fix cmd-clicking links too** Closes zed-industries#44293 Closes zed-industries#43833 Release Notes: - The `editor::OpenUrl` action now works for links to https://zed.dev - Clicking on a link to a Zed channel or channel-note within the editor no-longer redirects you via the web. --------- Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
Closes #43833
Fix open_url to handle all server URLs, not just channel links
Previously, URLs like zed.dev/docs or zed.dev/extensions, or any URL that matches the server_url setting but does not link to a collab channel, were rejected instead of being opened in the browser because parse_request_path threw errors when links were not channel links.
Release Notes: