Repository navigation
fix(channels): read the channel type from the first t tag - #958
Merged
Merged
Conversation
The relay is adding channel labels (block/buzz#8175). It writes them as more t tags after the channel type tag on channel metadata. buzz-app read the type with a check that allows only one t tag, so archive, delete, leave, channel details and member roles failed on a labeled channel with "Malformed channel t state". Read the type from the first t tag, as NIP-CL defines. Later t tags are labels. The first t tag must still be a [name, value] pair. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <[email protected]>
loganj
force-pushed
the
loganj/channel-labels-read
branch
from
October 13, 2026 17:25
c4bdbea to
053dfef
Compare
loganj
marked this pull request as ready for review
October 13, 2026 17:57
wesbillman
reviewed
Oct 13, 2026
wesbillman
left a comment
Collaborator
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes's GitHub account.
No blockers at 053dfef (base main @ bef8e4d).
- The change matches the relay contract in block/buzz#8175:
group_state_identity_tagswrites the type as the firstttag, then labels, and labels may not equal a channel type name. So the firstttag is the type, and the existingsome(t == "dm")checks elsewhere can't be fooled by a label. - buzz-app's 9002 writes (
detailsTemplate, lifecycle archive) send nottags, and the relay keeps labels when an edit has none. No write-side changes are needed. - Other 39000 type reads (
discovery.ts,store.ts,buzz-mcp/tools.ts) use the first-matchtag()helper and already handle labels. The only other single-tcheck is the kind:30078 recipe decode innative.ts, which doesn't involve labels. I found no 39000tparsing on the Rust side. - The strictness on a malformed first
ttag is unchanged, and the new tests cover the labeled cases plus that rejection.
Validation: read the diff and the relay PR, and traced the callers. CI is green at this head. I didn't run the tests locally. One dependency to note: this assumes #8175 lands with the tag order it has now.
wesbillman
approved these changes
Oct 13, 2026
wpfleger96
pushed a commit
that referenced
this pull request
Oct 13, 2026
…nsole * origin/main: (115 commits) test(navigation): isolate the keyboard retry session gate (#981) fix(codex): log failed idle terminal clean instead of swallowing it (#878) feat(agents2): set the clicked conversation's session apart in agent tabs (#846) fix(channels): read the channel type from the first t tag (#958) feat(shell): allow sidebar collapse on all pages (#845) fix(mentions): select an exact member name on Space without waiting for the directory (#935) test(agents): complete local activity test binding (#980) Improve composer attachment previews and eager uploads (#948) fix(inbox): restore message editing in conversation details (#815) fix(codex): queue a differing model/effort pick as a fresh turn instead of steering (#889) fix(channels): focus a moved thread tab in the same task as its placement (#934) fix(messages): neutral thread placeholder when the viewer wrote the root (#930) test(workflows): set the condition value in one change event (#892) fix(agents2): reconnect Retry to native agent-list reload (#921) fix(github): stop claiming PR links the pane cannot show (#920) Keep Messages selected across its sidebar destinations (#848) perf(messages): stop the floating action bar's per-frame rAF loop while a row stays revealed (#938) test(inbox): wait for the exact-target reveal before resizing the detail (#888) perf(panels): measure the resize handle only when its width can change (#937) perf(channels): memoize channel labels and identity name scopes (#939) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
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
The relay is adding channel labels: short tags such as
workspacethat group channels and let a client find a channel (block/buzz#8175). On a labeled channel, buzz-app could not archive, delete or leave the channel, edit its details, or change member roles. Each of these failed with "Malformed channel t state".This PR fixes that before any channel gets labels. Channels without labels behave as before.
Details
ttag on the channel's metadata event, and each label as anotherttag after it. buzz-app read the type with a check that allowed only onettag.channelTypeTaghelper reads the type from the firstttag. Channel lifecycle settings (which channel details also use) and member administration now call it. The firstttag must still be a[name, value]pair.ttags, and the relay keeps a channel's labels when an edit has none.Testing
main.