-
Notifications
You must be signed in to change notification settings - Fork 37.6k
Disable bg=true update parameter for Visual-Studio-Code organization accounts #290460
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
…bution - Added setDisableBackgroundUpdates method to IUpdateService interface - Implemented method in AbstractUpdateService to track disabled state - Updated platform-specific update services (Windows, macOS, Linux) to check disabled state before setting background parameter - Added IPC method to UpdateChannel/UpdateChannelClient for workbench-to-main communication - Created DefaultAccountUpdateContribution workbench contribution - Contribution listens for default account changes and checks organization_login_list - Disables background updates when 'Visual-Studio-Code' is found in org list - Contribution is Electron-only (skips on web) - Registered contribution at Eventually lifecycle phase Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
joaomoreno
left a comment
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.
@copilot Make the changes suggested. Also let's rename setDisableBackgroundUpdates to disableProgressiveReleases
…return Promise<void> - Renamed method from setDisableBackgroundUpdates to disableProgressiveReleases - Changed return type from void to Promise<void> for proper IPC traversal - Updated all implementations to use async/await - Updated IPC channel to properly return the promise Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
|
@copilot Let's just ensure this gets disabled once: as soon as the update service gets called this new method, it should always keep that state as disabled. |
- Once disableProgressiveReleases(true) is called, state remains disabled - Subsequent calls with false will not re-enable progressive releases - Ensures the disabled state is permanent once set Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
Implemented sticky behavior - once |
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.
Pull request overview
Disables the bg=true update-check query parameter for users whose default account indicates membership in the Visual-Studio-Code organization by propagating a “disable progressive releases” flag from the workbench (renderer) to the Electron main process update service.
Changes:
- Added
disableProgressiveReleases(disable: boolean): Promise<void>toIUpdateServiceand wired it through the update IPC channel. - Implemented sticky “disable progressive releases” state in
AbstractUpdateServiceand used it to preventbg=truefrom being added to update URLs on Windows/macOS/Linux. - Added a workbench contribution that monitors
IDefaultAccountServiceand triggers the disable behavior for matching accounts (Electron-only).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/services/update/browser/updateService.ts | Adds a browser no-op implementation of the new IUpdateService API. |
| src/vs/workbench/contrib/update/browser/update.ts | Adds DefaultAccountUpdateContribution to detect org membership and invoke disableProgressiveReleases via the update service. |
| src/vs/workbench/contrib/update/browser/update.contribution.ts | Registers the new workbench contribution. |
| src/vs/platform/update/electron-main/updateService.win32.ts | Uses the new disable flag to avoid bg=true in update feed URLs. |
| src/vs/platform/update/electron-main/updateService.linux.ts | Uses the new disable flag to avoid bg=true in update feed URLs. |
| src/vs/platform/update/electron-main/updateService.darwin.ts | Uses the new disable flag to avoid bg=true in update feed URLs. |
| src/vs/platform/update/electron-main/abstractUpdateService.ts | Tracks the sticky disable state and exposes shouldDisableProgressiveReleases(). |
| src/vs/platform/update/electron-main/updateService.snap.ts | Adds a snap no-op implementation of the new IUpdateService API. |
| src/vs/platform/update/common/updateIpc.ts | Adds IPC command + client method for disableProgressiveReleases. |
| src/vs/platform/update/common/update.ts | Extends IUpdateService with disableProgressiveReleases. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Method now has no parameters since it's a one-way sticky disable - Simplified logic by removing the conditional check for false - Updated all call sites to not pass an argument - Updated IPC channel to not pass/receive argument Co-authored-by: joaomoreno <22350+joaomoreno@users.noreply.github.com>
Disables the
bg=truequery parameter in update check URLs when the user's default account containsVisual-Studio-Codein itsorganization_login_list. Once disabled, progressive releases remain permanently disabled.Changes
Architecture
DefaultAccountUpdateContribution) monitorsIDefaultAccountServicefor account changesUpdateChannel)background: truein update URLsImplementation
IUpdateService.disableProgressiveReleases(): Promise<void>method (no parameters)AbstractUpdateServicetracks state in_disableProgressiveReleasesfield with sticky behaviordisableProgressiveReleases()is called, the disabled state becomes permanentLifecyclePhase.Eventuallyfor early executiononDidChangeDefaultAccountevents'visual-studio-code'organization loginisWeb)Promise<void>to ensure completion after IPC channel traversalFlow
Changes span 10 files: service interfaces, IPC layer, platform implementations, and workbench contribution.
Original prompt
- yup sounds good
- I bet it wont be available on startup. do it as early as you can, but check for events too
- Electron only yeah
[Chronological Review: The conversation began with the user requesting to disable the `bg=true` parameter for users whose default account contains `Visual-Studio-Code` in the `organization_login_list`. The user asked for a workbench contribution that listens for changes in the default account and propagates that state to the main process update service. The user then confirmed the approach, indicating that it should be done as early as possible and also check for events. The user specified that the implementation should be limited to Electron only.][Intent Mapping:
Visual-Studio-Codein the organization_login_list." - User's primary request for functionality.[Technical Inventory:
[Code Archaeology:
/Users/joao/Work/vscode/src/vs/workbench/contrib/update/browser/update.ts[Progress Assessment:
[Context Validation: All necessary context for continuing the work on the update feature is captured, including user requirements and technical specifications.]
[Recent Commands Analysis:
update.tsfile when the token budget was exceeded.1. Conversation Overview: - Primary Objectives: - "I need to disable the bg=true parameter when checking for updates for all users whose default account contains `Visual-Studio-Code` in the organization_login_list." - "Figure out a workbench contribution within the update domain that listens and reacts to default account changes..." - Session Context: The user is focused on implementing a feature in the VS Code update process that reacts to changes in user accounts. - User Intent Evolution: The user confirmed the approach and provided additional specifications regarding timing and technology.- Technical Foundation:
- TypeScript: Used for implementing the feature.
- Electron: Specified as the technology stack for the implementation.
- VS Code Workbench Contributions: The architectural pattern to be used for listening to account changes.
- Codebase Status:
- File Name:
- Purpose: To manage update checks based on user account information.
- Current State: User is in the process of defining how to implement the feature.
- Key Code Segments: Not specified yet, as the implementation is still in the planning phase.
- Problem Resolution:
- Issues Encountered: None explicitly stated; focus is on planning the implementation.
- Solutions Implemented: User has provided clear requirements and specifications.
- Debugging Context: No ongoing troubleshooting mentioned.
- Lessons Learned: User's specifications indicate a need for early execution and event handling.
- Progress Tracking:
- Completed Tasks: User has articulated the requirements for the feature.
- Partially Complete Work: Implementation of the workbench contribution is pending.
- Validated Outcomes: None yet, as the feature is still in the planning stage.
- Active Work State:
- Current Focus: Implementing a feature in
- Recent Context: User has confirmed the approach and provided additional specifications.
- Working Code: No specific code snippets discussed recently.
- Immediate Context: User is focused on how to implement the feature effectively.
- Recent Operations:
- Last Agent Comma...
update.tsupdate.tsthat disablesbg=truebased on user account conditions.Created from VS Code.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.