-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Queue tab not updating for other users in real-time #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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>
Thanks for the log! I can see that the backend is correctly:
My frontend changes add
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. |
|
@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>
Fixed in commit a47e27f. Added privacy check in QueueItemComponent that:
Non-admin users will now see the suppression message instead of actual batch field values for queue items they don't own. |
|
@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. |
|
@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 |
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>
Reset to correct backend code and cleaned up commits in 6b02896. The changes now only include the necessary cache invalidation improvements:
Removed client-side privacy checks since the backend PR (6ae8a74) already handles field values filtering server-side. All linters pass. |
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
getQueueItemIdsquery usesSessionQueueItemIdListcache 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_valuesfor non-owners/non-admins before sending queue items to clients.Changes:
setEventListeners.tsx): AddedSessionQueueItemIdListinvalidation toqueue_item_status_changed,batch_enqueued,queue_cleared, andqueue_items_retriedhandlersqueue.ts): Added missingSessionQueueStatus,BatchStatus, andSessionQueueItemIdListtags toretryItemsByIdmutation for consistencyExample of the cache invalidation pattern applied:
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
Merge Plan
No special merge considerations. Frontend-only changes with no database migrations.
Checklist
What's Newcopy (if doing a release after this PR)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.