Skip to content

TT-4501: send CLI User-Agent header on dashboard API requests#83

Merged
qasim-nylas merged 1 commit into
mainfrom
qasim/TT-4501-dashboard-auth-user-agent
May 15, 2026
Merged

TT-4501: send CLI User-Agent header on dashboard API requests#83
qasim-nylas merged 1 commit into
mainfrom
qasim/TT-4501-dashboard-auth-user-agent

Conversation

@qasim-nylas
Copy link
Copy Markdown
Collaborator

@qasim-nylas qasim-nylas commented May 15, 2026

Summary

  • Adds a custom User-Agent header (nylas-cli/<version> (<os>/<arch>)) to all dashboard HTTP requests (AccountClient POST/GET and GatewayClient GraphQL)
  • Introduces a shared setDashboardUserAgent helper in http.go to avoid duplication
  • Adds test assertions for the header across all three request paths

Related docs

Test plan

  • Unit tests assert User-Agent header on AccountClient requests (account_client_test.go)
  • Unit tests assert User-Agent header on GatewayClient requests (gateway_client_test.go)
  • Integration test asserts User-Agent header on doPost/doGet (http_test.go)
  • All tests pass locally

Adds a custom User-Agent (nylas-cli/<version>) to all AccountClient
and GatewayClient HTTP requests so the dashboard can identify CLI traffic.
@qasim-nylas qasim-nylas requested a review from AaronDDM May 15, 2026 00:51
Copy link
Copy Markdown
Collaborator

@AaronDDM AaronDDM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@qasim-nylas qasim-nylas merged commit d9054f4 into main May 15, 2026
6 checks passed
@qasim-nylas qasim-nylas deleted the qasim/TT-4501-dashboard-auth-user-agent branch May 15, 2026 00:55
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.

2 participants