豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Remove window active middleware for now#5009

Merged
lramos15 merged 1 commit intomainfrom
lramos15/persistent-anglerfish
Apr 6, 2026
Merged

Remove window active middleware for now#5009
lramos15 merged 1 commit intomainfrom
lramos15/persistent-anglerfish

Conversation

@lramos15
Copy link
Copy Markdown
Member

@lramos15 lramos15 commented Apr 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 6, 2026 20:36
@lramos15 lramos15 enabled auto-merge April 6, 2026 20:36
@lramos15 lramos15 self-assigned this Apr 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the CAPI-backed FetchedValue helper to stop blocking requests when the VS Code window is inactive by removing the windowActiveMiddleware from the advanced-fetch middleware stack.

Changes:

  • Removed windowActiveMiddleware import and usage from createCapiClientFetchedValue’s middleware pipeline.
  • Left the remaining middleware stack intact (etag, authBlocked, serverErrorBackoff).
Show a summary per file
File Description
src/platform/networking/common/capiClientFetchedValue.ts Removes the window-activity gating middleware from the CAPI FetchedValue fetch pipeline.

Copilot's findings

Comments suppressed due to low confidence (2)

src/platform/networking/common/capiClientFetchedValue.ts:111

  • Removing windowActiveMiddleware(envService) means envService is now unused in this function, but it remains part of the public signature. This is likely to trigger unused-parameter linting and also leaves the API/doc intent unclear (callers still pass an envService even though window activity is no longer considered). Consider either removing the envService parameter and updating call sites, or renaming it to _envService/adding an explicit comment explaining why it’s intentionally unused until the middleware is reintroduced.
		middleware: [
			etagMiddleware(),
			authBlockedMiddleware(),
			serverErrorBackoffMiddleware(),
		],

src/platform/networking/common/capiClientFetchedValue.ts:111

  • Dropping windowActiveMiddleware changes behavior for any FetchedValue created here with keepCacheHot: true: the 60s refresh timer will now continue to hit the network even when IEnvService.isActive is false (previously it would throw a FetchBlockedError and reuse the last-good cached value). If the goal is only to work around incorrect window-activity reporting, consider an alternative guard (e.g., feature-flag this middleware off, or only disable it for specific request types) to avoid increased background traffic when the window is genuinely inactive.
		middleware: [
			etagMiddleware(),
			authBlockedMiddleware(),
			serverErrorBackoffMiddleware(),
		],
  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@lramos15 lramos15 added this pull request to the merge queue Apr 6, 2026
Merged via the queue into main with commit 1dad896 Apr 6, 2026
23 checks passed
@lramos15 lramos15 deleted the lramos15/persistent-anglerfish branch April 6, 2026 21:24
@lramos15 lramos15 added the ~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch label Apr 6, 2026
lramos15 added a commit that referenced this pull request Apr 6, 2026
lramos15 added a commit that referenced this pull request Apr 6, 2026
Remove window active middleware for now (#5009)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

~release-cherry-pick Trigger: cherry-pick this PR to the latest release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants