{{ message }}
fix(site/src/testHelpers): point MCP server ACL msw handlers at v2 paths (#28659) - #28689
Merged
Conversation
ibetitsmike
force-pushed
the
backport/28659-to-2.37
branch
from
August 27, 2026 05:44
23e68f3 to
52f9e03
Compare
Contributor
Author
ibetitsmike
changed the base branch from
release/2.37
to
backport/28593-to-2.37
August 27, 2026 05:44
ibetitsmike
force-pushed
the
backport/28659-to-2.37
branch
from
August 27, 2026 06:05
52f9e03 to
44391a5
Compare
mtojek
added a commit
that referenced
this pull request
Aug 27, 2026
Batch backport of ibetitsmike's PRs that merged into `main` after the `release/2.37` branch was cut (merge-base `c275327fb72`, 2026-08-24). ## Included (9 cherry-picks, in order) | PR | Title | |----|-------| | #28470 | fix(coderd/x): surface Gemini malformed-function-call stream deaths as retryable errors | | #28471 | fix: apply MCP server selection when editing a chat message | | #28460 | refactor: consolidate viewport hooks and remove defineProperty matchMedia stub | | #28476 | feat(coderd/x/chatd/chattool): improve find_tools relevance and model guidance | | #28400 | fix(coderd/x/chatd/mcpclient): enforce MCP connect budget and unblock session cleanup | | #28589 | fix(coderd/x/chatd): truncate overlong generated chat titles instead of rejecting them | | #28496 | feat: mount chat API routes under /api/v2 | | #28497 | feat: promote codersdk chat API methods to Client | | #28498 | feat(site): use /api/v2 chat API paths | All picks applied cleanly with `git cherry-pick -x` onto `release/2.37`. ## Excluded and follow-up backports The remaining post-cut PRs are cherry-picked onto this PR as a GitHub stack (#28692) that merges bottom-up, so the dependency order is enforced by the PR bases: | Stack order | Original PR | Backport PR | Notes | |-------------|-------------|-------------|-------| | 1 | #28462 (repair failing Storybook stories) | #28687 | One fixture adaptation: 2.37's `OrganizationModelsContextValue` has no `organizations` field | | 2 | #28186 (enable Coder Agents for organization members) | #28688 | One story-assertion conflict resolved to the picked regex; ships no migration by design | | 3 | #28593 (allow sharing MCP servers with users and groups) | #28686 | Clean pick on top of #28688, plus the 1-line test fix #28657 (expect v2 MCP ACL path) | | 4 | #28659 (point MCP server ACL msw handlers at v2 paths) | #28689 | Clean pick on top of #28686 | Intentionally skipped: #28587 (restore agents-access cleanup migration). Release branches cannot take a migration unless its sequence number matches main with no gap. ## Validation - `go build ./...` and test-binary compilation for `./coderd/... ./codersdk/... ./enterprise/... ./site` pass - `pnpm check` and `pnpm lint:types` pass - Targeted Vitest on all touched test files: unit 281/281 pass; Storybook 180/181 pass. The single failure (`AgentChatPage.stories.tsx` > Queued For Capacity After Polling) reproduces identically on the untouched `release/2.37` baseline, so it is pre-existing and unrelated. > Xum acted on Mike's behalf. <!-- xum-attribution: model=claude-fable-5 thinking=high -->
…ths (#28659) ~~test-js is failing on main~~ Main is fixed: #28657 landed the same `api.test.ts` expectation update, so this PR no longer unbreaks anything and is not urgent. What remains here is the other half of the original fix: `site/src/testHelpers/handlers.ts` still registers the MCP server ACL GET/PATCH msw handlers at `/api/experimental/...`, but since #28498 the client calls `/api/v2/...`, so those handlers can never intercept a request. Any future test or story that exercises the ACL endpoints through the shared msw handlers would hit an unhandled-request error instead of the mock. This points them at the v2 paths the client actually uses. Validation: `pnpm exec vitest run --project=unit src/api/api.test.ts` passes 43/43 on this branch (merged with current main). > Xum acted on Mike's behalf. <!-- xum-attribution: model=claude-fable-5 thinking=high --> (cherry picked from commit 78d0571)
mtojek
force-pushed
the
backport/28659-to-2.37
branch
from
August 27, 2026 07:36
fee3b4c to
2dd297c
Compare
mtojek
self-requested a review
August 27, 2026 07:37
mtojek
approved these changes
Aug 27, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Backport of #28659 to
release/2.37, cherry-picked withgit cherry-pick -x. Part of the post-2.37 backport stack rooted at #28683; the stack merges bottom-up, so this lands after its parent PR.Applied cleanly on top of #28686; no adaptations.