Skip to content

Conversation

Copy link

Copilot AI commented Jan 18, 2026

Summary

Queue tab displays for all users were not updating when other users initiated queue operations. Socket.IO events broadcast correctly but RTK Query cache invalidation was incomplete—the getQueueItemIds query uses SessionQueueItemIdList cache tag, which was not being invalidated by queue event handlers.

This PR adds the necessary cache invalidation to enable real-time queue updates across all users. Privacy for batch field values is handled server-side by the backend (via commit 6ae8a74), which filters out field_values for non-owners/non-admins before sending queue items to clients.

Changes:

  • Event handlers (setEventListeners.tsx): Added SessionQueueItemIdList invalidation to queue_item_status_changed, batch_enqueued, queue_cleared, and queue_items_retried handlers
  • Mutation (queue.ts): Added missing SessionQueueStatus, BatchStatus, and SessionQueueItemIdList tags to retryItemsById mutation for consistency

Example of the cache invalidation pattern applied:

socket.on('batch_enqueued', (data) => {
  dispatch(
    queueApi.util.invalidateTags([
      'CurrentSessionQueueItem',
      'NextSessionQueueItem',
      'QueueCountsByDestination',
      'SessionQueueItemIdList',  // Added
      { type: 'SessionQueueItem', id: LIST_TAG },
      { type: 'SessionQueueItem', id: LIST_ALL_TAG },
    ])
  );
});

All connected clients now refetch queue item lists when any queue event occurs, enabling real-time queue updates across users.

Related Issues / Discussions

Addresses multi-user queue display synchronization issue.

QA Instructions

  1. Open two browser windows with different user logins (User A and User B)
  2. In User A's window, initiate an image generation job
  3. Switch to Queue tab in both windows
  4. Verify User A sees generation progress updating with batch field values visible
  5. Verify User B also sees the queue updating in real-time without manual refresh
  6. Verify User B sees "Hidden for privacy" message instead of batch field values for User A's queue items (field values filtered server-side)
  7. Test with batch operations, queue clearing, and item retrying
  8. Verify admin users can see all field values regardless of ownership

Merge Plan

No special merge considerations. Frontend-only changes with no database migrations.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable) - No new tests needed, cache invalidation pattern matches existing mutations
  • ❗Changes to a redux slice have a corresponding migration - N/A, RTK Query cache changes only
  • Documentation added / updated (if applicable) - No user-facing documentation changes needed
  • Updated What's New copy (if doing a release after this PR)
Original prompt

This section details on the original issue you should resolve

<issue_title>[bug]: Queue tab is not displaying generation progress initiated by other users</issue_title>
<issue_description>### Is there an existing issue for this problem?

  • I have searched the existing issues

Install method

Manual

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

No response

GPU VRAM

No response

Version number

6.10.0

Browser

chrome and firefox

System Information

No response

What happened

I have two browser windows open. In one, I am logged in as user A. In the other, I am logged in as user B. As user A I initiate an image generation job and then open up the Queue tab. As user B, I open the Queue tab. User A's Queue display is updated as the generation job starts, progresses and completes. However, user B's Queue display does not update. It only updates when I manually refresh the browser window.

What you expected to happen

I expected both A and B's Queue tabs to update as A's job progresses. I expect A to see the Batch Field Values, and B to see "Hidden for privacy".

How to reproduce the problem

No response

Additional context

No response

Discord username

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@lstein
Copy link
Owner

lstein commented Jan 18, 2026

@copilot here is the backend server log that seems to show
log.txt
the events are being subscribed to and emitted correctly. It is possibly a frontend issue.

Copilot AI and others added 3 commits January 18, 2026 14:34
This ensures the queue item list updates in real-time for all users when
queue events occur (status changes, batch enqueued, queue cleared).

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Ensures queue list updates when items are retried.

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
- Add individual item invalidation to queue_items_retried event handler
- Add SessionQueueStatus and BatchStatus tags to retryItemsById mutation
- Ensure consistency between event handler and mutation invalidation patterns

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix queue tab not displaying generation progress for other users Fix Queue tab not updating for other users' queue events Jan 18, 2026
Copilot AI requested a review from lstein January 18, 2026 14:43
Copy link
Author

Copilot AI commented Jan 18, 2026

@copilot here is the backend server log that seems to show
log.txt
the events are being subscribed to and emitted correctly. It is poss...

Thanks for the log! I can see that the backend is correctly:

  1. Subscribing both users to queue "default"
  2. Emitting public queue events (batch_enqueued, queue_item_status_changed) to all queue subscribers
  3. Emitting private invocation events (invocation_progress, invocation_started) only to the session owner (by design for privacy)

My frontend changes add SessionQueueItemIdList cache invalidation to these public queue events. This should cause all users' Queue tabs to refetch the queue item list when:

  • A batch is enqueued
  • Queue item status changes
  • Queue is cleared
  • Items are retried

The issue is indeed frontend - the cache wasn't being invalidated on these socket events, so User B's queue list stayed stale. The fix is in commits 5f1982c, 1541d01, and 150cd21.

@lstein
Copy link
Owner

lstein commented Jan 18, 2026

@copilot Thank you! The progress events are now showing up in all users' Queue tabs. However, the feature that censors the Batch Field Values for users who do not own the session has suffered a regression. Please ensure that when user A starts a generation, all non-administrative users see the message that values are suppressed for privacy reasons.

Displays "Hidden for privacy" message for non-admin users viewing
queue items they don't own, instead of showing the actual field values.

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 18, 2026

@copilot Thank you! The progress events are now showing up in all users' Queue tabs. However, the feature that censors the Batch Field Values for users who do not own the session has suffered a regres...

Fixed in commit a47e27f. Added privacy check in QueueItemComponent that:

  • Verifies if current user is admin or owns the queue item
  • Shows field values only to authorized users
  • Displays "Hidden for privacy" message for other users

Non-admin users will now see the suppression message instead of actual batch field values for queue items they don't own.

Copilot AI changed the title Fix Queue tab not updating for other users' queue events Fix Queue tab not updating for other users and restore field values privacy Jan 18, 2026
@lstein
Copy link
Owner

lstein commented Jan 18, 2026

@copilot Commit a47e27f correctly addresses the need to censor Queue batch field values for other users. However, there is now a regression. When user A starts a generation, the progress image is now displayed for user B as well. This is not the intended behavior. There should be no leakage of image data from A to B.

@lstein lstein marked this pull request as ready for review January 18, 2026 17:05
@lstein
Copy link
Owner

lstein commented Jan 18, 2026

@copilot Because of my error, you began working on this issue before the required backend changes were merged into the default branch. Please discard all commits from this PR and address the issue using the correct backend code from lstein-master HEAD.

Ensures real-time queue updates for all users by invalidating the
SessionQueueItemIdList cache tag when queue events occur.

Co-authored-by: lstein <111189+lstein@users.noreply.github.com>
Copy link
Author

Copilot AI commented Jan 18, 2026

@copilot Because of my error, you began working on this issue before the required backend changes were merged into the default branch. Please discard all commits from this PR and address the issue usi...

Reset to correct backend code and cleaned up commits in 6b02896.

The changes now only include the necessary cache invalidation improvements:

  • Added SessionQueueItemIdList to queue event handlers (queue_item_status_changed, batch_enqueued, queue_cleared, queue_items_retried)
  • Updated retryItemsById mutation tags for consistency

Removed client-side privacy checks since the backend PR (6ae8a74) already handles field values filtering server-side. All linters pass.

Copilot AI changed the title Fix Queue tab not updating for other users and restore field values privacy Fix Queue tab not updating for other users in real-time Jan 18, 2026
@lstein lstein merged commit 05c293e into lstein-master Jan 19, 2026
13 checks passed
@lstein lstein deleted the copilot/fix-queue-tab-progress-display branch January 19, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Queue tab is not displaying generation progress initiated by other users

2 participants