Repository navigation
Conversation
The mobile shell advertises the "badge" capability and writes the count it last received when the app goes to the background, but nothing in the web app has sent that message since shellSetBadge was removed in #3583. The shell therefore wrote 0 and cleared any badge. AppLayout now posts the pending-thread count, the number the desktop Dock badge shows, to the native shell whenever it changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
deleted the
bb/show-the-attention-count-on-the-phone-app-badge-thr_ymbvm9smmz
branch
November 3, 2026 19:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The phone app icon never showed a count. The mobile shell advertises the
badgecapability and, when the app goes to the background, writes the last count it received. But nothing in the web app has sent that message sinceshellSetBadgewas removed in #3583, so the shell wrote its default of 0 and cleared any badge.What changed
apps/app/src/lib/native-shell/native-shell.ts: addsshellSetBadge(count), which posts the existing{ type: "badge", count }bridge message when the shell supports it.apps/app/src/components/layout/AppLayout.tsx: posts the pending-thread count fromdesktopAttentionThreadswhenever it changes. This is the number the desktop Dock badge shows.There are no mobile, push-payload, plugin SDK or daemon protocol changes. The badge updates only while the WebView runs. Pushes do not carry a badge count, so a question that arrives while the app is suspended doesn't change the badge until the app is opened. A thread that is only unread gets a dot on the Dock but no number on the phone.
How you verified
AppLayout.test.tsxcase: it checks that the page posts 2 for two pending threads and one unread thread, then 0 once none are pending. It fails without the AppLayout change.pnpm exec turbo run typecheck lint --filter=@bb/apppasses, as do the AppLayout and native-shell tests.pnpm start:worktree, with two threads waiting on a question: