Repository navigation
Conversation
…itle limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The change prevents truncated notification and Live Activity text from ending with half a UTF-16 surrogate pair. Existing limits and delivery behavior remain unchanged, keeping the impact narrowly bounded. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
The relay caps iOS push notification titles and bodies, Live Activity rows, and Live Activity alerts at 120 characters. When a payload is too big, it shrinks them further to 96, 76, and so on. The cut counts UTF-16 code units. If it lands between the two halves of an emoji, the payload keeps a lone high surrogate (
JSON.stringifysends\ud83d), and the phone shows�...at the end of the thread title.Example: a thread titled
Fix the login flows 🚀🚀🚀…(60 rockets) is sent asFix the login flows 🚀…🚀\ud83d....Change
truncateTextininfra/relay/src/agentActivity/agentActivityPayloads.tsnow drops a trailing lone high surrogate before it appends.... This is the same one-line guardGitVcsDriverCoreuses for worktree folder names. The Android FCM path (fitFcmData) already cuts by code point, so iOS now matches it.Scope and approval
This is a very small, focused fix for an obvious bug, so it has no prior issue. The change is one guard in the single helper every APNs text cap goes through, plus one assertion in the existing APNs payload test.
Overlap search: #24611 (open) fixes the same class of bug in
packages/sharedtruncate, but it doesn't touch the relay's own helper. #24679 (merged) fixed byte-size overflow for CJK titles, not surrogate cuts. No other open PR touchesagentActivityPayloads.ts.Verification
cd infra/relay && vp test run --config ../../vite.config.ts src/agentActivity/ApnsClient.test.tsfails in "fits long routing metadata and multibyte alerts within the APNs 4096-byte limit":Received: "😀…😀�...".src/agentActivity/passes 12 files, 102 tests.vp run check:changed: format, lint, typecheck, tests, and knip all pass.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code