feat(webv2): find conditioning media in the gallery from its thumbnail - #255
Open
lstein wants to merge 3 commits into
Open
feat(webv2): find conditioning media in the gallery from its thumbnail#255lstein wants to merge 3 commits into
lstein wants to merge 3 commits into
Conversation
Adds a hover/focus badge to the Generate panel's reference images and to the Video panel's keyframe slots, initial video, and Ref2VA references. Pressing it raises the Gallery and Preview and lands the grid on that item's board, page, and cell. Extracts the image map's reveal into workbench/image-actions/revealGalleryItem, now shared and fenced to the ordering and project of the press rather than of whenever its deferred chunk lands.
lstein
requested review from
JPPhoto,
Pfannkuchensack and
blessedcoolant
as code owners
September 14, 2026 02:08
…badges # Conflicts: # invokeai/frontend/webv2/performance/architecture-baseline.json # invokeai/frontend/webv2/performance/browser-baseline.json
The find gesture puts `useFindGalleryItem` in the editor's initial graph and `FindInGalleryButton` in its script set, both pinned exactly. Byte growth (+1102 owned, +2788 browser script) stays inside the derived allowance and is recorded, not excused.
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
Conditioning media picked long ago had no way back to its gallery record: the panels show a thumbnail and a filename, and finding that item in the grid meant searching for it by hand.
Each thumbnail now carries a "find in gallery" badge, revealed on hover or focus. Pressing it brings the Gallery and Preview on screen and lands the grid on that item's board, page, and cell. The new badge is located to the left of the preexisting crop and dimensions badges:
The same treatment is given to the reference images and videos used for conditioning videos, except that the find-in-gallery badge is the only icon.
QA Instructions
Driven in Chromium against the mock backend (
scripts/mock-backend.mjson :4179) withvite devon :5199. The Video panel needs a video main model, which the fixtures do not ship, so three were patched in locally for the screenshots and reverted —scripts/mock-backend-fixtures.mjsis untouched here.Verified by hand:
centeroff the manifest and the reducer adopted the grid there without vacating the right panel, leaving one instance in two regions.Checks, all from
invokeai/frontend/webv2:pnpm lint— passpnpm test:all— 8044 unit, 1381 browser, 27 fixture tests passpnpm test:performance:architecture— passpnpm test:project-files:browser— passpnpm test:accessibility— fails ontopbar-menu-journey(getByRole('button', { name: /^Invoke from/ })times out). Confirmed identical on a cleanmainbuild, so pre-existing and unrelated to this change.Performance: editor owned JavaScript grows 1,102 bytes for one new initial module (
useFindGalleryItem.ts), with no change to initial request counts; launchpad is unchanged. The reveal is fetched on the press — importing it eagerly pulled the gallery item/transfer barrel into the editor's initial graph and cost two more initial script requests.Both performance baselines are re-recorded. Note the browser baseline also absorbs pre-existing drift: measured on a clean
maincheckout, editor routes already sat ~35KB above their recorded script-byte baseline, inside tolerance; this change adds ~2.3KB, which is what tips it over. Theeditor-canvasactivated-asset limit likewise moves for a reason predating this branch — a cleanmainmeasures the same value.Review
Three independent read-only reviews (correctness/spec, architecture/operational safety/performance, test value/product quality including accessibility), then a blocker-only adversarial pass against the resulting candidate, then a second adversarial pass scoped to the logic the first one had caused to change.
Material findings resolved:
openWorkbenchWidget('gallery')resolved tocenterfrom the manifest; the reducer then adopted the existing instance without vacating its region. Now the gesture raises the grid where it already lives.gallery.findImagedefeatedReferenceImageCard's memo on every gallery selection change.className="group"fails them.The final adversarial pass reported no blockers.
Checklist
What's Newcopy (if doing a release after this PR)