Skip to content

Merge User-Agent headers when cloning HTTP client#508

Open
heyitsaamir wants to merge 6 commits intomainfrom
feat/merge-user-agent-on-clone
Open

Merge User-Agent headers when cloning HTTP client#508
heyitsaamir wants to merge 6 commits intomainfrom
feat/merge-user-agent-on-clone

Conversation

@heyitsaamir
Copy link
Copy Markdown
Collaborator

@heyitsaamir heyitsaamir commented Apr 7, 2026

Summary

  • Client.clone() now concatenates User-Agent headers instead of overwriting, so each layer's identifier is preserved (e.g. teams.ts[graph]/x.x teams.ts[apps]/x.x)
  • Works across any number of nested clones
  • This is helpful in cases where we want to track what's actually using teams.apps. (Vercel, Hosted Agents etc). It gives them a way to pass in User-Agent and have it be reliably tracked.

Test plan

  • Added tests for two-level merge, parent-only, child-only, and three-level merge
  • Run npx jest src/http/client.spec.ts from packages/common — all 23 tests pass

heyitsaamir and others added 6 commits March 24, 2026 23:48
These two markdown files are all a human needs to write — the e2e testing
skill generates and manages the actual Playwright test code from here.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of overwriting, clone() now concatenates User-Agent headers
so each layer's identifier is preserved across nested clones.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant