Skip to content

fix: highlights and token exchange report ReactNativeSDK header (YPE-6433) - #257

Merged
Dustin-Kelley merged 4 commits into
mainfrom
cursor/ype-6433-rn-sdk-header-914b
Nov 4, 2026
Merged

Dustin-Kelley merged 4 commits into
mainfrom
cursor/ype-6433-rn-sdk-header-914b

Conversation

@Dustin-Kelley

@Dustin-Kelley Dustin-Kelley commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Highlight and data-exchange token requests should count as this React Native SDK. They still succeed, and usage tracking counts them as the web SDK (ReactSDK). createHighlightsApi and createDataExchangeApi now pass mergeSdkHeaders, which sets X-YVP-Sdk to ReactNativeSDK. This follows YPE-6433 and the image and search change in #256.

What changed

  • createHighlightsApi and createDataExchangeApi pass mergeSdkHeaders into the shared client.
  • The highlight list request and the token mint request check that header.

Scope

  • This covers highlight requests and data-exchange token mints.
  • Image and search requests already send ReactNativeSDK on main. Bible content, the version picker, and verse of the day already send it too. This change leaves them alone.

Tradeoffs

The data-exchange token mint has no extra-header option, so the call is mergeSdkHeaders() with no extra headers. Highlights already accepted extra headers. Those still pass through. A second x-yvp-sdk is dropped, same as images and search.

Blast Radius

Apps that load highlights or mint a data-exchange token. The requests still succeed. Tracking will see ReactNativeSDK where it saw ReactSDK.

Verification

  • Before the fix, both header checks expected ReactNativeSDK=2.2.0-dev and received ReactSDK=2.16.0.
  • After the fix, those two files passed (18 tests). pnpm typecheck passed. pnpm lint --max-warnings=0 passed. Core had 716 passing tests. UI had 906 passing tests and 1 skipped.
Open in Web Open in Cursor 

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge; no blocking issues were found.

Summary

Highlight requests and data-exchange token mints now send ReactNativeSDK through mergeSdkHeaders.

  • Highlight requests now carry the React Native SDK identity.
  • Data-exchange token requests now carry the React Native SDK identity.

Reviews (3) · Last reviewed commit: "docs(changeset): say data-exchange token..." · Reviewed by Greptile

cursoragent and others added 2 commits November 3, 2026 15:15
createHighlightsApi and createDataExchangeApi send ReactSDK=2.16.0.

YPE-6433

Co-authored-by: Dustin Kelley <Dustin-Kelley@users.noreply.github.com>
createHighlightsApi and createDataExchangeApi pass mergeSdkHeaders to ApiClient.
ApiClient's default header is ReactSDK. mergeSdkHeaders writes ReactNativeSDK on that key.

YPE-6433

Co-authored-by: Dustin Kelley <Dustin-Kelley@users.noreply.github.com>
@Dustin-Kelley
Dustin-Kelley marked this pull request as ready for review November 3, 2026 15:33
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

BrowserStack App Live

Item Value
Build rn-YPE-6433-pr257-1
Uploaded commit 1d32e29
Automation run Open run
Android App Live id bs://7a3b1e8d2ba4a51575de9c33a0f6661d719d07dc
iOS App Live id bs://83d8cf9663b72cf74a0de446ebb7b029b5c78612

Review-fix commits are not uploaded automatically. To upload the current PR head again, comment one of:

/app-live <sha> (both platforms), /app-live-ios <sha>, /app-live-android <sha>

Replace <sha> with the full 40-character sha of the head commit you are approving — abbreviations are refused, because a short prefix can be deliberately collided. Naming it binds the approval to that exact revision: if the head moves before the build starts, the build is refused rather than silently retargeted, and the log names the sha to re-issue. The bare form of each command is accepted when the PR author is themselves an approved collaborator on platform-sdk-reactnative-expo_automation.

Only approved collaborators on platform-sdk-reactnative-expo_automation can trigger a build.

@camrun91 camrun91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

wiring looks right and matches #256. a few test and doc things before merge:

  1. header asserts should use getSdkHeaders()['X-YVP-Sdk'], not a hand-built ReactNativeSDK=${pkg.version}-dev. that's the pattern in the bible-content and votd tests and ADR 0012. please drop the package.json imports.
  2. the createHighlight and deleteHighlight tests already check the other headers. please add the X-YVP-Sdk assert there too, since YPE-6433 asks for header tests.
  3. the CONTEXT.md "SDK Attribution Header" entry still says DOM-only. can you widen it to cover native clients too?

not blocking: /auth/token and the fonts fetch still send no stamp. worth a follow-up ticket.

Check X-YVP-Sdk on the create and delete highlight requests too, and
widen the CONTEXT.md entry to cover native clients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@camrun91 camrun91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks, all three asks from the last review look good. header asserts use getSdkHeaders(), create/delete now pin X-YVP-Sdk, and the glossary covers native + lists the unstamped calls.

one small thing: the changeset (.changeset/ype-6433-react-native-sdk-header.md:5) says "token exchange", which reads as the oauth /auth/token path. that one isn't stamped yet, per CONTEXT.md. could you reword it to something like Send ReactNativeSDK on highlight and data-exchange token requests. so the release notes match what shipped?

"Token exchange" reads as the OAuth /auth/token path, which is not stamped yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@camrun91 camrun91 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks for the quick turnaround, changeset reads right now. lgtm 👍

@Dustin-Kelley
Dustin-Kelley merged commit c971b07 into main Nov 4, 2026
12 checks passed
@Dustin-Kelley
Dustin-Kelley deleted the cursor/ype-6433-rn-sdk-header-914b branch November 4, 2026 19:12
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.

3 participants