-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Correct serving modern build to macOS companion app #21724
Conversation
WalkthroughWalkthroughThe recent enhancements to the HTML entry generation script significantly improve its functionality and maintainability. Key updates include the integration of new user agent regex handling, a helper function to streamline template variable management, and improved path resolution methods. These changes aim to boost adaptability across different browser environments, enhance error handling, and ensure consistent access to necessary variables during template rendering. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
I also opened a WebKit bug report so we can perhaps remove this in the future. cc: @bgoncal |
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.
Seems good to me 👌
Proposed change
Adds an additional regex for the user agent to match the macOS companion app. It will match a minimum macOS version based on the minimum major Safari version returned by
browserslist
. As of today, that's v17 so macOS 12+ will get the modern build with this correction. This should be minimal maintenance. The gulp task will throw whenever we need to add another version pair to the map.The macOS map is for supported Safari, so this does make the assumption that users keep Safari relatively up to date, but I think it's the best we can do given the deficiency in Apple's API.
See the long code comment I added and #21695 (comment) for more details on why this is necessary.
Also refactored a bit so the regex is just generated once instead of once per page.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
Summary by CodeRabbit
New Features
Improvements
Task Updates