SIGN IN SIGN UP

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

0 0 73 Python

fix(frontend/autopilot): improve AutoPilot OS push notification icon and copy (#13231)

### Why / What / How

**Why:** The OS-level push notification fired by AutoPilot on session
completion looks broken next to other apps on iOS (and Android): the
icon is the 16×16 `favicon.ico` upscaled by the OS, so it renders
blurry/pixelated, and the copy ("A response is waiting for you.") is
wordier than the rest of our notification surface area.

**What:** Adds a dedicated high-resolution square notification icon, and
tightens the copy to match the design mockup — title `AutoGPT`, body
`Task completed` (and `Task failed` for the parallel failure case).

**How:** The push payload from the backend only carries `{type, event,
session_id, status}` — title/body/icon are hardcoded in the service
worker (`public/push-sw.js`). So this is a frontend-only change:
- Drop the new `notification-icon-192.png` (light-on-dark AutoGPT mark)
into `public/`, plus a 512×512 for retina/Android upscaling.
- Swap `icon` and `badge` in `push-sw.js` away from `/favicon.ico`.
- Update the `NOTIFICATION_MAP` entries for
`copilot_completion.session_completed` and `session_failed`.
- Mirror the same values in the in-page `Notification()` fallback in
`useCopilotNotifications.ts` (used when no SW push subscription is
active).
- Update `push-sw-helpers.test.ts` assertions accordingly.

### Changes 🏗️

- `frontend/public/notification-icon-192.png`,
`notification-icon-512.png` — new square brand icon assets
(light-on-dark)
- `frontend/public/push-sw.js` — new title/body strings, icon/badge
point at the new PNG
- `frontend/src/app/(platform)/copilot/useCopilotNotifications.ts` —
in-page fallback notification updated to match
-
`frontend/src/services/push-notifications/__tests__/push-sw-helpers.test.ts`
— assertions updated, added body asserts

Closes
[OPEN-3139](https://linear.app/autogpt/issue/OPEN-3139/fixfrontendautopilot-improve-autopilot-os-push-notification-icon-and).

### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [ ] I have tested my changes according to the test plan:
- [x] `pnpm test:unit` for `src/services/push-notifications` (73/73
pass)
  - [x] `pnpm test:unit` for `src/app/(platform)/copilot` (972/972 pass)
  - [x] `pnpm format`, `pnpm lint`, `pnpm types` all clean
- [ ] **Manual:** trigger a real AutoPilot session-completion on iOS
Safari/PWA, confirm the notification renders the new icon crisply and
reads "AutoGPT — Task completed"
- [ ] **Manual:** same on Android Chrome — confirm icon is clear and the
status-bar badge silhouette looks correct
- [ ] **Manual:** trigger a session failure and confirm "Task failed"
copy

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Nicholas Tindle <nicholas.tindle@agpt.co>
K
Krzysztof Czerwinski committed
6ecb0cc1afbe688165dfe239b111091e20b3922b
Parent: 9c194bf
Committed by GitHub <noreply@github.com> on 5/27/2026, 5:26:41 PM