mirror of
https://github.com/block/buzz.git
synced 2026-11-24 18:21:59 +00:00
Design docs for Android push notifications, matching what iOS has today: DM and mention notifications with real message text, grouped per conversation, and tapping one opens it. - **[ADR 0004](docs/adr/0004-push-gateway-hides-device-platform.md):** one push gateway per app distribution serves both platforms, and the relay can't tell an Android installation from an iOS one. - **[ADR 0005](docs/adr/0005-android-push-enrollment-attestation.md):** Android enrollment requires hardware Key Attestation on a locked bootloader, verified offline. Later installation calls are signed with the attested key. - **[ADR 0006](docs/adr/0006-android-notifications-run-app-dart-code.md):** Android builds notifications with the app's own Dart code in a background engine, instead of a native port of the iOS extension. - **[PLANS/ANDROID_PUSH.md](PLANS/ANDROID_PUSH.md):** the spec, plus the tickets it splits into. - **CONTEXT.md:** defines *wake signal* and *push gateway*. The privacy model stays the same: pushes carry a fixed wake signal and nothing about any event. ### Validation A throwaway [prototype](https://github.com/block/buzz/tree/prototype/android-push-headless-dart) checked ADR 0006 against FCM's ~10 s handler budget. It started a headless Dart engine from a killed app, signed in to a local relay and updated a placeholder notification with the real text. | Device | Wake to real text (median, 12 cold runs) | Memory (PSS) | |---|---|---| | Pixel 9a | 0.51 s (worst 0.54 s) | ~45 MB | | Emulator, CPU slowed ~8x | 0.80 s (worst 1.05 s) | ~57 MB | The relay ran on the same machine, so real network latency is still unmeasured. With an unresponsive relay, the placeholder notification stayed and the native watchdog ended the handler. This PR changes documentation only, so no app run applies. ### Regressions None. This PR adds documentation only and changes no behavior. The design keeps iOS push working through the rollout, and the relay learns no more about devices than it does today. --------- Signed-off-by: Tom Brow <tomb@squareup.com> Co-authored-by: Tom Brow <tomb@squareup.com>
120 lines
5.5 KiB
Markdown
120 lines
5.5 KiB
Markdown
# Buzz domain language
|
|
|
|
Shared terminology for Buzz product behavior. This glossary currently covers mobile [push suppression](#push-suppression), the [notification body](#notification-body), [mobile builds](#mobile-builds), [sharing](#sharing), [quick send](#quick-send) and the [open-channel directory](#open-channel-directory); it is not a complete model of Buzz.
|
|
|
|
## Notifications
|
|
|
|
### Mobile push notification
|
|
|
|
A notification directed to a user's mobile installation through the platform's push service.
|
|
|
|
### Wake signal
|
|
|
|
The fixed push a [push gateway](#push-gateway) sends to an installation, telling it to fetch new events from its relays. It carries nothing about any event.
|
|
|
|
_Avoid_: Silent push, content push
|
|
|
|
### Push gateway
|
|
|
|
The service that holds one mobile app's platform push credentials (an [internal build](#internal-build), the [public build](#public-build) or a fork's app) and sends [wake signals](#wake-signal) to that app's installations on every platform. See [ADR 0004](docs/adr/0004-push-gateway-hides-device-platform.md).
|
|
|
|
_Avoid_: Push server, APNs gateway
|
|
|
|
### Notification body
|
|
|
|
The text a [mobile push notification](#mobile-push-notification) shows for a message: the message's text with its Markdown syntax removed, cut only where the platform would cut it. See [ADR 0002](docs/adr/0002-notification-message-text.md).
|
|
|
|
### Push suppression
|
|
|
|
Withholding an otherwise eligible [mobile push notification](#mobile-push-notification) based on [desktop activity](#desktop-activity) and a working connection to the relevant community. It does not depend on whether desktop alerts can be shown.
|
|
|
|
_Avoid_: Read receipt, mark as read, mute
|
|
|
|
### Desktop activity
|
|
|
|
User interaction with the computer running Buzz, including interaction with another application. It is the interaction itself, not a state that lasts afterward, and does not imply that a particular Buzz message was displayed or read.
|
|
|
|
_Avoid_: Message visibility, read activity
|
|
|
|
### In-app activity
|
|
|
|
User interaction inside Buzz. Recent in-app activity remains evidence of [desktop activity](#desktop-activity) after Buzz loses focus; current window focus is a separate condition.
|
|
|
|
### Desktop inactivity
|
|
|
|
The state reached when the duration specified in the spec has elapsed since the last observed [desktop activity](#desktop-activity).
|
|
|
|
### Additional notification delay
|
|
|
|
A waiting period after [desktop inactivity](#desktop-inactivity) begins before [mobile push notifications](#mobile-push-notification) resume. This is distinct from the inactivity threshold itself.
|
|
|
|
### Suppressed message
|
|
|
|
A message whose otherwise eligible [mobile push notification](#mobile-push-notification) was withheld. The term refers to its notification, not withholding the message itself, and says nothing about whether the message has been read.
|
|
|
|
### Suppression activity signal
|
|
|
|
Information communicated for deciding whether [desktop activity](#desktop-activity) warrants [push suppression](#push-suppression). It is distinct from [visible presence](#visible-presence) and is not a read receipt.
|
|
|
|
### Visible presence
|
|
|
|
The availability status shown to other members, such as online, away, or offline. A chosen visible presence status does not necessarily reflect actual [desktop activity](#desktop-activity).
|
|
|
|
### Suppression renewal
|
|
|
|
A [suppression activity signal](#suppression-activity-signal) that extends how long [push suppression](#push-suppression) applies based on activity on one desktop.
|
|
|
|
### Inactivity cutoff
|
|
|
|
The time of the last observed [desktop activity](#desktop-activity) plus the duration specified in the spec, when [desktop inactivity](#desktop-inactivity) begins. New desktop activity moves this cutoff forward.
|
|
|
|
## Mobile builds
|
|
|
|
### Internal build
|
|
|
|
A mobile app an organization distributes only to its own members, for example through device management. It uses only that organization's Builderlab and reaches only that organization's community.
|
|
|
|
_Avoid_: Dogfood build, enterprise build, org build
|
|
|
|
### Public build
|
|
|
|
The mobile app distributed through the App Store and TestFlight. It uses only the public Builderlab and cannot reach any organization's community.
|
|
|
|
_Avoid_: App Store build, external build
|
|
|
|
## Sharing
|
|
|
|
### Share
|
|
|
|
Bringing content such as a screenshot, screen recording, URL or text from another app into a Buzz conversation through the system share sheet. A share ends in that conversation's composer, where the person adds their own text and sends it.
|
|
|
|
_Avoid_: Forward, post
|
|
|
|
### Share target
|
|
|
|
A conversation offered among the share sheet's suggested destinations: an existing channel or DM, or a new Solo chat. Share targets are learned from top-level messages a person sends in a conversation; thread replies and incoming messages never count.
|
|
|
|
_Avoid_: Recipient, contact, suggestion
|
|
|
|
## Agents and conversations
|
|
|
|
### Bestie
|
|
|
|
The one agent a person has chosen as their default in a community. A community has at most one Bestie per person.
|
|
|
|
_Avoid_: Default agent, main agent, assistant
|
|
|
|
### Quick send
|
|
|
|
Sending a message to Buzz from outside the app (Siri, Shortcuts, the Action button) without opening Buzz. A quick send to the [Bestie](#bestie) posts the message in the person's DM with the Bestie.
|
|
|
|
_Avoid_: Siri message, dictation, background send
|
|
|
|
## Channels
|
|
|
|
### Open-channel directory
|
|
|
|
The open, listed channels of a community that a person can find and preview without being a member. Private channels, DMs and unlisted channels are never in it. A client's saved copy is the set it last saw, so a channel that has since turned private, unlisted or deleted can linger in it until the next full read.
|
|
|
|
_Avoid_: Channel list, public channels, discovery
|