-
Notifications
You must be signed in to change notification settings - Fork 10
UX and Sentry Improvement #39
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
Conversation
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](ai/nanoid@3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Adapt firefox * support firefore auto publish * support firefox, and optimized UX
* [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * update English i18n msg --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> Co-authored-by: SYM01 <[email protected]>
* [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
* [WIP] support chrome auto deploy * finalize Chrome auto deploy * npm audit fix * npm audit fix
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.
Hello @SYM01, 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!
Summary of Changes
This pull request focuses on enhancing the user experience and improving error reporting within the application. It includes build process improvements, dependency updates, error messaging enhancements, browser compatibility adjustments, and profile management optimizations. The changes span across workflow configurations, package dependencies, locale messages, adapter classes, and Vue components.
Highlights
- Build Process: The build process is improved by adding
SENTRY_AUTH_TOKENandSENTRY_RELEASEenvironment variables to the build workflow, and introducing a new job to publish the extension on the Chrome Web Store. - Dependency Updates: Several dependencies in
package.jsonhave been updated, including@vitest/coverage-v8,vite, andvue-tsc, ensuring the project uses the latest versions of these tools. - Error Messaging: New error messages have been added for malformed URLs and CIDR notations in
public/_locales/en/messages.json, providing users with more informative feedback. - Browser Compatibility: A
BrowserFlavorenum is introduced, andBaseAdapter,Chrome, andWebBrowserclasses are updated to include aflavorproperty, enhancing browser compatibility. - Profile Management: The
saveProfilefunction inPreferencePage.vueis replaced withsaveManyProfilesto handle multiple profiles more efficiently, and a correspondingsaveManyProfilesfunction is added toprofile.ts.
Changelog
Click here to see the changelog
- .github/workflows/build.yml
- Added
SENTRY_AUTH_TOKENto environment variables. - Introduced
SENTRY_RELEASEenvironment variable for Chrome and Firefox build jobs. - Added a new job to publish the extension on the Chrome Web Store.
- Added
- package-lock.json
- Updated
@vitest/coverage-v8from 2.1.8 to 3.0.6. - Updated
vitefrom 6.0.7 to 6.1.0. - Updated
vue-tscfrom 2.2.0 to 2.2.2. - Updated various esbuild dependencies from 0.24.2 to 0.25.0
- Updated various vitest dependencies from 2.1.8 to 3.0.6
- Updated
- package.json
- Updated
@vitest/coverage-v8from 2.1.8 to 3.0.6. - Updated
vitefrom 6.0.7 to 6.1.0. - Updated
vue-tscfrom 2.2.0 to 2.2.2.
- Updated
- public/_locales/en/messages.json
- Added new error messages for malformed URLs (
config_section_auto_switch_type_url_malformedandconfig_section_auto_switch_type_url_malformed_chrome). - Added new error message for invalid CIDR format (
config_section_auto_switch_type_cidr_malformed).
- Added new error messages for malformed URLs (
- src/adapters/base.ts
- Introduced
BrowserFlavorenum withUnknown,Web, andChromevalues. - Added
flavorproperty to theBaseAdapterclass.
- Introduced
- src/adapters/chrome.ts
- Set the flavor property to
BrowserFlavor.Chrome.
- Set the flavor property to
- src/adapters/web.ts
- Set the flavor property to
BrowserFlavor.Web.
- Set the flavor property to
- src/components/PreferencePage.vue
- Replaced
saveProfilewithsaveManyProfilesto handle multiple profiles efficiently.
- Replaced
- src/components/configs/AutoSwitchInput.vue
- Added form validation rules for URL and CIDR inputs.
- Added
getConditionInputRulefunction to return the correct validation rule based on the type of input. - Added form layout to the component.
- src/components/configs/ProfileSelector.vue
- Made the profileID a required property.
- Disabled the System Profile if it is the current profile.
- src/components/configs/ProxyServerInput.vue
- Added type assertion to proxyType v-model.
- src/services/profile.ts
- Added
saveManyProfilesfunction to save multiple profiles at once. - Added documentation to
saveProfileto indicate it is not promise-safe and to usesaveManyProfilesinstead.
- Added
- vite.config.ts
- Added sentry release injection.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and 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 to provide feedback.
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.
In realms of code, where proxies roam,
Profiles switch, finding their home.
From Chrome's domain to web's embrace,
Compatibility sets the pace.
Errors whisper, messages clear,
Enhancing trust, dispelling fear.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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
The pull request introduces several improvements, including build process enhancements, dependency updates, error messaging, browser compatibility, and profile management. The changes are well-structured and address the described issues. However, there are a few areas that could be improved to enhance security and maintainability.
Summary of Findings
- Potential vulnerability: Hardcoded extension ID: The Chrome Web Store extension ID is hardcoded in
.github/workflows/build.yml. While this might be acceptable for a private extension, it's generally better to use environment variables or configuration files to manage such sensitive information, especially if the workflow is ever made public or if you plan to manage multiple environments. - Missing input validation in
AutoSwitchInput.vue: ThegetConditionInputRulefunction inAutoSwitchInput.vuelacks input validation for the 'domain' type. While the 'url' and 'cidr' types have validation, the 'domain' type does not, which could lead to unexpected behavior or security vulnerabilities if the input is not properly sanitized.
Merge Readiness
The pull request is almost ready for merging. However, the hardcoded extension ID in the workflow file and the missing input validation for the 'domain' type in AutoSwitchInput.vue should be addressed before merging. I am unable to approve this pull request, and recommend that these issues be addressed before merging. Users should have others review and approve this code before merging.
* [i18n] Translate messages.json in pt_BR 100% reviewed source file: 'messages.json' on 'pt_BR'. * [i18n] Translate messages.json in zh_TW 100% reviewed source file: 'messages.json' on 'zh_TW'. * [i18n] Translate messages.json in zh_CN 100% reviewed source file: 'messages.json' on 'zh_CN'. --------- Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
This pull request includes several updates to improve the build process, enhance error messaging, and introduce new features for browser compatibility and profile management.
Build Process Improvements:
SENTRY_AUTH_TOKENto the environment variables in.github/workflows/build.yml.SENTRY_RELEASEenvironment variable for Chrome and Firefox build jobs.Dependency Updates:
package.json, including@vitest/coverage-v8,vite, andvue-tsc.Error Messaging Enhancements:
public/_locales/en/messages.json. [1] [2]Browser Compatibility:
BrowserFlavorenum and updatedBaseAdapter,Chrome, andWebBrowserclasses to include theflavorproperty. [1] [2] [3] [4] [5]Profile Management:
saveProfilewithsaveManyProfilesinPreferencePage.vueto handle multiple profiles more efficiently. [1] [2]saveManyProfilesfunction toprofile.tsfor saving multiple profiles at once.These changes collectively improve the build automation, enhance user feedback with better error messages, and add support for different browser flavors, while also optimizing profile management.