[BUG]Workflow is created and runs, but is missing from the Workflows list on a self-hosted relay
Summary
A webhook workflow can be created successfully on a self-hosted Buzz relay and runs correctly, but Buzz Desktop continues to show an empty Workflows page (No workflows yet).
Environment
- Buzz Desktop: v0.4.22
- Relay: self-hosted Docker deployment
- Relay URL: custom
wss://…domain behind Cloudflare Tunnel - Channel: a newly created channel
Steps to reproduce
- Connect Buzz Desktop to a self-hosted relay.
- Create a channel.
- Open Workflows and create a workflow for that channel:
- Trigger:
webhook - Action:
send_message - Channel override: the channel’s UUID
- Trigger:
- Save the workflow.
Actual behavior
- The create flow succeeds and shows a webhook URL plus
X-Webhook-Secret. - Calling the webhook successfully posts messages into the selected channel.
- Refreshing the Workflows page and fully restarting Buzz Desktop still shows
No workflows yet.
Expected behavior
The newly created workflow should appear in the Workflows list and be available to view or edit.
Additional evidence
The relay confirms that the workflow exists and is enabled:
- A workflow database record exists with the expected channel ID.
- A signed kind
30620workflow-definition event exists with the expecteddandhtags. - The webhook executes successfully and posts its
send_messageaction to the channel.
This appears to be a Desktop workflow-list/read issue rather than workflow creation or execution failing.
Impact
The workflow is operational, but it cannot be managed through Buzz Desktop after creation.
Root cause confirmed on current main
This is reproducible on hosted relays too, so it is not specific to self-hosting, webhooks, or Cloudflare Tunnel. The workflow exists and can be returned by a channel-scoped CLI query, while Desktop shows No workflows yet.
The failure is in Desktop's batched multi-channel workflow query:
-
WorkflowsViewcollects all member channel IDs, sorts them, and callsgetChannelsWorkflows(channelIds)(desktop/src/features/workflows/ui/WorkflowsView.tsx:79-103). -
The Tauri command sends one Nostr filter with every ID in a multi-value
#htag (desktop/src-tauri/src/commands/workflows.rs:69-97):{"kinds":[30620],"#h":["channel-a","channel-b","..."]} -
Relay query conversion does not preserve multi-value
#h.extract_channel_id_from_filterreturns the first parseable UUID, andbuild_event_query_from_filterturns that into onechannel_idSQL predicate (crates/buzz-relay/src/handlers/req.rs:737-745,841-853). -
The HTTP bridge executes that narrowed DB query before applying the full NIP-01 filter (
crates/buzz-relay/src/api/bridge.rs:1203-1283). Rows from every other requested channel are therefore never candidates for post-filtering.
Because Desktop sorts the IDs first, the Workflows page effectively lists workflows only from the lexicographically first member channel. If that channel has no workflows, the page incorrectly displays No workflows yet, even when workflows exist in other member channels.
Regression
The batched query was introduced in commit 2cc0eb53968ec6281be0e6778a06ea18e044395e / PR #1641, replacing the prior Promise.all of one get_channel_workflows query per member channel. The implementation comment says a multi-value Nostr #h filter matches any listed channel, which is correct at the protocol level, but the relay's SQL pushdown currently narrows it to one channel.
Independent production evidence
For channel fc76446d-6c74-4401-bad3-f7fc44471914, a per-channel query returns workflow d7719de3-7ad9-4d86-8e0c-297534640746, while the Desktop Workflows page is empty:
buzz workflows list --channel fc76446d-6c74-4401-bad3-f7fc44471914
[{
"workflow_id": "d7719de3-7ad9-4d86-8e0c-297534640746",
"pubkey": "9cc2b8b0ed055892ccb72fbbfddd22dc504ebd70fb5490e20f3934df86c0cdda"
}]
This is separate from #1593 / PR #2242: those cover workflow deletion and orphan reconciliation, not workflow listing.
Suggested fixes
Immediate, low-risk Desktop fix
Restore one query per channel (the pre-#1641 behavior), or send one filter object per channel in a single /query request. Either avoids the broken multi-value #h pushdown while preserving complete results.
Relay fix
Represent multiple #h values as a channel_ids predicate rather than selecting the first UUID. Add regression coverage proving that a filter with workflows in channels A and B returns both, including the case where A has no workflow and B does.
Likely the same root cause as #2385 — the desktop Workflows overview batches all member channels into one multi-value #h filter, which the relay collapses to a single channel (lexicographically-first UUID), so every other channel's kind:30620 definitions are dropped from the list even though the workflows themselves run fine. Fix pending in #2452; once merged this list should populate.
Desktop workaround in https://github.com/block/buzz/pull/2503 — one #h filter per channel (complements #2452).
Confirming this on a Block-hosted community (communities.buzz.xyz) — not just self-hosted relays.
Environment: Buzz Desktop on macOS (latest as of 2026-07-23), community on Block-hosted relay, workflows created via CLI (buzz workflows create).
Repro / evidence:
- Six workflows created via CLI across five channels.
buzz workflows list --channel <uuid>returns all of them, correct YAML content, per channel. - The workflow executor honors them: schedule-triggered runs post real messages into the bound channels (message events carry a
buzz:workflowtag and are authored by the executor identity, not the creating user). - Desktop Workflows tab shows "No workflows yet" — after the refresh button AND a full quit/relaunch of the app.
So: relay has them, executor fires them, Desktop list is blind to them. Possibly the same root cause as #2385 (multi-value #h filter collapsing → overview query returns empty) — our six are spread across five channels, which fits that failure shape.
Happy to provide channel/workflow IDs privately if useful.
Still present in Desktop v0.5.2 (2026-07-30) on a Block-hosted community (communities.buzz.xyz). Two CLI-created workflows in one channel: buzz workflows list --channel <uuid> returns both and scheduled runs fire correctly, but the Desktop Workflows page shows "No workflows yet" after a refresh and a full quit/relaunch. Consistent with the multi-value #h collapse in #2385 — the workflows live in a single channel while the account belongs to several, so the batched overview query would only surface the alphabetically-first member channel.
Native Desktop creation path also reproduces this on v0.5.2
Additional evidence that this is not specific to workflows created through the CLI/MCP.
Environment
- Buzz Desktop v0.5.2 on macOS
- Official Desktop bundle (
xyz.block.buzz.app) - Hosted Buzz community
- Workflow created entirely through the visible Desktop UI; no CLI, MCP, scripts, or direct relay calls were used for creation
Reproduction
- Opened Workflows. The overview already displayed “No workflows yet.”
- Clicked Create Workflow and selected a normal stream channel.
- Created a harmless workflow with
enabled: false, amessage_postedtrigger, and onesend_messagestep. - Clicked Create. The modal closed without an error, but Desktop showed no success toast or workflow ID.
- The overview still displayed “No workflows yet” after:
- using the refresh control;
- fully quitting Desktop; and
- relaunching Desktop.
- After the UI-only test was complete, a read-only, single-channel CLI query confirmed that the definition had persisted successfully:
- a new workflow UUID existed;
- the event was signed by the same human identity used by Desktop;
- the YAML still contained
enabled: false.
- The same channel also contained a CLI-created disabled probe. Desktop omitted both the UI-created and CLI-created definitions.
This eliminates creation provenance and workflow ownership as explanations. The native Desktop create path writes a valid kind 30620 definition, but the overview cannot read it back.
A local v0.5.2 Desktop build using the workaround from #2503 (one #h filter object per channel in the same /query request) successfully populated the Workflows overview with the existing relay definitions. The unmodified official v0.5.2 build remained empty.
Impact
Desktop can silently create a workflow while providing no way to discover or manage it afterward. Repeating the create flow because the result appears missing can produce duplicate automations. This is consistent with #2385 and provides an end-to-end confirmation of the Desktop workaround in #2503.