All jobs

Add Push Notifications to an Expo App from a Linear Issue

Yes. An agent reads the issue, adds expo-notifications with permission and token registration, routes taps to a screen, mocks it in Jest and opens a pull request.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent starts from the Linear issue and the repository in its own sandbox and reads how the app boots before it adds a listener. In an app generated from infinitered/ignite's boilerplate, package.json pins expo 55.0.5, react-native 0.83.2, react 19.2.0 and @react-navigation/native ^7.0.14, uses expo-dev-client, expo-linking, expo-application and react-native-mmkv, and has no expo-notifications, expo-device or expo-constants. app.json names the scheme helloworld, the Android package and iOS bundle id com.helloworld, and lists config plugins for expo-localization, expo-font, expo-splash-screen, react-native-edge-to-edge and expo-build-properties. app/app.tsx waits for fonts, i18n and persisted navigation state, builds a linking config whose prefixes come from Linking.createURL("/") and whose screens map Welcome, showroom/:queryIndex?/:itemIndex?, debug, podcast and community, and renders AppNavigator with it.

The agent adds expo-notifications, expo-device and expo-constants with npx expo install so the versions match SDK 55, and registers the expo-notifications config plugin in app.json with the notification icon and colour the issue specifies. It writes app/services/notifications.ts: setNotificationHandler so a foreground notification shows a banner, a registerForPushNotifications function that returns early on a simulator using expo-device, calls getPermissionsAsync and then requestPermissionsAsync, creates the Android default channel with setNotificationChannelAsync, and calls getExpoPushTokenAsync with the projectId read from Constants.expoConfig.extra.eas. The token goes to the backend through a new registerPushToken method on the Api class in app/services/api/index.ts, which already wraps apisauce with Config.API_URL, and the last token sent is kept in MMKV through the existing app/utils/storage helpers so it is not re-sent on every launch.

Taps are routed through what the app already has. A useNotificationObserver hook in app/navigators/ reads getLastNotificationResponseAsync on launch and subscribes to addNotificationResponseReceivedListener, takes a url from the notification's data and hands it to the same linking config, so a notification carrying helloworld://podcast opens the podcast list through the route the app already defines. app.tsx calls the hook after isNavigationStateRestored is true and registers for a token once isAuthenticated from AuthContext becomes true.

The test side follows jest.config.js with the jest-expo preset and test/setup.ts, where the agent adds a jest.mock for expo-notifications and expo-device. New tests cover registerForPushNotifications returning no token when permission is denied or the device is a simulator, and the observer turning a notification's data.url into a navigation call. It runs pnpm test, pnpm compile for tsc --noEmit and pnpm lint:check, the package manager the boilerplate's README uses, runs npx expo prebuild --clean to show the config plugin generates the native projects without error, and opens a pull request that links the issue.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "A Linear issue labeled agent says: \"Add push notifications. Ask for permission after login, send the Expo push token to our API, and open the right screen when a notification is tapped.\" Do the work in this repository: install expo-notifications, expo-device and expo-constants with npx expo install, add the config plugin to app.json, write a notifications service that handles permission, the Android channel and token registration through the existing Api class, route notification taps through the app's existing linking config, mock the modules in the Jest setup and add tests for the denied, simulator and tap cases, run the tests, type check and lint, run expo prebuild to confirm the plugin works, and open a pull request that links back to the issue.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

What comes back is a pull request on its own branch that links the Linear issue. The diff adds the three packages to package.json and the lockfile, the plugin entry in app.json, app/services/notifications.ts, a registerPushToken method on the Api class, the observer hook, the calls in app/app.tsx, the mocks in test/setup.ts and the new test files. The description says where permission is requested, where the token is sent and which data field a notification needs to deep-link.

The run's record keeps pnpm test with the new cases, tsc --noEmit, eslint, and the expo prebuild output showing the generated android/ and ios/ projects picked up the plugin. No build is submitted to EAS and no notification is sent: the run has no push credentials.

Before merging, a reviewer configures FCM and APNs credentials in EAS, which the run cannot do, confirms the backend endpoint the token is posted to exists, and sends one test notification from the Expo push tool to a development build to see the tap open the expected screen.

Run it on every Linear issue labelled agent

In the console, an automation with a linear trigger on linear.issue.labeled and the label agent starts one run per labelled issue, with the issue as its context, in the Project that has the repository. Changes made by an app integration never fire it, so the agent's own updates do not start new runs.

From your own server, the same run is one POST /o/{org}/sessions per issue: the repository in resources, plus the issue's https://linear.app/<workspace>/issue/<ID> URL there too, read through your Linear connection into the prompt. A webhook on the API key posts run.completed or run.failed when the turn finishes, with the session_url to read the pull request link.

The use case this job follows, with its automation and trigger: Turn a Linear label into a PR.

Why run it on Rush?

Push setup in Expo spans native config, a permission flow, a token round trip and navigation, and the parts that can be checked without a device are a type check, mocked tests and expo prebuild. The sandbox runs all three from a clean install with the SDK's own tooling and keeps the output, which a laptop with a stale node_modules does not reliably reproduce.

A labelled issue becomes one pull request that touches every layer consistently and leaves the credential steps clearly listed for the reviewer. Several feature issues against the same app run in their own sandboxes at once, each on its own branch.

Frequently asked questions

Does it work in Expo Go?

Remote push notifications need a development build, which the boilerplate already uses through expo-dev-client and its expo start --dev-client script. The service returns early on a simulator and logs why, so local runs do not fail.

Where do the FCM and APNs credentials go?

In EAS, through eas credentials, not in the repository. The pull request lists that as the reviewer's step; the code only asks Expo for a push token, which Expo's service maps to the platform token.

Why ask for permission after login rather than at launch?

The issue asks for it, and it is also when the app can attach the token to a known user. The hook registers once isAuthenticated becomes true and skips if MMKV holds the same token already.

How does a notification choose the screen?

Through the url field in its data, which must match the app's linking config, for example helloworld://podcast. A notification with no url opens the app where it was; the observer ignores it.

Will it change the demo screens Ignite generates?

No. The hook routes through the existing screens map in app.tsx. When the demo code is removed with Ignite's remove-demo markers, the observer keeps working with whatever routes remain.

More Expo jobs

The same job on other stacks

More jobs like this: Turn a Linear label into a PR

Keep reading