Files
galaxy/test/integration
mvdbeek 44106890ba Push SSE history updates to non-owner viewers
Owner dispatch only delivers history_update events to the user who owns
the changed history. Watching a shared or pinned non-owned history
(e.g. via the multi-history view) silently received nothing under SSE
because the dispatch path keys on history ownership and there was no
way for a viewer to opt in.

Add an additive viewer-subscription channel: the client POSTs the
history ids it wants pushes for to /api/events/history-subscriptions,
the dispatcher fans the record out to every webapp worker over Kombu,
and history_update fanout pushes to subscribed viewers in addition to
the owner. Subscriptions are refcounted on the client and replayed on
every EventSource onopen so reconnects don't drop them. Per-worker
subscription state is purged when a user's last connection on that
worker closes; the client's onopen replay re-asserts the desired set.

No authorization check on the dispatch path: SSE events only carry
history ids, the client follows up with a normal access-controlled
REST fetch, and leaking "history changed at T" pings is acceptable.

MultipleViewItem now subscribes whenever it renders a history the
current user does not own and SSE is enabled; owned histories continue
through owner dispatch with zero subscribe round-trip.

Tests: integration test exercising subscribe -> mutate -> receive ->
unsubscribe -> stop receiving end-to-end, plus vitest for the client
refcount and replay logic.
2026-05-01 15:35:48 +02:00
..
2026-02-17 09:43:37 +11:00
2021-03-25 14:01:17 +01:00
2026-01-20 10:25:45 +00:00
2025-02-25 19:20:46 +00:00
2025-07-31 11:17:22 +01:00
2022-11-28 04:50:00 +00:00
2025-03-26 18:07:57 +01:00
2025-09-23 22:16:20 +02:00
2024-09-19 09:39:08 +02:00
2025-02-16 18:07:51 +00:00
2026-04-14 16:37:27 +10:00