fix(site/src/testHelpers): point MCP server ACL msw handlers at v2 paths (#28659) by github-actions[bot] · Pull Request #28689 · coder/coder · GitHub
Skip to content

fix(site/src/testHelpers): point MCP server ACL msw handlers at v2 paths (#28659) - #28689

Merged
mtojek merged 1 commit into
release/2.37from
backport/28659-to-2.37
Aug 27, 2026
Merged

fix(site/src/testHelpers): point MCP server ACL msw handlers at v2 paths (#28659)#28689
mtojek merged 1 commit into
release/2.37from
backport/28659-to-2.37

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Backport of #28659 to release/2.37, cherry-picked with git 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.

Xum acted on Mike's behalf.

@github-actions github-actions Bot added the cherry-pick/v2.37 Cherry-pick PR targeting release/2.37 label Aug 27, 2026
@github-actions github-actions Bot added the cherry-pick/v2.37 Cherry-pick PR targeting release/2.37 label Aug 27, 2026
@github-actions
github-actions Bot requested a review from ibetitsmike August 27, 2026 00:11
@ibetitsmike
ibetitsmike force-pushed the backport/28659-to-2.37 branch from 23e68f3 to 52f9e03 Compare August 27, 2026 05:44
@github-actions

Copy link
Copy Markdown
Contributor Author

@ibetitsmike
ibetitsmike changed the base branch from release/2.37 to backport/28593-to-2.37 August 27, 2026 05:44
@ibetitsmike ibetitsmike changed the title [CONFLICT] fix(site/src/testHelpers): point MCP server ACL msw handlers at v2 paths (#28659) fix(site/src/testHelpers): point MCP server ACL msw handlers at v2 paths (#28659) Aug 27, 2026
@ibetitsmike
ibetitsmike force-pushed the backport/28659-to-2.37 branch from 52f9e03 to 44391a5 Compare August 27, 2026 06:05
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 -->
Base automatically changed from backport/28593-to-2.37 to release/2.37 August 27, 2026 07:36
…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
mtojek force-pushed the backport/28659-to-2.37 branch from fee3b4c to 2dd297c Compare August 27, 2026 07:36
@mtojek
mtojek self-requested a review August 27, 2026 07:37
@mtojek
mtojek merged commit cc20e7e into release/2.37 Aug 27, 2026
24 checks passed
@mtojek
mtojek deleted the backport/28659-to-2.37 branch August 27, 2026 07:39
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.37 Cherry-pick PR targeting release/2.37

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants