Skip to content

fix: show workflows from all member channels in Desktop overview - #5339

Open
joaoh82 wants to merge 1 commit into
block:mainfrom
joaoh82:agent/fix-workflows-multi-h
Open

fix: show workflows from all member channels in Desktop overview#5339
joaoh82 wants to merge 1 commit into
block:mainfrom
joaoh82:agent/fix-workflows-multi-h

Conversation

@joaoh82

@joaoh82 joaoh82 commented Aug 8, 2026

Copy link
Copy Markdown

Summary

The Desktop Workflows tab only showed workflows from one channel (often the DM-scoped card) and omitted others such as Engineering's Marvin Ticket Dispatcher, even though single-channel queries returned them.

Root cause: Desktop batched all member-channel UUIDs into one multi-value #h filter. On the HTTP /query path, extract_channel_id_from_filter collapsed multi-#h to the first iterated UUID and SQL-scoped to that single channel, dropping every other channel's kind:30620 events.

Changes

  1. Relay (extract_channel_id_from_filter): only push SQL channel_id for exactly one #h value. Multi-value #h is NIP-01 OR and leaves channel scope open for accessible-channel filtering + post-match (aligned with the WS REQ path).
  2. Desktop/Tauri (get_channels_workflows): issue N single-#h filters in one round-trip instead of one multi-#h filter, so the overview works even against unfixed production relays.

Test plan

  • cargo test -p buzz-relay extract_channel_id_from_filter --lib (3 new + existing extract tests)
  • cargo clippy -p buzz-relay --lib --tests -- -D warnings
  • Desktop unit tests for channels_workflows_filters (added; full buzz-desktop lib build needs local cmake/opus toolchain)
  • After merge/deploy: Workflows tab lists Engineering + DM workflows; Refresh still shows both
  • Single-channel CLI buzz workflows list --channel <eng> unchanged

Notes

Separate from #5048 (ACP workflow agent wake). This only restores discovery in the Workflows overview.

The Workflows tab batched every member channel into one multi-value #h
filter. The relay's extract_channel_id_from_filter collapsed multi-#h to
the first iterated UUID and SQL-scoped to that single channel, so cards
outside that channel (e.g. Engineering's Marvin Ticket Dispatcher) never
appeared.

- Relay: only push channel_id for single-#h filters; multi-#h stays open
  for accessible-channel scope + NIP-01 OR post-filter.
- Desktop: issue N single-#h filters (one round-trip, NIP-01 OR) so the
  overview works even against unfixed relays.

Co-authored-by: Joao Henrique Machado Silva <joaoh82@gmail.com>
Signed-off-by: Joao Henrique Machado Silva <joaoh82@gmail.com>
@joaoh82
joaoh82 requested a review from a team as a code owner August 8, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant