Repository navigation
[Perf] [1.145] chat: skip focus discovery with a connected feed - #345926
Aaron Munger (amunger) merged 3 commits into
Conversation
Port #345897 to release/1.145, preserving automatic focus intent and suppressing automatic cloud scans while the task-status feed is connected. Keep explicit Refresh and disconnected fallback behavior. Source commits: ad15031 and 7ba4e56. Adapt tests to the release branch's existing model and view contexts; no renewal/reconciliation implementation is included. Co-authored-by: Copilot <[email protected]>
|
One or more custom setup steps configured for this repository failed during this Copilot code review run: Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review. Note You can configure setup steps for Copilot code review separately from Copilot cloud agent with a |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the cloud sandbox discovery optimization backport.
No open issues 🎉
What changed in this PR
Backports the cloud sandbox discovery optimization to release/1.145, reducing redundant inventory requests while the task-status feed is connected.
Changes:
- Carries automatic refresh intent from Chat window focus through the sessions control, while preserving explicit manual Refresh.
- Skips focus, host-selection, and automatic UI scans with a connected feed; preserves stale fallback discovery and feed catch-up.
- Adds regression coverage and updates provider documentation. Feed transport, polling intervals, and discovery APIs remain unchanged.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/widgetHosts/viewPane/chatViewPane.test.ts |
Tests automatic focus refresh and manual toolbar intent. |
src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/editorCloudSandboxContribution.test.ts |
Tests connected-feed suppression, startup reuse, and manual refresh. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentSessionViewModel.test.ts |
Tests manual precedence and providers without freshness policies. |
src/vs/workbench/contrib/chat/test/browser/agentSessions/agentSessionsControl.test.ts |
Verifies refresh-reason forwarding and the manual default. |
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatViewPane.ts |
Marks window-focus refreshes as automatic. |
src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxSessionContribution.ts |
Skips freshness-gated discovery when the feed is connected. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsModel.ts |
Exports the refresh-reason type for shared use. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.ts |
Forwards refresh intent to the model. |
src/vs/workbench/contrib/chat/browser/agentSessions/agentSessions.ts |
Adds the optional refresh reason to the control interface. |
src/vs/sessions/contrib/sessions/test/browser/sessionsList.test.ts |
Confirms repeated list refreshes remain local-only. |
src/vs/sessions/contrib/providers/remoteAgentHost/test/browser/cloudSandboxAgentHostContribution.test.ts |
Covers feed catch-up, scan suppression, and disconnected fallback. |
src/vs/sessions/contrib/providers/remoteAgentHost/REMOTE_AGENT_HOST_SESSIONS_PROVIDER.md |
Documents connected-feed suppression and fallback behavior. |
Review effort: Balanced
Document the release client's incomplete feed coverage and renewal-driven full-scan eligibility. Do not equate socket connectivity with a complete catalogue or promise a fifteen-minute recovery deadline. Co-authored-by: Copilot <[email protected]>
a717861
into
release/1.145
Fixes #345934
Backport of #345897 to
release/1.145, portingad150315b02and7ba4e56174a. Part of #345234.Summary
The port adapts the refresh-type export and tests to the release branch's older model/test contexts. The Agents window's session-list refresh is local-only on this branch too and is preserved. No unrelated main changes or separate renewal/reconciliation implementation are included; polling intervals, feed transport, and discovery APIs are unchanged.
Readiness: safety-refresh policy
Keep this as a draft pending the same catalogue-recovery policy and evidence as the main PR. The feed is best effort, not a complete catalogue: deletes/shares/pins never hint, and new/out-of-lease/organization tasks can be missed.
Mandatory renewal and reconnect refetches are preserved. Connected-state scheduled polling was already suppressed before this port; the broader gate removes additional focus/selection/UI refresh opportunities. Whether renewal refetches alone supply the accepted safety backstop remains an explicit upstream open question.
Renewals can read incrementally and retain missing entries. The fifteen-minute constant is full-scan eligibility, not a maximum reconciliation deadline; healthy full-scan gaps can be around 21 minutes and failures or scan duration can extend them. Complete results also preserve connected/provisioning environments.
Before readiness:
task.deletedhint, incremental retention, later complete full reconciliation, and connected/provisioning retention.Current callback/gating and direct-renewal tests are not end-to-end proof of those recovery cases. This port adds no timer and imports no withdrawn renewal-suppression code.
How to Test
Live checks are from the main-branch implementation, not a new release-branch live run: four actual native focus-ins while fresh issued no additional list requests; an aged connected-feed provider/control check issued zero scans while explicit toolbar Refresh completed a 21-page scan. A real repo-less sandbox was opened through the UI and replied
OKwithout tool calls. All created test resources were removed.The aged connected-feed check is provider/control-level evidence, not native-OS-event proof. The earlier external-archive repair was a fallback poll, not a stale-focus-specific live pass. No production savings estimate is claimed.
(Written by Copilot)