Repository navigation
feat(gallery): refresh when other clients complete generations - #9876
Merged
Merged
Conversation
Completed queue items owned by the signed-in user and enqueued outside the web UI now refresh the gallery and board counts. Move the session user id helper into identity so app runtimes share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 7 tasks
joshistoast
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An external program (e.g. a chatbot or script) that authenticates over REST and enqueues a generation with
POST /api/v1/queue/default/enqueue_batchproduced images that never appeared in an open web UI tab until reload: the gallery only refreshed on uploads, reconnects, and items the tab itself tracked.Now the gallery runtime also listens for
queue_item_status_changedand runs its existing coalesced/throttled invalidation (item lists, totals, boards and board counts) when an item completes that:webv2:), whose results the queue runtime already routes in the enqueuing tab.No auto-selection; that is a separate follow-up. The App composition injects the user and origin checks, so Gallery does not depend on Queue's origin format.
getSessionUserIdmoved from the recall runtime into Identity so both App runtimes share it.Related Issues / Discussions
None.
QA Instructions
pnpm check:release(ininvokeai/frontend/webv2): passes. Run on Node 24.18.0 (.nvmrcpins 22.14.0).ConceptRow.browser.test.tsx("keeps a drag local to its row…") is flaky independent of this change: it also fails intermittently on unmodifiedmain.POST /api/v1/auth/login) and enqueue a graph with a singleblank_imagenode (is_intermediate: false, optionalboard: {board_id}) andorigin: "external:test". The image appears in the gallery and the board count updates without reload, both with and without a board. It is not auto-selected.Review
Resolved: Gallery no longer imports Queue's event type or origin classifier (injected from App instead); comments state the limitation precisely; a test covers reading the session user per event; a new leaf module that entered the editor's initial source-owner graph was folded into Identity's session module.
Known limitation: items enqueued by the same user's other web UI tab or device still refresh only the enqueuing tab (unchanged behavior). Covering them here would double-refresh the enqueuing tab.
Checklist
What's Newcopy (if doing a release after this PR)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.