feat: per-community workspace icon set by admins, served via NIP-11#1463
Merged
Conversation
Adds a workspace-wide icon that owners/admins set once and every member sees, replacing the initials-only avatars in the workspace rail. Relay: new kind:9033 admin command (validated against relay_members role like 9030-9032) stores the icon as per-community state (communities.icon, additive migration 0003). The icon is served in the standard `icon` field of the NIP-11 relay information document, bound to the community resolved from the request Host; unmapped hosts get an icon-less document (fail-open, no enumeration oracle — conformance test updated to prove the doc varies only by the host's own icon). Icons are small data:image/* URLs (or http(s) URLs), validated and size-capped on ingest. Desktop: admin/owner-gated "Workspace icon" editor in Settings > Relay Access downscales the chosen image to a 128px data URL client-side and publishes 9033. The rail and workspace switcher read each relay's NIP-11 document with one unauthenticated HTTP GET (new fetch_workspace_icon Tauri command) — active and inactive workspaces alike — with a localStorage cache so icons render instantly on boot and offline, falling back to initials. Docs: draft NIP-WP (docs/nips/NIP-WP.md) specifying the kind:9033 write path and the plain NIP-11 read path, including why NIP-86's changerelayicon and NIP-29 group metadata were not used; cross-referenced from NOSTR.md. Co-authored-by: Brain <21994759fc7a6fa6b965551d35cfd7897d262f2495467f2d78694ddcfa6a5c7e@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
0454da0 to
fc48cd8
Compare
wpfleger96
added a commit
that referenced
this pull request
Jul 2, 2026
…n-metrics * origin/main: feat: per-community workspace icon set by admins, served via NIP-11 (#1463) perf(relay): batch outbound websocket data frames (#1464) Make reaction ingest atomic (#1458) Serialize fan-out EVENT frames once (#1459) fix: agent reliability — no restart on channel-add, visible dead-letter notice (#1468) Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com> # Conflicts: # crates/buzz-relay/src/handlers/event.rs
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.
What
Workspace-wide icon: relay owners/admins set it once, every member (and any NIP-11-aware client) sees the same icon in the workspace rail/switcher instead of name initials.
Direction per Tyler: the icon is per community/tenant and served just in NIP-11 — no custom snapshot event kind.
How
Relay
kind:9033(["icon", <value>]tag), role-gated exactly like the neighboring 9030–9032 membership commands (NIP-43admin/ownerstate). Values validated on ingest:http(s)ordata:image/*only, no whitespace/control chars, size caps (2 KB URL / 96 KB data URL).communities.icon, additive migration0003) and served in the standard NIP-11iconfield, bound to the community resolved from the requestHoston all three NIP-11 serving paths (/info,nostr+jsonroot, non-WS fallback).RelayInfo::buildstatic-input fence is preserved (the icon arrives as a pre-derived host-scoped scalar viabind_community), and the enumeration-oracle test now proves the served doc varies only by the requesting host's own icon — an unmapped host gets an icon-less document, never another tenant's icon.Desktop
fetch_workspace_iconTauri command) — works for inactive workspaces with no WebSocket session — plus a localStorage cache so icons render instantly on boot and for unreachable relays, falling back to initials.Docs
docs/nips/NIP-WP.md: spec for the 9033 write path + plain NIP-11 read path, including why NIP-86changerelayicon(separate JSON-RPC surface/auth) and NIP-29kind:39000 picture(per-group, not per-relay) were not used.NOSTR.mdcross-reference and the multi-tenant conformance table updated.Testing
0003).javascript:/non-imagedata:rejected → clear omits the field → unmappedHostgets the doc with no icon leak.