Repository navigation
chat: Follow task-list pagination links - #344841
Osvaldo Ortega (osortega) wants to merge 2 commits into
Conversation
Follow server-provided continuation URLs when discovering cloud sandbox sessions instead of reconstructing numbered pages. Preserve legacy filters and endpoint routing, and reject unsafe or repeated continuations. Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The continuation parser rejects previously supported link formats, silently truncating pagination and risking cached-session eviction and checkpoint advancement past unread tasks.
What changed in this PR
Updates cloud sandbox discovery to follow task-list continuation URLs instead of incrementing page numbers, enabling cursor-based pagination.
Changes:
- Follows relative and absolute continuation links, including through empty pages.
- Preserves legacy numbered-page filters and API routing while rejecting unsafe or repeated URLs.
- Adds regression coverage for full and incremental discovery, cancellation, and partial-result handling.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxApiService.test.ts |
Adds pagination regression tests and updates existing fixtures. |
src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxApiService.ts |
Follows and validates continuation URLs while preserving legacy routing and filters. |
Review effort: Balanced
Recognize unquoted and reordered relation parameters in pagination links. Reject malformed advertised continuations so incomplete discovery cannot evict cached sessions or advance its checkpoint. Co-authored-by: Copilot <[email protected]>
| } | ||
| } | ||
| // Separate repository scopes include workspace-less sandboxes as well as repository sessions. | ||
| for (const { withRepository, archived } of targeted ? [] : [ |
There was a problem hiding this comment.
This still makes 4 list calls per pass every 60s per window, which is currently what is causing the saturation of CMC's Redis I believe, so i don't know if this is the fix
There was a problem hiding this comment.
This was supposed to point at lines 636 - 639 🤦
|
At |
|
Closing this PR in favor of migrating to the new service that handles this already Dmitriy Vasyura (@dmitrivMS) will create a PR for it |

Summary
Cloud sandbox discovery currently checks whether another task-list page exists but constructs that request by incrementing a page number. This ignores cursor-based continuation URLs.
Link: rel="next"URL until no continuation remains, including after empty pages.Validation
Validated on macOS with Node.js 24.22.1 and refreshed transpiled output:
npm run test-browser-no-install -- --run src/vs/platform/github/test/common/githubResponse.test.ts --run src/vs/platform/github/test/common/localApiRequestProvider.test.ts --run src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxApiService.test.ts --browser chromium --reporter dot— passed, 645 tests.npm run test-node -- --run src/vs/platform/github/test/node/missionControlClient.test.ts --run src/vs/platform/github/test/node/pullRequestQueryService.test.ts --reporter dot— passed, 133 tests.npm run eslint -- src/vs/platform/github/common/githubResponse.ts src/vs/platform/github/test/common/githubResponse.test.ts src/vs/workbench/contrib/chat/test/browser/remoteAgentHost/cloudSandboxApiService.test.ts— passed.The new parser/checkpoint regression checks reproduced four failures before the shared-parser fix. Full build/type-check and live-service verification were not run.