Skip to content

Fix inline raster avatars in agent catalog - #3581

Merged
wesbillman merged 1 commit into
mainfrom
carl/fix-agent-catalog-fields
Jul 29, 2026
Merged

Fix inline raster avatars in agent catalog#3581
wesbillman merged 1 commit into
mainfrom
carl/fix-agent-catalog-fields

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • render existing shared personas whose catalog avatar is a bounded inline PNG, JPEG, GIF, or WebP data URL
  • keep rejecting arbitrary, malformed, unsupported, and oversized data: URLs
  • preserve hosted relay URLs as the forward format; catalog browsing remains read-only

Root cause

Paul's live shared kind:30175 head contains a 144,878-character data:image/png;base64,... avatar. The catalog projection accepted HTTP(S) URLs and bounded percent-encoded SVG emoji avatars only, so it projected Paul's avatar to null before ProfileAvatar rendered it. The owner still saw the local persona avatar, producing the reported owner/viewer mismatch.

This patch accepts only four raster MIME types with strict base64 shape and a 256 KiB total URL cap at the existing catalog parsing boundary. It repairs already-signed heads such as Paul without viewer-side uploads or publication side effects.

Hosted media remains the canonical forward path. #3578 uploads inline raster avatars during snapshot import, preventing the known source from creating future inline persona/profile values; existing signed catalog heads still need this compatibility path until their owners republish.

Agent instruction finding

The catalog publishes AgentDefinition.system_prompt verbatim as the user-authored Agent instruction, as documented by the sharing UI and NIP-AP. No Buzz base/core/runtime prompt is concatenated in the publish, catalog, or import path. This PR therefore does not remove authored instructions and accidentally strip copied agents of their behavior.

Validation

  • targeted personaCatalogRelay.test.mjs: 24 passed
  • Desktop typecheck: passed
  • pre-push Desktop frontend suite: 3,771 passed
  • pre-push Desktop checks: passed
  • git diff --check: passed
  • independent review: no blockers, 9.4/10

Accept bounded base64 raster image data URLs when projecting shared persona
heads so existing catalog agents such as Paul keep their published avatar.
Continue rejecting arbitrary, malformed, and oversized data URLs.

Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
@wesbillman
wesbillman requested a review from a team as a code owner July 29, 2026 17:06
@wesbillman
wesbillman enabled auto-merge (squash) July 29, 2026 17:33
@wesbillman
wesbillman merged commit 7e9b77f into main Jul 29, 2026
25 checks passed
@wesbillman
wesbillman deleted the carl/fix-agent-catalog-fields branch July 29, 2026 17:36
loganj pushed a commit that referenced this pull request Jul 29, 2026
…dance

* origin/main:
  fix(mobile): keep TLS on relays joined by invite (#3139)
  Improve emoji autocomplete matching (#3571)
  Fix shared agent avatar import profiles (#3578)
  Fix inline raster avatars in agent catalog (#3581)
  revert(acp): remove dead GOOSE_ACP_SCHEDULER_DISABLED env injection (#3576)
  feat(agent): make Gemini and MLflow-route models usable through databricks_v2 (#3569)
  fix(cli): mask credential env values in --help output (#3570)
  Serialize Tauri pre-push checks (#3567)
  chore(release): release Buzz Desktop version 0.5.1 (#3566)
  Run Tauri clippy in pre-push (#3555)
  perf(desktop): move observer-feed archive and decrypt commands off main thread (#3415)
  fix(desktop): preserve shared agent fidelity (#3553)
  Polish mobile navigation and menus (#3486)
  feat(agent): route Claude/GPT model families to their native gateway wire (#3538)

Signed-off-by: npub13n66s06epmqf2kc3v373ez8hj65cuzyvxzjf93vwpervxqn2u7jq2qd9je <8cf5a83f590ec0955b11647d1c88f796a98e088c30a492c58e0e46c3026ae7a4@buzz.block.builderlab.xyz>
joahg added a commit to joahg/buzz-dev-mode that referenced this pull request Jul 29, 2026
…-style

* origin/main:
  fix(mobile): keep TLS on relays joined by invite (block#3139)
  Improve emoji autocomplete matching (block#3571)
  Fix shared agent avatar import profiles (block#3578)
  Fix inline raster avatars in agent catalog (block#3581)

Signed-off-by: Joah Gerstenberg <joah@squareup.com>
wesbillman added a commit that referenced this pull request Jul 29, 2026
## Buzz Desktop release v0.5.2

### Changes since v0.5.1:

- feat(cli): mirror Desktop mention delivery
([#3330](#3330))
([`7adc46268`](7adc462))
- fix(desktop): deduplicate relay outage notification
([#3579](#3579))
([`66e705492`](66e7054))
- fix(desktop): reconcile thread arrivals at bottom
([#3585](#3585))
([`b42a8d447`](b42a8d4))
- Improve emoji autocomplete matching
([#3571](#3571))
([`259de6afb`](259de6a))
- Fix shared agent avatar import profiles
([#3578](#3578))
([`324bd6b46`](324bd6b))
- Fix inline raster avatars in agent catalog
([#3581](#3581))
([`7e9b77f72`](7e9b77f))
- feat(agent): make Gemini and MLflow-route models usable through
databricks_v2 ([#3569](#3569))
([`4a1ebf25c`](4a1ebf2))

**To release:** merge this PR. The tag and build will happen
automatically.

Signed-off-by: Wes <wesbillman@users.noreply.github.com>
tlongwell-block pushed a commit that referenced this pull request Jul 30, 2026
* origin/main: (29 commits)
  feat(replica): portable heartbeat-token fence with snapshot-local reader routing (#3268)
  fix(git): channel binding tooling + author remediation for unbound repos (#3626)
  feat: configure S3 URL addressing style (#3400)
  feat: add first-class OpenRouter provider support (#1975)
  feat(agent,acp): wire provider total_tokens through NIP-AM publish chain (#3593)
  chore(release): release Buzz Desktop version 0.5.2 (#3624)
  docs: add Linux rendering troubleshooting guide (#3573)
  fix(desktop): discover bun-installed agent CLIs in ~/.bun/bin (#3343)
  feat(tracing): correlate trace IDs in relay logs (#3608)
  chore(ci): bump Linux AppImage build container to ubuntu:24.04 (#3602)
  feat(cli): mirror Desktop mention delivery (#3330)
  fix(desktop): deduplicate relay outage notification (#3579)
  fix(desktop): reconcile thread arrivals at bottom (#3585)
  fix(mobile): keep TLS on relays joined by invite (#3139)
  Improve emoji autocomplete matching (#3571)
  Fix shared agent avatar import profiles (#3578)
  Fix inline raster avatars in agent catalog (#3581)
  revert(acp): remove dead GOOSE_ACP_SCHEDULER_DISABLED env injection (#3576)
  feat(agent): make Gemini and MLflow-route models usable through databricks_v2 (#3569)
  fix(cli): mask credential env values in --help output (#3570)
  ...

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
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