Skip to content

feat(mobile): unread count on the app icon and quieter notifications - #1896

Merged
elie222 merged 2 commits into
elie222:mainfrom
ald3b:feat/unread-badge
Oct 22, 2026
Merged

elie222 merged 2 commits into
elie222:mainfrom
ald3b:feat/unread-badge

Conversation

@ald3b

@ald3b ald3b commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

On the phone, nothing outside the app showed that chats had replies waiting: the app icon never carried a count. Two other things kept notifications noisy:

  • Marking a chat read from the inbox left its notifications in Notification Center, even though the replies were now read.
  • While the app was open, every "finished" push still dropped a banner over whatever you were doing, even though the result was already on screen in the inbox.

What changed

App icon badge

  • The icon shows how many chats have unread replies. It counts chats, not messages, across every Space in the inbox.
  • The inbox writes the count after each fresh load, and again when the app comes back to the foreground, so the icon can't go stale. Signing out or switching server clears it.
  • A push about a run (finished, failed, or asking for you) now carries the user's unread chat count across all their Spaces, counted with the same rules as the inbox, so the icon stays current while the app is closed. The server reads it in one query.

Notifications

  • Marking a chat read from the inbox (swipe or menu) now clears that chat's delivered notifications, as opening the chat already did.
  • Group pushes are matched by their group, and marking a bot's own chat read no longer clears pushes from groups that bot posted in.
  • While the app is open, finished-work pushes are silent: no banner, no list entry. Questions, takeovers and failures still show, as before.

No new user-facing copy.

How it was tested

On an iOS 27 Simulator with a Debug build against a local server, signed in to a test account with two bots, both with unread replies, and notifications allowed. Pushes shaped like the server's were delivered to the Simulator with the same payload fields.

  • Before the change:
    • The app icon showed no badge with two unread chats.
    • A "finished" push for another chat dropped a banner over the open inbox.
    • Marking a chat read from the inbox left its notification in Notification Center.
  • After:
    • The icon showed 2 with two unread chats, and 1 after one of them was marked read from the inbox.
    • A "finished" push arriving while the inbox was open showed no banner and left the inbox untouched.
    • With notifications from both chats in Notification Center, marking one chat read from the inbox removed that chat's notification and kept the other chat's.

A Simulator doesn't receive pushes from Expo, so the count carried in a real push was covered by the unit tests rather than on the device.

Unit tests. Each new test fails without this change.

  • The badge counts unread bots and groups across Spaces. It writes the icon after each fresh inbox load and again on return to the foreground, never before the first load.
  • Marking a bot, a group, or a bot from another Space read clears that chat's delivered notifications. Marking it unread clears nothing.
  • A group push matches its group, not the bot that posted it, and the Android notification keys match too.
  • While the app is open, a finished-work push is fully silent for every chat, and a question still shows.
  • The push for a run carries the user's unread chat count across all their Spaces, and Expo receives it as the icon badge. A push without a count leaves the badge alone.
  • The count query, run against Postgres, counts unread bots and groups across the user's Spaces and skips archived chats, small groups, other users' chats and external conversations.

The mobile, adapters and API suites pass, and the typecheck and lint pass.

CI can't capture the app icon or Notification Center; the iOS results above come from a simulator.

Not in this PR

  • Reading a chat elsewhere (for example on the web) updates the icon on the next push or the next time the app opens, not instantly.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@ald3b is attempting to deploy a commit to the Inbox Zero Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds unread-chat counts to the mobile app icon and makes finished-work notifications silent while the app is open.

  • The app icon shows how many chats have unread replies.
  • Marking a chat read clears only that chat’s notifications.
  • Completion pushes stay quiet while the app is open.

Review checks were based on code inspection; tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Run needs a notification] --> B[Count unread chats in member Spaces]
  B --> C[Send push with badge count]
  C --> D[App icon]
  E[App returns to foreground] --> F[Invalidate last badge write]
  F --> G[Load fresh inbox]
  G --> H[Count unread bots and groups]
  H --> D
Loading

Reviews (3) · Last reviewed commit: "fix(mobile): count the app icon badge ac..." · Reviewed by Greptile

Comment thread apps/mobile/lib/app-badge.ts
Comment thread packages/adapters/src/executor.ts Outdated
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Playwright screenshots

No new feature frames; gallery is suite-vs-main drift.

Open screenshot gallery · Dashboard · CI run

Updated for commit 94ecd37.

The app icon now shows how many chats have unread replies. The inbox sets it
across every Space whenever it changes, sign-out clears it, and a push for
finished work carries the count for its Space so the icon stays current
while the app is closed.

Marking a chat read from the inbox now clears its delivered notifications,
matching what opening the chat already did. Groups are matched by group, and
a bot's own chat no longer matches pushes from groups it posted in. While the
app is open, finished-work pushes stay silent; questions and failures still
show.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@ald3b
ald3b force-pushed the feat/unread-badge branch from 29d375d to f904880 Compare October 22, 2026 17:41
The push badge now uses the same count the inbox shows: the user's own
unread bots and groups across all their Spaces in the organization, read
in one bound query under a named system scope. Coming back to the app
rewrites the badge once the inbox has refreshed, even when the count is
unchanged, and signing out clears it.
@elie222
elie222 merged commit 42fab52 into elie222:main Oct 22, 2026
24 of 25 checks passed
tyleruenaka pushed a commit to tyleruenaka/rakazo that referenced this pull request Oct 24, 2026
…222#1896)

The app icon shows how many chats have unread replies across the user's Spaces. The inbox keeps it current while open, signing out clears it, and a push for finished work carries the count so it stays right while the app is closed. Marking a chat read from the inbox clears its delivered notifications. Group pushes match by group, and a bot's own chat no longer matches pushes from groups it posted in. While the app is open, finished-work pushes stay silent; questions and failures still show.

(cherry picked from commit 42fab52)
tyleruenaka added a commit to tyleruenaka/rakazo that referenced this pull request Oct 24, 2026
…menu, unread count on the app icon (#6)

* Jump pills for unread chats scrolled out of view in the phone inbox (elie222#1897)

A pill at the top or bottom of the inbox counts unread chats above or below the screen, or says Needs attention when one is waiting on you, and tapping it scrolls to the nearest one. It replaces the inbox's own below-only unread pill and keeps that pill's look: solid unread blue, white chevron and label, sitting just above the floating search bar. Rows hidden under the search bar and its fade count as off screen.

(cherry picked from commit c2239b6)

* Delete a chat from its long-press menu on the phone (elie222#1634)

Delete… is the last item in the inbox's long-press menu on iOS (after More, in red like Hide) and the last action in the organize sheet on Android and for older iOS, just above Cancel. It asks the same confirmation as the chat's own settings, so a bot can keep or drop its memories and a group says its bots and their own chats stay. Only chats in the current space offer it.

(cherry picked from commit e96a0cb)

* Unread count on the phone's app icon, and quieter notifications (elie222#1896)

The app icon shows how many chats have unread replies across the user's Spaces. The inbox keeps it current while open, signing out clears it, and a push for finished work carries the count so it stays right while the app is closed. Marking a chat read from the inbox clears its delivered notifications. Group pushes match by group, and a bot's own chat no longer matches pushes from groups it posted in. While the app is open, finished-work pushes stay silent; questions and failures still show.

(cherry picked from commit 42fab52)

* Don't offer Delete for the Primary bot on the phone inbox

---------

Co-authored-by: ald3b <3642270+ald3b@users.noreply.github.com>
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