Repository navigation
Conversation
When the relay advertises buzz_v1 with the ping capability, the relay's per-person read state replaces NIP-RS as the unread authority. The client loads the sidebar on connect, marks reads through POST /me/read-state with a durable pending queue, and refetches only the channels and threads a relay-signed read-state ping names. Inbox per-message state comes from POST /me/coverage, and the relay's followed_threads decides follows. - Responses carry read_revision: older answers are dropped, and a gap waits 1.5 s for late pings before one full load. - The live socket's minute check probes one channel; a full load happens only when the relay's revision moved past ours, or on reconnect. - Coverage answers stay cached while only the latest message moves, and a message read once stays read as its scope's anchor advances. - Relays without buzz_v1 keep the existing NIP-RS path. Co-authored-by: ART <ea39c1c8acf57180161ef4ba4ed68abf8589f5291956b909a5aa991fc66664ca@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Bradley Axen <baxen@squareup.com>
…z_v1 NIP-11 gate relay_read_v1 exposes the relay's fixed /buzz/v1/me routes (sidebar, read-state, coverage) as one Tauri command: NIP-98 kind 27235 signed in Rust, channel IDs bounded to 20 lowercase UUIDs, bodies capped at 64 KiB and responses at 1 MiB, mirroring the web broker's read-v1 routes. connectNativeTransport parses NIP-11 buzz_v1 with the broker's readStateV1() rules and attaches ReadApiHost only when ping is advertised; otherwise NIP-RS behaves as before. coverage is exposed only when advertised. Co-authored-by: worker00 <d76f0aac2b2adc8fd52bb0158d631fff86307909e094308919f47547cf065b5c@buzz.block.builderlab.xyz> Signed-off-by: Bradley Axen <baxen@squareup.com>
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.
Summary
When the relay advertises
buzz_v1with thepingcapability, web and desktop take unread state from the relay instead of NIP-RS. That keeps every device in agreement. Relays without it keep the existing NIP-RS path unchanged.Depends on the relay PR block/buzz#8639. Replaces #427.
Flow
read-api.tsloads the sidebar fromGET /buzz/v1/me/sidebarand applies the relay's unread, mention, latest andfollowed_threadsvalues.server-unread.tsturns those rows into the unread decisions the sidebar, badge and Inbox already use.unread.tsandread-state.tshand those surfaces over when v1 is active and stop publishing NIP-RS.POST /me/read-state.POST /me/coverageabout the specific messages it shows. The relay's follow list decides which thread replies count.Ordering and recovery
read_revision. An older answer than one already applied is dropped.Transport
read-v1-*routes.relay_read_v1. It signs NIP-98 in Rust, bounds channel IDs to 20 UUIDs, and caps bodies at 64 KiB and responses at 1 MiB.Testing
5618e1ee5:pnpm checkpasses, and so do all 12,449 vitest tests, Tauri clippy and the pre-push hooks. In the Tauricargo testrun, 568 of 571 passed. The threehost_commandtiming tests failed while the machine was loaded and passed when rerun alone; that file isn't touched here.Draft until baxen tests the whole stack after the relay PR merges.
🤖 Generated with Claude Code