fix(desktop,relay): restore multi-channel workflows list - #4446
Open
Trevongit wants to merge 1 commit into
Open
Conversation
Desktop Workflows showed "No workflows yet" after successful saves because get_channels_workflows packed all member channel ids into one multi-value #h filter. The relay SQL path collapsed multi-#h to a single channel_id, so the query often returned only an empty channel while per-channel CLI list still worked. Issue one single-#h filter per channel in one POST /query (NIP-01 OR), stop collapsing multi-#h in extract_channel_id_from_filter, and avoid flashing the empty state while membership is still loading. Signed-off-by: Trevor P <trev2005@gmail.com>
Trevongit
force-pushed
the
fix/desktop-workflows-list-multi-h
branch
from
August 3, 2026 03:06
4f90df7 to
57b2076
Compare
|
Independent production reproduction and validation:
GitHub currently reports the PR mergeable; required review is the remaining repository gate. |
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
Desktop Workflows showed No workflows yet after successful saves even when CLI
buzz workflows list --channel <uuid>returned rows.Root cause:
get_channels_workflowspacked all member channel IDs into one multi-value#hfilter. Relayextract_channel_id_from_filtercollapsed multi-#hto the lexicographically first channel UUID and pushed that as SQLchannel_id, so the query often returned only an empty channel (e.g.#general).Fix (defense in depth):
#hfilter per channel in a singlePOST /query(NIP-01 OR; each filter is SQL-pushable).#hreturnsNonefrom the singular extractor (same as bridge/count siblings), so multi-#hwidens correctly instead of pinning one channel.Live Groundfeed repro before this change:
#h: [welcome]→ workflows present#h: [welcome, skills, general]→ 0#hfilters OR → full setRelated work on block/buzz
Others hit the same bug; these open PRs address the relay half (not merged as of this PR):
#hPOST /queryreturns events from only one channel when a filter has multiple#hvalues #4381This PR is complementary: it keeps the Desktop list correct even against unfixed relays, and still hardens the relay path.
Test plan
cargo test -p buzz-relay multi_h_filter_does_not_collapse/single_h_filter_extractspasscargo test --manifest-path desktop/src-tauri/Cargo.toml workflows(11 unit tests) pass