Skip to content

feat(push): open any in-app screen a nudge links, track nudge opens (T-186) - #2913

Open
MusabShakeel576 wants to merge 1 commit into
masterfrom
claude/upbeat-brahmagupta-dttbzj
Open

MusabShakeel576 wants to merge 1 commit into
masterfrom
claude/upbeat-brahmagupta-dttbzj

Conversation

@MusabShakeel576

@MusabShakeel576 MusabShakeel576 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

App side of Automated nudges (T-186). Everything here is JavaScript-only, so it can ship over the air; no store build is needed.

  1. A push can open any in-app screen
    • routeForLink used to open only the paths in ROUTE_BY_LINK_PATH. A path not in that map now opens the way a Universal Link would (redirectSystemPath): plain paths only, with the link's own params but not its utm_* ones.
    • Some screens are denied: signup, onboarding, welcome, recovery, the permission and scanner screens, /extensions, /settings, /agent and /card/3ds. A denied or unreadable path still falls back to the type switch.
    • This lets an admin point a nudge at a new screen without an app release.
  2. Nudge tracking: Push Notification Opened now carries nudge_key and nudge_version, so an open is credited to the exact copy an admin saved.
  3. Push attribution
    • utm_medium=push gets its own push attribution channel; until now it was counted as other.
    • A push open also updates the last touch, so last_touch_utm_* on later events names the push.
  4. Push-token registration sends the device's IANA timezone (marketing pushes wait out quiet hours in the user's own zone) and appVersion. This applies to the first registration and to token refreshes.
    • Older backends ignore both fields: the global ValidationPipe has no whitelist.

Backend PR: https://github.com/Solid-Money/solid-backend/pull/2346. It adds the optional timezone and appVersion fields and sends nudge_key and nudge_version. It can be deployed in either order.

Not included, on purpose: per-push small icons and new notification channels, because they need a store build.

Tests

  • hooks/__tests__/usePushNotifications.test.ts:
    • any other in-app path opens, keeping its own params and dropping the campaign's;
    • denied screens are refused;
    • unreadable links are refused;
    • nudge_key and nudge_version are recorded on open.
  • npx tsc --noEmit, npm run lint and npm test for the changed suites.

Generated by Claude Code


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…edit push opens

- A push link outside the known paths opens the way a Universal Link does
  (plain paths, own params kept, campaign params dropped), except screens a
  push must never open (signup, recovery, settings, 3DS…). Admins can point
  an automated nudge at a new screen without an app release.
- Push Notification Opened carries nudge_key and nudge_version.
- utm_medium=push gets its own attribution channel, and a push open updates
  the last touch.
- Push token registration (and refresh) sends the device time zone, for
  nudge quiet hours, and the app version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YMpaeA4SmeQ3jcQFNe11J
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Nov 24, 2026 9:42am UTC
solid-app-staging Ignored Ignored Nov 24, 2026 9:42am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

  • Add your request for automatic reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 46 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 79 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 6edd6b2 and b7e277d.

Files selected for processing: 5

  • hooks/__tests__/usePushNotifications.test.ts
  • hooks/usePushNotifications.ts
  • lib/api.ts
  • lib/attribution.ts
  • lib/registerForPushNotifications.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

2 participants