From 367ee26f9aee5f8456f0cda95f59a1838849fd86 Mon Sep 17 00:00:00 2001 From: Jeffrey C <990135+JeffreyBytes@users.noreply.github.com> Date: Mon, 12 Jan 2026 17:00:04 -0600 Subject: [PATCH] Fix unassigned filter not updating after adding streams to channels When a stream was added to a channel (via "Add to Channel" button, "Create New Channel", or bulk "Add Streams to Channel"), the StreamsTable data wasn't being refetched. This caused streams to remain visible even when the "Only Unassociated" filter was active, despite no longer being unassociated. Fixed by calling fetchData() after channel updates in: - StreamRowActions.addStreamToChannel (single stream to channel) - addStreamsToChannel (bulk add to channel) - executeSingleChannelCreation (create new channel from stream) Now streams immediately disappear from the filtered view when associated with a channel. --- frontend/src/components/tables/StreamsTable.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/components/tables/StreamsTable.jsx b/frontend/src/components/tables/StreamsTable.jsx index 25b7e330..8be3bb6d 100644 --- a/frontend/src/components/tables/StreamsTable.jsx +++ b/frontend/src/components/tables/StreamsTable.jsx @@ -70,6 +70,7 @@ const StreamRowActions = ({ handleWatchStream, selectedChannelIds, createChannelFromStream, + fetchData, }) => { const [tableSize, _] = useLocalStorage('table-size', 'default'); const channelSelectionStreams = useChannelsTableStore( @@ -87,6 +88,7 @@ const StreamRowActions = ({ ], }); await API.requeryChannels(); + await fetchData(); }; const onEdit = useCallback(() => { @@ -545,6 +547,10 @@ const StreamsTable = ({ onReady }) => { // Clear selection since the task has started setSelectedStreamIds([]); + + // Note: This is a background task, so fetchData may not show updated data immediately + // The actual update will occur when the WebSocket event fires on task completion + await fetchData(); } catch (error) { console.error('Error starting bulk channel creation:', error); // Error notifications will be handled by WebSocket @@ -714,6 +720,7 @@ const StreamsTable = ({ onReady }) => { await API.requeryChannels(); const fetchLogos = useChannelsStore.getState().fetchLogos; fetchLogos(); + await fetchData(); }; // Handle confirming the single channel numbering modal @@ -756,6 +763,7 @@ const StreamsTable = ({ onReady }) => { ], }); await API.requeryChannels(); + await fetchData(); }; const onRowSelectionChange = (updatedIds) => { @@ -916,6 +924,7 @@ const StreamsTable = ({ onReady }) => { handleWatchStream={handleWatchStream} selectedChannelIds={selectedChannelIds} createChannelFromStream={createChannelFromStream} + fetchData={fetchData} /> ); } @@ -927,6 +936,7 @@ const StreamsTable = ({ onReady }) => { editStream, deleteStream, handleWatchStream, + fetchData, ] );