Skip to content

fix(notify): native push names take every documented character, and their fix parses - #1346

Open
sebyx07 wants to merge 2 commits into
mainfrom
fix/notify-push-review
Open

sebyx07 wants to merge 2 commits into
mainfrom
fix/notify-push-review

Conversation

@sebyx07

@sebyx07 sebyx07 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the review threads on #1317.

What changes

  • sound, category and channelId on a native push accept A-Za-z0-9._- in every position, as documented. Before, a leading _, . or - (channelId: '_mentions') failed the whole send. Widening only, so nothing that sent before is refused now. APNs categories and Android channel ids are arbitrary strings; a sound is a file or resource name. (thread, thread)
  • X_NOTIFY_PUSH_MESSAGE_INVALID for a native field prints a fix: that parses: the notifier's own message with that field set, e.g. pushChannel({ pusher, message: (args) => ({ ...message(args), sound: 'default' }) }). Its cause calls an interruption level one of APNs' fixed values, not a name the app registers. (thread, thread)
  • Docs: sound is 'default' or a bundled sound. APNs reads the file name and FCM the res/raw name without the extension. On Android 8+ the notification channel sets the sound, and with sound unset APNs alerts silently. (thread, thread)
  • Docs: a credential refusal rejects the whole send, so NativePushReport.skipped counts only devices whose platform has no provider. (thread)
  • Tests (native-push-report.test.ts): a bad field is refused for a recipient with no devices, which proves screening runs before the lookup (thread). removed counts an unsendable stored token and a bad token at its limit, each beside an accepted device (thread). Each field's fix transpiles.

Not changed: the return-type thread (thread) was already settled by #1324. Pusher, DataPusher and NativePusher return what they did before #1317.

Gate

bun test ./packages/notify/src/: 280 pass. tsc --noEmit -p packages/notify: clean. bun run verify: every step green except unit, which hit its deadline under machine load with two unrelated files (packages/cli/src/verify-shard.test.ts, packages/core/src/env.test.ts) SIGKILLed. Both pass when run alone (29/29).

🤖 Generated with Claude Code

sebyx07 and others added 2 commits November 24, 2026 04:12
…heir fix parses

A native push's sound, category and channelId now accept A-Za-z0-9._- in
every position, as documented, so a leading '_' no longer fails the send.
X_NOTIFY_PUSH_MESSAGE_INVALID for a native field prints a fix that parses
(the notifier's message with that field set) and describes an interruption
level as one of APNs' fixed values. Docs state what an unset sound does,
FCM's res/raw naming, and that a credential refusal rejects the send, so
NativePushReport.skipped counts only devices with no provider configured.
Tests cover screening for a recipient with no device and each way the
report counts a removed row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sebyx07
sebyx07 force-pushed the fix/notify-push-review branch from a6d59c7 to 8ff5fc8 Compare November 24, 2026 09:14

This branch has not been deployed

No deployments
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