-
Notifications
You must be signed in to change notification settings - Fork 373
Improved error handling, and notices about device limitations + HTTPS warning #258
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
…e context (https) requirements for WebGPU
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello @supermoos, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the user experience for the Emoji Gemma web demos by providing clearer setup instructions, adding warnings about device limitations and HTTPS requirements, and improving error handling for WebGPU availability. These changes make the demos more accessible and robust across different platforms and devices. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request significantly improves the user experience by adding detailed setup instructions for running a secure HTTPS server, which is a requirement for WebGPU on some platforms. It also adds important warnings about device memory limitations and enhances the WebGPU availability check to inform users about running in a non-secure context. The changes are clear and valuable. I've suggested a couple of minor improvements to the documentation and fixed a typo in a warning message.
| ```bash | ||
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost" | ||
| ``` |
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.
The openssl command includes a very specific subject. While this works, a simpler subject focusing only on the Common Name (CN) is sufficient for a local development certificate and is less confusing for users who might think they need to change these values.
| ```bash | |
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost" | |
| ``` | |
| ```bash | |
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/CN=localhost" | |
| ``` |
| message += ` | ||
| <br/><br/> | ||
| <strong>Note:</strong> WebGPU requires a secure context. Please access this page over HTTPS or from 'localhost'. Accessing a local server via its IP address also requires an HTTPS setup in many instances (e.g. iOS26 Safari). | ||
| `; |
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.
There appears to be a typo "iOS26" in the note. It's better to either correct it to a specific version or make it more general, like 'iOS Safari', to avoid it becoming outdated.
| message += ` | |
| <br/><br/> | |
| <strong>Note:</strong> WebGPU requires a secure context. Please access this page over HTTPS or from 'localhost'. Accessing a local server via its IP address also requires an HTTPS setup in many instances (e.g. iOS26 Safari). | |
| `; | |
| message += ` | |
| <br/><br/> | |
| <strong>Note:</strong> WebGPU requires a secure context. Please access this page over HTTPS or from 'localhost'. Accessing a local server via its IP address also requires an HTTPS setup in many instances (e.g. iOS Safari). | |
| `; |
| ```bash | ||
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost" | ||
| ``` |
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.
The openssl command includes a very specific subject. While this works, a simpler subject focusing only on the Common Name (CN) is sufficient for a local development certificate and is less confusing for users who might think they need to change these values.
| ```bash | |
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=US/ST=CA/L=Mountain View/O=Dev/CN=localhost" | |
| ``` | |
| ```bash | |
| openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/CN=localhost" | |
| ``` |
Improve setup instructions and add runtime warnings
This commit enhances the user and developer experience for the Emoji Gemma web demos by providing clearer setup instructions and adding important warnings about runtime requirements.
Key changes include:
app-mediapipedemo to detect and notify users when running in a non-secure context.