feat(stickers): add Sonar sticker packs (resurrects #1920)
Resurrects #1920 — Sonar sticker packs, rebased onto current main
This PR brings back the sticker-packs work from #1920 (closed unmerged) and rebases it onto today's main (103 commits newer). All merge conflicts are resolved and every local quality gate is green.
Why Buzz must have this
Emoji reactions and custom emoji already proved that lightweight, expressive communication matters in Buzz — but every serious chat product our users compare us to (Slack, Signal, Telegram, Discord) ships stickers as the next tier of expression: larger, authored, pack-based, and fun. Today a Buzz user who wants to react with more personality than an emoji has to upload an image by hand, every time.
Stickers are also a community-culture primitive: teams build shared identity around their own packs. With this PR Buzz gets that — but with a safety model no competitor has:
- Admin-approved catalog (kind 13536) — a community's sticker catalog is a materialized, curated list. Clients never fetch arbitrary pack events from the open network.
- Content-addressed, approval-gated asset cache — the relay only serves sticker assets whose SHA-256 matches an approved pack revision (
/media/sticker/{author}/{identifier}/{shortcode}/{sha256}). It never fetches unapproved assets, caps dimensions/frame counts, and pins DNS resolution. - Signal interop — users can import an official
signal.artpack link and republish it as a Sonar pack, so existing sticker culture ports over instead of starting from zero. - Authoring built-in — create/edit packs in Settings, upload WebP covers and images from the desktop app, publish via
buzz stickersCLI commands (agent-first, like everything else in Buzz). - Agents can sticker too — stickers ride ordinary channel messages as validated
stickertags, so managed agents and CLI flows can send them through the same pipeline.
What it looks like
Composer — sticker picker entry point (empty state prompts pack install):
Settings → Stickers — install curated packs, author your own, or import a Signal pack:
(Screenshots in the comment below — posted via scripts/post-screenshots.sh.)
Note on the screenshots: the E2E mock bridge has no seeded sticker catalog yet, so the picker renders its honest empty state. A follow-up will seed a mock catalog + pack events in
e2eBridge.tsso we can capture the populated grid and add a screen recording of the full send flow. To try it live:buzz stickers --helpagainst any relay running this branch.
What changed since #1920 (rebase notes)
- Migration renumbered
0020_sticker_catalog.sql→0021_sticker_catalog.sql(0020is nowjoin_policy_acceptanceson main); migration tests updated for 21 migrations. - Merged with main's media-auth rework — kept
authenticate_media_read/blob_cache_controlalongside the new verified-sticker route; keptshould_retry_legacy_uploadupload fallback in bothbuzz-cliand the desktop app while exposingdo_uploadto the sticker commands. - Merged with main's mention-flow rework — sticker tags compose with
audienceGeneration/audienceRevision,postSendContent, and the persistent-agent-audience send path;MessageComposerPropsextraction kept and extended with main's newer props. - File-size guard compliance — split desktop sticker commands into
commands/stickers.rsand the tag validator intosticker_events.rs(keepsmedia.rs,events.rs,lib.rs,AppShell.tsxunder the 1000-line ceiling without overrides); added a smalluseLiveUpdatesaggregator hook in the app shell. - Mobile — receive-only sticker rendering conflicts resolved against main's relay-provider changes.
Security properties (unchanged from #1920)
- No fetching of unapproved assets; approval pins exact pack event IDs.
- SHA-256 verified, dimension- and frame-capped animated media; zeroized secrets on import.
- Pinned
bitchat-to-sonardependency (rev-locked).
Verification (this branch)
cargo clippy --workspace --all-targets -D warnings✅just desktop-tauri-check/just desktop-tauri-clippy/just desktop-tauri-test(1469 passed) ✅- Desktop:
pnpm check(biome + file-size + px-text guards) ✅,pnpm test(3129 passed) ✅,tsc --noEmit✅ - Mobile:
dart format✅,flutter analyze✅,flutter test(520 passed, incl. new sticker preview/reference tests) ✅ cargo test -p buzz-db -p buzz-core -p buzz-media -p buzz-sdk -p buzz-cli✅ (incl. updated migration-sequence tests)
Design doc: docs/brainstorms/2026-07-15-sonar-sticker-packs-design.md.
Supersedes #1920.
Screenshots
Sticker picker — populated (from the original #1920 build, same UI)
The composer sticker button opens the pack picker with the installed "Herecomesbitcoin.org" pack.

Sticker rendered in the message timeline

Settings → Stickers (current main rebase)
Install curated Sonar packs, author your own pack with WebP cover + images, or import an official Signal pack.

Picker empty state (current main rebase)
Honest empty state when no packs are installed yet — points the user to Settings.

Review — feat(stickers): add Sonar sticker packs (resurrects #1920)
Verdict: auth boundary is right; structurally blocked — hold line-level review until it's clean. Reviewed at commit 8e9c410 (77 files, ~8.3k+/1.7k-).
🐝 Migration 0025 is a three-way collision
origin/main already ships 0025_relay_invites.sql (merged). This PR's 0025_sticker_catalog.sql and #2948's 0025_channel_owner_recovery.sql both also claim 0025. sqlx keys migrations by the numeric prefix (version), so a duplicate version fails at startup. This PR must renumber to the next free slot — coordinate with #2948 so you don't re-collide. This is part of why the PR shows CONFLICTING.
Auth boundary — verified
KIND_STICKER_PACK = 30031is parameterized-replaceable (compile-timeassert!(is_parameterized_replaceable(...))).KIND_STICKER_CATALOG = 13536mutations route throughrelay_admin.rswith asticker_catalog_command_requires_admin_usersingest test and coordinate validation (30031:{author}:{identifier}).- Correct gating — catalog is admin-only, packs are user-replaceable.
Why it's blocked for now
CONFLICTING + the 0025 collision + 77 files across relay/db/cli/desktop/mobile. A meaningful line-level review isn't worth doing until it's structurally clean.
Action items
- [ ] Rebase (currently CONFLICTING).
- [ ] Renumber migration off
0025to the next free slot (coordinate with #2948 so they don't re-collide). - [ ] After rebase + renumber, request a full line-level review — ~8k lines is too large to review meaningfully in the current state.
Independent review by Fizz 🐝 — auth boundary + structure triaged against the checked-out branch; not yet line-reviewed.
@vincenzopalazzo you still working on this? this is a great feature, that blocks from moving over from telegram to buzz. you need help
@mattkanwisher no i just need to have a feedback from the block team that they want this then I can rebase and move along with the review!
The code is mostly ready
@vincenzopalazzo they already reviewed it and said why its blocked , I fixed their comment in my branch can you merge in my branch? https://github.com/mattkanwisher/buzz/pull/1
@mattkanwisher if you the credit to me for the stickers idea you can carry on the PR and I will close it, feel free to ping me if you need any input on the design
@vincenzopalazzo ok feel free to close this. I also included your commits so you'll get credit https://github.com/block/buzz/pull/4026
Continuing this on https://github.com/block/buzz/pull/4026