Skip to content

Conversation

@SYM01
Copy link
Collaborator

@SYM01 SYM01 commented Dec 7, 2025

No description provided.

SYM01 and others added 25 commits October 21, 2024 01:47
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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix 401 issue (#22)

* enablle github action on develop branch
* 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 <33443792+SYM01@users.noreply.github.com>
* implemented an utility to export/import settings
* [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
* minor bug fixed

* improve UX and close #28

* use the same CIDR validator as PAC script
* [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>
* update deps

* fix the auth issue in auto switch profiles

* fix typo
* [WIP] Reflect current profile when using auto profile (#42)

* Show detected profile in the popup

* simplify test cases
* [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'.

* [i18n] Translate messages.json in pt_BR

100% reviewed source file: 'messages.json'
on 'pt_BR'.

---------

Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com>
@SYM01 SYM01 enabled auto-merge (squash) December 7, 2025 09:11
@SYM01 SYM01 disabled auto-merge December 7, 2025 09:11
@SYM01 SYM01 merged commit 37f28af into main Dec 7, 2025
2 checks passed
@gemini-code-assist
Copy link

Summary of Changes

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!

This pull request introduces significant enhancements to the extension's proxy management capabilities, focusing on intelligent auto-switching and real-time user feedback. It implements a dynamic system to select proxy profiles based on URL patterns and IP ranges, alongside a new service for tracking web request statistics per tab. These changes are supported by comprehensive updates to browser API abstractions, dependency versions, and the build process, aiming to provide a more robust and user-friendly experience.

Highlights

  • Dynamic Proxy Auto-Switching Logic: Introduced new functionality within ProfileConverter to dynamically determine the appropriate proxy profile for a given URL based on defined rules (domain, URL, CIDR). This enables intelligent, context-aware proxy switching.
  • Web Request Statistics Service: Added a WebRequestStatsService to track web request activity, including failed requests and the currently active proxy profile for each tab. This service utilizes an LRU cache to manage per-tab statistics efficiently.
  • Enhanced UI for Auto-Switch Mode: A new AutoModeActionBar.vue component has been implemented to display the detected proxy profile for the current tab when the extension is in auto-switch mode, providing users with real-time feedback. New internationalization (i18n) messages were added to support this feature across multiple languages.
  • Browser API Abstraction Updates: The BaseAdapter and its Chrome/Firefox implementations were extended with new methods for interacting with browser tabs (getActiveTab, onTabRemoved), messaging (onMessage, sendMessage), and web request events (onWebRequestResponseStarted). The setBadge function now supports targeting specific tabs.
  • Dependency and Build Process Updates: Numerous project dependencies in package.json have been updated to their latest versions. The manifest.json now includes the activeTab permission, and the build configuration (vite.config.ts) has been adjusted to conditionally disable Sentry and Rollup Visualizer plugins during test builds.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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

  1. 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.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 introduces a significant new feature for 'auto switch' mode, allowing for tab-specific proxy detection and display, which is a great enhancement. The changes are extensive, including dependency updates, major refactoring of the browser adapters, and the addition of new services and components to support this functionality. The implementation is generally solid and well-tested.

My review focuses on a few key areas for improvement. I've identified a critical type-safety issue in the Firefox adapter related to the onWebRequestAuthRequired event handler, which stems from an abstraction that doesn't fully align with Manifest V3 standards. I've also pointed out some leftover debugging code and commented-out blocks that should be removed for better code hygiene. Addressing these points will improve the robustness and maintainability of the codebase.

): void {
browser.webRequest.onAuthRequired.addListener(
callback,
callback as any,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The use of callback as any bypasses TypeScript's type safety and hides a fundamental issue. The onWebRequestAuthRequired signature in BaseAdapter is designed for Chrome's Manifest V2 (using an async callback), but this project uses Manifest V3, which requires the listener to return a Promise. This mismatch will cause authentication to fail in MV3 environments.

To fix this, the event handling should be refactored to be promise-based.

Recommended change in src/adapters/base.ts:

// src/adapters/base.ts
abstract onWebRequestAuthRequired(
  callback: (details: WebAuthenticationChallengeDetails) => Promise<BlockingResponse | undefined>
): void;

This will require updating ProxyAuthProvider.onAuthRequired in src/background.ts to be an async function that returns a Promise, which is the correct pattern for MV3 and will also work for Firefox, removing the need for the as any cast.

// this.stats.addFailedRequest(details);
// TODO: update indicator
const proxySetting = await getCurrentProxySetting();
console.log("onResponseStarted", details);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This console.log statement appears to be for debugging purposes. It should be removed before merging into the main branch to keep the production console clean.

Comment on lines +22 to +44
// mocking
// tabStats.value = {
// failedRequests: [],
// currentProfile: {
// profile: {
// profileID: "profile1",
// profileName: "Profile 1",
// proxyType: "proxy",
// color: "#000000",
// proxyRules: {
// default: {
// host: "127.0.0.1",
// port: 8080,
// },
// bypassList: [],
// },
// },
// isConfident: true,
// },
// tabID: props.currentTab.id,
// };
// console.log(tabStats.value);
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This large block of commented-out code appears to be for mocking during development. It should be removed to improve code clarity and maintainability.

sender: MessageSender,
sendResponse: (response: any) => void
) => {
console.debug("stats:get", message, sender, sendResponse);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This console.debug statement seems to be for debugging purposes. It's best to remove it from the final code to avoid cluttering the browser console for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants