block / block/buzz

desktop: render and open nostr:naddr long-form references

Open
#3,761 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

## Summary

The Desktop client does not currently render `nostr:naddr1...` references as an openable entry point. Markdown handling only preserves the custom `buzz://message` scheme, so both bare NIP-21 `nostr:naddr` references and explicit Markdown links are inert or stripped.

## Proposed scope

Add Desktop support for opening NIP-23 long-form references (`kind:30023`) inside Buzz:

- recognize bare `nostr:naddr1...` text and explicit Markdown links;
- decode and validate the NIP-19 address with the existing `nostr-tools` dependency;
- render a dedicated interactive link/pill;
- query the current workspace relay using the exact coordinate (`kind`, author pubkey, and `d` identifier);
- open an in-app dialog with loading, success, not-found, error, and retry states;
- leave malformed references, secret-key URIs, unsupported addressable kinds, and references inside code spans/fences non-interactive.

## Security and community boundary

The first version should ignore relay hints embedded in the `naddr` and only query the active workspace relay. This preserves the current community boundary and avoids sending authenticated requests to attacker-controlled relay URLs.

## Out of scope

- A generic viewer for every addressable event kind.
- New relay APIs, event kinds, migrations, or dependencies.
- Mobile support in the same PR; mobile parity can follow as a focused change.

## Acceptance criteria

- Bare and explicit Markdown `nostr:naddr` references for `kind:30023` are openable in Desktop.
- Clicking opens an in-app long-form viewer and does not depend on an OS-level `nostr:` handler.
- The relay query includes `kinds:[30023]`, `authors:[pubkey]`, and `#d:[identifier]`.
- Relay hints are ignored in v1.
- Invalid/unsupported/private-key/code-block text is not made interactive.
- Existing HTTP(S), `buzz://message`, mention, and channel-link behavior remains unchanged.
- Unit, Tauri, and Desktop E2E coverage is included, along with the required UI screenshot evidence.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Desktop Markdown handling that currently preserves buzz://message, then trace the existing relay-query and in-app dialog paths. Use the Unit, Tauri, and Desktop E2E coverage entry points named in the issue, and verify that valid kind:30023 references open while invalid, unsupported, private-key, relay-hinted, and code-block cases remain non-interactive.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, tauri
Domain
desktop, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.