Merged
Conversation
Contributor
There was a problem hiding this comment.
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
windowActiveMiddlewareimport and usage fromcreateCapiClientFetchedValue’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)meansenvServiceis 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 theenvServiceparameter 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
windowActiveMiddlewarechanges behavior for anyFetchedValuecreated here withkeepCacheHot: true: the 60s refresh timer will now continue to hit the network even whenIEnvService.isActiveis false (previously it would throw aFetchBlockedErrorand 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
rzhao271
approved these changes
Apr 6, 2026
justschen
pushed a commit
that referenced
this pull request
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.