-
-
Couldn't load subscription status.
- Fork 4.7k
fix: regression in handling on non-standard URLs on Windows #8070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideRefines the URL launch helper to prevent automatic HTTP scheme prepending for custom or non-standard URLs on Windows by leveraging the existing custom URL detector. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @asjqkkkk - I've reviewed your changes - here's some feedback:
- There’s a typo in the variable name
isNotCustomUrlOnWidows—it should beisNotCustomUrlOnWindowsfor clarity. - Importing
isCustomUrLfromappflowy_editor/srccouples you to an internal API; consider exposing it publicly or replicating just the necessary logic here. - Update the comment above the platform check to accurately reflect the Windows exception instead of still listing Windows alongside Linux/Android.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There’s a typo in the variable name `isNotCustomUrlOnWidows`—it should be `isNotCustomUrlOnWindows` for clarity.
- Importing `isCustomUrL` from `appflowy_editor/src` couples you to an internal API; consider exposing it publicly or replicating just the necessary logic here.
- Update the comment above the platform check to accurately reflect the Windows exception instead of still listing Windows alongside Linux/Android.
## Individual Comments
### Comment 1
<location> `frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart:46` </location>
<code_context>
- // on Linux or Android or Windows, add http scheme to the url if it is not present
+ // on Linux or Android, add http scheme to the url if it is not present
+ final isNotCustomUrlOnWidows =
+ UniversalPlatform.isWindows && !isCustomUrL(url);
if ((UniversalPlatform.isLinux ||
</code_context>
<issue_to_address>
Typo in variable name
Please rename `isNotCustomUrlOnWidows` to `isNotCustomUrlOnWindows`.
</issue_to_address>
### Comment 2
<location> `frontend/appflowy_flutter/lib/core/helpers/url_launcher.dart:45` </location>
<code_context>
}
- // on Linux or Android or Windows, add http scheme to the url if it is not present
+ // on Linux or Android, add http scheme to the url if it is not present
+ final isNotCustomUrlOnWidows =
+ UniversalPlatform.isWindows && !isCustomUrL(url);
</code_context>
<issue_to_address>
Comment doesn’t reflect Windows condition
Please update the comment to include Windows, as the logic applies to Windows when the URL is not custom.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| } | ||
|
|
||
| // on Linux or Android or Windows, add http scheme to the url if it is not present | ||
| // on Linux or Android, add http scheme to the url if it is not present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: Comment doesn’t reflect Windows condition
Please update the comment to include Windows, as the logic applies to Windows when the URL is not custom.
To fix #8050
Feature Preview
PR Checklist
Summary by Sourcery
Refine URL handling to prevent unintentional protocol prepending for custom editor URLs on Windows while preserving scheme addition for standard links on Linux and Android.
Bug Fixes:
Enhancements: