Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
chore: stop tracking agent planning artifacts
joshistoast311115f00bfd
diff --git a/.gitignore b/.gitignoreindex cbb63f66c3..400421200b 100644--- a/.gitignore+++ b/.gitignore@@ -197,6 +197,7 @@ installer/InvokeAI-Installer/.aider*.claude/+.superpowers/# Weblate configuration fileweblate.inidiff --git a/.superpowers/sdd/mixed-media-gallery-parity/final-review-fix-report.md b/.superpowers/sdd/mixed-media-gallery-parity/final-review-fix-report.mddeleted file mode 100644index 0914e37496..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/final-review-fix-report.md+++ /dev/null@@ -1,103 +0,0 @@-# Mixed-media gallery parity: final review fix report--Base reviewed: `0b7acabad952597073a2ea1b3298e8848351aba3`--## Findings resolved--### Upload completion uses the latest gallery context--- `GalleryWidgetView` now exposes a render-assigned, stable live-read port for- the current board and Images/Assets view. No `useEffect` was added.-- An upload still captures its transport target and target-board name when it- starts.-- After all image/video requests settle and the account scope is revalidated,- selection visibility is evaluated against the latest board and view.-- Switching either board or view while an upload is pending no longer selects- media that is invisible in the new context.-- Existing concurrent image uploads, sequential video uploads, settled- outcomes, newest-item comparator, one invalidation, and one summary- notification are preserved.--Strict TDD evidence:--- RED: the deferred view-switch browser test received one `selectItem` call for- `photo.png` when it expected none.-- GREEN: the deferred board-switch and view-switch cases both pass, including- assertions that transport still targets the launch board and completion- emits one invalidation and one summary.--### Persisted selection-key compatibility is centralized--- Added `getPersistedSelectedGalleryItemKeys()` to Gallery core and exported it- through the existing Gallery contract.-- The reader preserves the established precedence:- `selectedImageNames` → `selectedImageName` → canonical/legacy- `selectedImage`.-- Bare image names and qualified mixed-media keys are canonicalized through the- existing parser.-- Both `galleryStateView` and `workbenchState` now use the shared reader.--Strict TDD evidence:--- RED: all three new cases received `undefined` before the shared reader- existed.-- GREEN: qualified/bare arrays, legacy singular selection, and canonical- selected-video fallback pass.--### Unused temporary adapters are removed--- Removed only `patchImages`, `removeImages`, `setMultiSelection`, and- `toggleImageSelection`.-- Removed matching `GalleryCommandsPort` members and test scaffolding.-- Retained the still-used image-only `selectImage` and `setCompareImage`- compatibility seams.--Strict TDD evidence:--- Removing `setMultiSelection` from the adapter fixture first produced- `TS2741`: the property was still required by `GalleryCommandsPort`; removing- the port/store adapter restored the typecheck.-- The same RED/GREEN cycle was repeated for `toggleImageSelection`.-- Repository production search confirms none of the four adapter definitions- remain.--## Verification--- Focused core/state tests: 3 files, 193 tests passed.-- Focused Gallery browser tests: 2 files, 28 tests passed.-- `pnpm lint`: passed, including 34 architecture tests.-- `pnpm test:all`: passed:- - 376 unit files / 5,008 tests- - 70 browser files / 360 tests- - 10 mock-fixture tests-- `pnpm test:performance:architecture`: passed without updating baselines.-- `pnpm check:release`: passed end-to-end on the final rerun, including all- nine accessibility journeys.--The first `check:release` attempt reached its final accessibility command and-reported a canvas-only `Raster Layers (64)` contrast violation. No source was-changed. An immediate unchanged `pnpm test:accessibility:browser` reproduction-passed all nine journeys, and the complete unchanged `pnpm check:release`-rerun also passed. This was treated as a transient journey-state failure, not-masked or baseline-recorded.--## Independent review--An independent read-only review of-`0b7acabad952597073a2ea1b3298e8848351aba3..working tree` returned:--- Standards: 0 Critical, 0 Important, 0 Minor findings.-- Specification: 0 Critical, 0 Important, 0 Minor findings.--The reviewer specifically confirmed the launch/completion upload-context-split, the exact persisted-reader precedence, removal of only the four unused-adapters, retention of `selectImage`/`setCompareImage`, Gallery-core purity,-and dependency direction.--## Invariants--- `GeneratedImageContract` is unchanged.-- No production module or existing file was added/renamed for this fix.-- No `useEffect` was added.-- No new `@platform/ui` barrel importer was added.-- No performance baseline or importer cap was updated.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-10-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-10-report.mddeleted file mode 100644index 5833cff0a4..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-10-report.md+++ /dev/null@@ -1,217 +0,0 @@-# Task 10 Report: Boards, mixed upload, and i18n completion--## Status--Complete.--Board rows now count images and videos together while preserving the separate-asset count, expose a localized image/video breakdown, and mark static video-covers with a decorative Play glyph. Board deletion confirmation and outcome-messages include both media kinds, and the existing image-only archive wording-uses the board's exact video count through localized plural forms.--Gallery upload now classifies PNG, JPEG/JPG, WebP, and MP4 files by MIME first-with the established extension fallback. Images retain concurrent upload-behavior and the user category; videos upload one at a time as durable general-media. Date boards reject before transport, synthetic board IDs never reach-either upload route, partial failures do not stop later files, and one summary-reports the complete settled outcome. The newest successful upload visible in-the active board/view becomes the canonical selection.--The compact gallery status and remaining mixed-media gallery/Preview labels-are catalog-backed. Gallery/video `defaultValue` fallbacks were removed now-that their English keys exist.--## TDD evidence--All frontend commands ran from `invokeai/frontend/webv2`.--### Upload classifier and transports--The first backend RED was:--```sh-pnpm test src/features/gallery/data/backend.test.ts-```--```text-Test Files 1 failed (1)-Tests 19 failed | 40 passed (59)-```--It proved the named classifier and video transport were absent and that the-image upload still leaked the synthetic `all` board ID. After implementation,-the focused file passed all 59 tests.--### Board projection and presentation--Adding `videoCount` to the board-count contract first failed one of 24 state-projection tests. The focused file passed after `getBoardCounts()` returned-all three counts.--The new board browser contract initially failed both cases because the-mixed-total/tooltip surface and exported existing cover seam were absent. It-then passed 2/2 with:--- video-only `5 | 2` rendering;-- tabular numerals;-- localized image/video tooltip content;-- a decorative Play glyph over the static thumbnail;-- no board-list `<video>`.--The board-menu RED failed 2/2 against the image-only confirmation and-hardcoded archive label. It passed 2/2 after image/video/asset confirmation-counts, media-aware deletion wording, and localized omission text landed.--### Settled mixed upload and delete outcomes--The first consolidated action RED was:--```text-Test Files 1 failed (1)-Tests 6 failed | 2 passed (8)-```--Those failures covered authoritative board-delete notifications, date-board-pre-transport rejection, concurrent images plus sequential videos, continuation-after per-file failure, one partial mixed summary, unsupported files, and-newest visible selection. The file passed 8/8 after implementation.--A follow-up account-lifetime regression then failed because the second video-was scheduled after the first request aborted:--```text-Test Files 1 failed (1)-Tests 1 failed | 8 passed (9)-```--The sequential worker now checks the captured account signal before every-video and escalates account abort instead of treating it as a file-local-failure. The file then passed 9/9.--### Status and catalog--The compact status browser test first failed because `GalleryStatusChip` did-not exist; it passed after the component rendered-`widgets.gallery.statusChip`.--The English catalog test first failed on the missing status key. It now-resolves and interpolates status, image/video/asset counts, board omissions-and outcomes, mixed upload/split, playback/retry, frame copy, and video Details-keys. It also exercises plural-safe composed media counts.--## Implementation--### Boards--- `getBoardCounts()` returns image, video, and asset counts.-- Board badges render `(imageCount + videoCount) | assetCount` with tabular- numerals.-- The badge trigger and tooltip share the localized image/video breakdown.-- A video cover remains a static poster and gains only a decorative Play- overlay.-- Delete confirmation shows images, videos, and assets; completed deletion- messages use the backend's authoritative confirmed/failed arrays.--### Upload--- `classifyGalleryUpload()` recognizes only PNG, JPEG/JPG, WebP, and MP4.- Supported MIME wins; otherwise the established filename-extension fallback- handles empty, generic, or misreported MIME.-- Both image and video transports omit `none`, `all`, and date-board IDs.-- Image upload stays `image_category=user`, preserves current concurrency, and- remains strictly `GalleryImage`.-- Video upload is `video_category=general`, `is_intermediate=false`, maps to- `GalleryVideoItem`, and runs sequentially.-- Images and the sequential video lane run independently. Per-file failures- settle, unsupported files contribute to the failed total, and one localized- notification summarizes the batch.-- Account expiry stops the video lane before another expensive request.-- Selection is canonical and restricted to successful media visible in the- captured active board/view.--### i18n--- Replaced the hardcoded compact `Gallery: {total}` chip.-- Added pluralized image/video/asset counts, board archive/deletion outcomes,- mixed upload results/split, and partial item-mutation/download messages.-- Generalized upload/search/drop/window copy from images to gallery items or- media where appropriate.-- Removed gallery/video `defaultValue` fallbacks from mixed item actions and- Preview video labels.--## Full verification--```sh-pnpm lint-```--```text-format: passed-OXC: passed-tsc --noEmit: passed-architecture: 3 files, 34 tests passed-```--```sh-pnpm exec vitest run --config vitest.config.mts --reporter=dot-```--```text-Test Files 376 passed (376)-Tests 5005 passed (5005)-```--```sh-pnpm test:browser-```--The first full run hit the repository's known timing-sensitive-`src/platform/ui/Tabs.browser.test.tsx` timeout. The focused Tabs file passed-1/1, and the required complete rerun passed:--```text-Test Files 69 passed (69)-Tests 345 passed (345)-```--The browser suite retained existing non-failing React `act(...)`,-missing-i18n-instance, and intentional error-boundary diagnostics.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--## Source-policy checks--- `GeneratedImageContract` and `core/types.ts` are unchanged.-- `GalleryImage` and the image upload result remain strict image-only- contracts.-- No production module or existing file rename was added.-- No `useEffect`, migration exception, mock fixture, accessibility exception,- or performance baseline was added.-- The only production `<video>` remains in `PreviewFrame.tsx`.-- No new file imports the `@platform/ui` barrel; the existing board-select- importer only adds `Tooltip`.-- Scoped gallery/Preview/image-action translation calls contain no- `defaultValue` fallback.-- `git diff --check` passed.--## Independent review--The independent read-only review approved the uncommitted Task 10 diff with no-Critical, Important, or Minor findings. It explicitly checked the board-outcomes, classifier fallback rules, image/video concurrency, date/synthetic-board handling, settled summary, visible-newest selection, i18n completion,-tests, and global architecture invariants.--## Task 11 dependencies--Task 11 still owns additive mock-backend videos and media assets/routes,-Range/HEAD fixture behavior, mixed mock ordering/filtering, and the dedicated-video accessibility journey with its narrowly scoped caption-rule exception.-No Task 11 or Task 12 baseline work was included here.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-11-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-11-report.mddeleted file mode 100644index cb3b36ae19..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-11-report.md+++ /dev/null@@ -1,249 +0,0 @@-# Task 11 Report: Additive mock videos and accessibility journey--## Status--Complete, with one pre-existing release-suite blocker recorded for Task 12.--The representative mock backend now provides deterministic mixed image/video-data for the gallery, date boards, board summaries and deletion, uploads,-mutations, Details, posters, and protected full media. The fixture-count-contract remains unchanged, and the default Images performance route still-orders an image first.--The dedicated representative-video accessibility journey passes. It is the-only call site that disables Axe's `video-caption` rule, with the required-generated-media explanation.--## Mock fixture and route coverage--- Added `state.videos` without replacing any of the 1,000 representative- images or adding a video key to profile counts.-- Added owned general, board-cover, same-name collision, control-category,- intermediate, foreign-owner, and prior-day video rows.-- Kept the newest default Images result as an image while retaining a real- static video board cover.-- Added the production-consumed mixed gallery list and names routes, including- backend defaults and starred/created/kind/name ordering in both directions.-- Added board, ownership, category, intermediate, search, inclusive date range,- offset, limit, total, and date-board ref behavior.-- Added video DTO, metadata, workflow/graph, upload, star/unstar/delete, and- single-video board add/remove routes.-- Added dynamic mixed board counts, covers, detach outcomes, and cascade-delete- outcomes.-- Added poster and full-media responses. Full media supports bodyless `HEAD`,- ordinary `200`, satisfiable `206`, and malformed/unsatisfiable `416` with- exact `Accept-Ranges`, `Content-Length`, and `Content-Range` headers.--`getStateCounts`, `MOCK_BACKEND_PROFILE_COUNTS`, and-`performance/architecture-fixtures.json` are unchanged.--## Media assets--The repository had no suitably tiny H.264 fixture in the existing webv2 mock-asset area, so both assets were generated with FFmpeg n8.1.2:--```sh-ffmpeg -hide_banner -loglevel error \- -f lavfi -i "testsrc2=size=64x64:rate=10:duration=1" \- -an -c:v libx264 -preset veryslow -crf 28 -pix_fmt yuv420p \- -profile:v baseline -level 3.0 -movflags +faststart \- -fflags +bitexact -flags:v +bitexact -map_metadata -1 \- -y scripts/mock-assets/fixture-video.mp4--ffmpeg -hide_banner -loglevel error \- -i scripts/mock-assets/fixture-video.mp4 -frames:v 1 \- -c:v libwebp -lossless 1 -map_metadata -1 \- -y scripts/mock-assets/fixture-video.webp-```--Asset evidence:--| Asset | Bytes | SHA-256 |-| --- | ---: | --- |-| `fixture-video.mp4` | 4,766 | `372ad163e36c7b0c104ff50e706554268149b437fdf26086e0af2aea6939f7f6` |-| `fixture-video.webp` | 5,954 | `a1d099ffa75a177a7cdd64335212257654f4a0eaf150c0ef7557064137034d4d` |--`ffprobe` reports a 1.0-second, 64×64, 10 fps H.264 Constrained Baseline-stream with `yuv420p` pixels. `file` recognizes the poster as lossless WebP.--## Accessibility journey--The new `workbench-video-preview-representative` journey:--- opens the Gallery layout and uses the renamed `Gallery items` list;-- keyboard-focuses the representative video cell;-- verifies its Play glyph is decorative;-- activates the cell with Enter without starting DnD;-- verifies the opened mixed Preview's native controls, `playsInline`, poster,- non-draggable video behavior, and localized duration;-- runs Axe after the surface settles.--Only this exact Axe call passes:--```js-{ rules: { 'video-caption': { enabled: false } } }-```--Every existing surface and the keyboard journey retain the critical caption-rule.--## Demonstrated Task 1–10 corrections--Three production mismatches appeared only when the representative video journey-exercised the real production bundle. All three were reported to and authorized by-the controller before correction.--### Stable gallery virtualizer callbacks--`react-hook-tanstack-virtual` shallow-compares its external-store options.-Fresh inline `estimateSize` and `getScrollElement` functions produced a new-snapshot on every render, causing React's cached-snapshot warning and then-error 301 (`Too many re-renders`) once real gallery data arrived. The existing-browser mock hid the identity requirement.--The two callbacks are now memoized with `useCallback`. A focused browser test-first failed on callback identity, then passed, and the production-representative gallery rendered normally.--### Compact Preview contrast--Once the video opened, Axe exposed 3.56:1 contrast for the 10px position,-dimensions/duration, and Details text. A focused browser test first failed-against the `fg.muted` semantic foreground. Those three existing compact text-surfaces now use `fg.muted`; image and video footer cases both pass, and the-focused video Axe journey is clean.--### Keyboard item activation versus DnD--The workbench's real `KeyboardSensor` received the Enter/Space keydown bubbled-from the gallery item's native button. It activated dragging and prevented the-button click that opens Preview. Focused browser tests reproduced both keys-with the production sensor: both initially made zero selection calls.--The native item button now stops propagation only for Enter/Space keydown.-Native button click behavior remains intact, pointer DnD remains green, and-keyboard DnD remains available when its own parent handle is focused. Both-focused key cases pass, and the production accessibility journey now opens the-video with Enter.--No new production module, `<video>`, `useEffect`, migration exception,-performance baseline, or `@platform/ui` importer was added.--## TDD evidence--The first fixture run failed six new cases while all four legacy cases passed:-the video state was absent and the mixed/date/video/board routes returned-404s or image-only results. After implementation, all ten fixture tests pass.--Additional focused RED/GREEN cycles covered:--- default Images ordering remaining image-first;-- the backend's omitted-parameter `starred_first=true` behavior;-- backend-accurate board-cover starred ordering and the- `starred_count=0` contract when `starred_first=false`;-- stable virtualizer callback identity (1 failed / 14 passed, then 15/15);-- Enter/Space gallery activation with a real keyboard sensor (2 failed / 15- passed, then 17/17);-- readable compact Preview foreground (1 failed / 6 passed, then 7/7);-- the representative video journey and its sole caption exception.--## Verification--All frontend commands ran from `invokeai/frontend/webv2`.--```sh-pnpm lint-```--```text-format: passed-OXC: passed-tsc --noEmit: passed-architecture: 3 files, 34 tests passed-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 5005 passed (5005)-```--```sh-pnpm test:browser-```--The first full run hit the repository's known timing-sensitive Tabs hover-timeout. The focused Tabs file passed 1/1, and the required complete rerun-passed:--```text-Test Files 69 passed (69)-Tests 349 passed (349)-```--```sh-pnpm test:fixtures-```--```text-Tests 10 passed (10)-```--```sh-INVOKEAI_ACCESSIBILITY_JOURNEY=workbench-video-preview-representative \- node scripts/run-accessibility-journeys.mjs-```--```text-workbench-video-preview-representative: passed-```--Invariant scans also confirmed:--- the only production `<video>` remains in `PreviewFrame.tsx`;-- no production source file was added in Task 11;-- `GeneratedImageContract`, migration exceptions, architecture fixtures, and- performance baselines are unchanged;-- exactly one `video-caption` exception exists;-- `git diff --check` passes;-- the checked-in MP4/WebP formats, dimensions, lengths, and hashes match the- values above.--## Full accessibility suite and Task 12 dependency--`pnpm test:accessibility` builds successfully, then stops at the existing-`workbench-canvas-representative` surface before later surfaces run. Axe-reports:--- `nested-interactive` on the 64 sortable canvas layer rows because their- role-button containers contain focusable descendants;-- `target-size` on 12×12 layer visibility buttons.--These are unrelated to mixed media and predate Task 11. The video-specific-journey passes independently with no violation. Task 12 must either fix or-explicitly disposition the Canvas violations before `check:release` can be-fully green; Task 11 does not weaken either rule.--## Independent review--The independent read-only review found no Critical issues. It reported two-Important findings and one Minor finding:--- mock board-cover selection omitted starred-first ordering;-- the video journey focused the item but activated it with a mouse click;-- item-name `starred_count` did not become zero when starred-first ordering was- disabled.--All three were addressed test-first. Board covers now use the backend's exact-starred/created/kind/name precedence and the intended fixture cover is itself-starred. The journey now activates with Enter after focused Enter/Space-browser coverage fixed the DnD conflict. The Minor `starred_count` mismatch is-fixed and asserted for `starred_first=false`.--The scoped re-review approved the code corrections with no Critical or-Important findings. Its two report-only Minor findings—the stale count of-production mismatches and stale browser-test total—are corrected in this-report.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-11a-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-11a-report.mddeleted file mode 100644index 72af346561..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-11a-report.md+++ /dev/null@@ -1,120 +0,0 @@-# Task 11A Report: Canvas layer accessibility release blocker--## Status--Complete. The Canvas representative surface no longer reports Axe-`nested-interactive` or `target-size` violations. Layer selection, pointer and-keyboard sorting, visibility controls, thumbnail retry, and locked-state-semantics remain separated and keyboard accessible.--## Root cause--`LayerListItem` spread all dnd-kit attributes and listeners onto the visual-`Row`. dnd-kit therefore gave that container `role="button"` and `tabindex="0"`-while the row still contained visibility, lock, properties, context-menu, and-thumbnail-retry buttons. Axe correctly reported every rendered row as an-interactive control containing focusable descendants.--The visibility control used `ToggleDot`'s compact `h="3" w="3"` button itself-as both the visual dot and hit target. Its measured target was 12×12 pixels,-with insufficient spacing to satisfy Axe's 24-pixel target-size rule.--The repository's working `useWidgetSortable`/`SortableCenterTab` pattern and-local dnd-kit implementation showed the required seam: a dedicated activator-node receives the keyboard listener and sortable semantics, while the sortable-node remains a noninteractive transform/layout container.--## Implementation--- The transformed outer wrapper remains the sortable node.-- The visual row is noninteractive and retains the pointer listener, preserving- whole-row pointer sorting with the existing six-pixel activation constraint.-- A full-row native `chakra.button` owns mouse, Enter, and Space selection. It is- a sibling—not an ancestor—of every row control.-- A visible, localized GripVertical button owns dnd-kit attributes, the- `setActivatorNodeRef`, and keyboard sorting.-- The established modified-Enter and portal-origin keyboard guard remains in- the keyboard-handle listener.-- Real controls restore pointer events over the otherwise pointer-transparent- visual layer and keep their existing pointer isolation.-- Thumbnail retry now stops pointerdown before it reaches the row sensor, while- preserving native focus and click behavior.-- The visibility button has a real 24×24 hit area and a centered 12×12- pseudo-element dot, preserving the compact visual, semantic tokens, hover- state, focus ring, tooltip, accessible label, and disabled behavior.-- Added the localized layer-selection accessible label.--No `useEffect`, production module, file rename, `@platform/ui` importer,-migration exception, mock/media behavior, performance baseline, or-architecture-budget change was introduced.--## TDD evidence--The first focused browser RED reproduced both Axe causes:--```text-2 tests failed:-- sortable control contained Toggle visibility-- visibility target measured 12px, expected >=24px-```--The expanded pre-production interaction RED produced seven expected failures-and one pass: independent pointer/Enter/Space selection, row-surface pointer-sorting, and handle-only keyboard sorting did not yet exist; existing visibility-isolation already passed.--After the semantic split, all eight cases passed. The independent review then-identified a real thumbnail-retry gap hidden by the original thumbnail mock.-The test was changed to render the real error-state `LayerThumbnail` with a-faithful preview engine. Its retry-drag case failed by reordering-`first,second` to `second,first`. Adding retry pointerdown isolation made all-nine focused cases pass while also proving focus, click/request, and selection-isolation.--## Verification--All commands ran from `invokeai/frontend/webv2` on the final exact tree.--```text-pnpm lint- format: passed- OXC: passed- tsc: passed- architecture: 3 files, 34 tests passed--pnpm test- Test Files 376 passed- Tests 5005 passed--pnpm test:browser- Test Files 70 passed- Tests 358 passed--pnpm test:fixtures- Tests 10 passed--pnpm test:accessibility- production build passed- all 9 representative/keyboard/video reports passed-```--The focused `workbench-canvas-representative` journey passes with every Axe rule-enabled. The `workbench-video-preview-representative` journey also passes with-its sole existing generated-media caption exception.--Invariant scans confirmed `git diff --check` is clean and the diff contains no-new production source file, `useEffect`, gallery/preview/media/mock change,-performance-baseline change, migration exception, or new platform barrel-import.--## Independent review--The first read-only review reported one Important finding and one Minor-finding:--- the real thumbnail retry button did not stop pointerdown from reaching- row-level DnD;-- the component comment still described the old no-visible-handle design.--Both were corrected. The scoped re-review approved the fixes with no remaining-Critical, Important, or Minor findings.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-12-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-12-report.mddeleted file mode 100644index cd350b677f..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-12-report.md+++ /dev/null@@ -1,218 +0,0 @@-# Task 12 Report: Final performance baselines and release verification--## Status--Complete. The mixed-media implementation has recorded architecture and browser-performance baselines, all release gates pass, and the baseline diff received-an independent read-only approval with no findings.--The first pre-update measurement correctly stopped on zero-headroom growth.-Systematic tracing isolated the cause to one new standalone first-party chunk.-A targeted editor-only chunk consolidation removed that request and reduced the-guarded entry sizes before either baseline was recorded.--## Pre-update measurement and stop condition--The clean starting head was:--```text-f9fb07fef639a2542a58fd76fbdb8766bdf71383-```--`pnpm test:performance:contracts` passed all 9 tests and-`pnpm exec vite build` built 5,116 modules. The required non-update checker then-failed with:--| Route | Metric | Baseline | Measured | Delta |-| --- | --- | ---: | ---: | ---: |-| launchpad | owned raw bytes | 57,925 | 57,966 | +41 |-| editor | owned raw bytes | 110,133 | 110,272 | +139 |-| editor | requests | 74 | 75 | +1 |-| editor | script requests | 58 | 59 | +1 |--The editor source-owner set added only-`source:src/features/gallery/core/items.ts`. The importer audit still measured-`@platform/ui` at exactly 156.--No baseline update command was run at this point.--## Root cause and consolidation--Rollup emitted `core/items.ts` as the sole owner of a new 1,316-byte-`items-*.js` common chunk. It had runtime consumers across four editor-initial-chunks and five independent lazy chunks. The new chunk path also appeared in-Vite's dependency/preload tables in both route entry files, explaining the-small owned-entry growth separately from the leaf payload.--Nearby pure gallery helpers remain coalesced because their runtime consumers-already converge in `galleryStateView` or `workbenchState`.--After controller approval, `vite.config.mts` received one targeted rule that-places:--- `features/gallery/core/items.ts`-- `features/gallery/ui/galleryStateView.ts`--in an editor-only `gallery-state` chunk. It does not use the launchpad-eager-`shared` chunk and does not couple gallery core to DnD/vendor code.--The single-variable rebuild emitted one 11,026-byte `gallery-state` chunk and-removed the standalone item chunk. The non-update checker then failed only for-the expected unrecorded editor source owner:--| Route | Metric | Baseline | Measured | Delta |-| --- | --- | ---: | ---: | ---: |-| launchpad | owned raw bytes | 57,925 | 57,857 | -68 |-| launchpad | requests / scripts | 31 / 15 | 31 / 15 | 0 / 0 |-| editor | owned raw bytes | 110,133 | 108,775 | -1,358 |-| editor | requests / scripts | 74 / 58 | 72 / 56 | -2 / -2 |--Launchpad source ownership remained unchanged. Editor source ownership added-only `core/items.ts`.--## Exactly-once baseline recording--After the zero-headroom audit passed, the following sequence ran once, in the-specified order:--```sh-pnpm test:performance:contracts-pnpm exec vite build-node scripts/check-architecture-performance.mjs --update-baseline-pnpm test:performance:browser:update-baseline-```--The contracts passed 9/9, both builds transformed 5,116 modules, and both-baseline writers exited successfully. Neither update command was repeated.--The architecture writer's JSON serialization expanded one single-element-structural array, which the repository formatter rejected. With controller-approval, only `performance/architecture-baseline.json` was passed through-`oxfmt`. Canonical JSON hashes before and after were identical:--```text-c66003e91cfee4b6ff2f57484ac71fdea97e78a9c793bbe638eeb70bf39ac13c-```--No baseline value was hand-edited.--## Baseline diff audit--The intended production/baseline files are:--- `invokeai/frontend/webv2/vite.config.mts`-- `invokeai/frontend/webv2/performance/architecture-baseline.json`-- `invokeai/frontend/webv2/performance/browser-baseline.json`--Architecture changes:--- launchpad source owners: no additions or removals;-- editor source owners: added only- `source:src/features/gallery/core/items.ts`;-- launchpad requests/scripts remained 31/15;-- editor requests/scripts decreased from 74/58 to 72/56;-- launchpad/editor owned bytes decreased to 57,857/108,775;-- editor initial raw bytes increased by 11,893, gzip by 2,670, and Brotli by- 2,648 under the existing generated 1% policy;-- launchpad initial raw bytes increased by 815 while gzip and Brotli decreased;-- `developmentInvalidation` is semantically unchanged;-- the `@platform/ui` cap and measured importer count remain exactly 156;-- structural policy is semantically unchanged.--Browser changes:--- route identities, schema, sampling, and timing policy remain unchanged;-- launchpad request/script counts remain 19/15;-- editor static request/script counts decrease by two;-- activated request/script counts do not increase;-- static script-owner sets add only `core/items.ts` to the editor minimal and- canvas sets; launchpad is unchanged and no owner is removed;-- recorded resource growth is payload under the existing generated 1% policy,- not a zero-headroom request or owned-entry increase.--`performance/architecture-fixtures.json`, profile-count shapes, and-`migrationExceptions.ts` are unchanged. The latter remains `[]`.--## Independent baseline review--The read-only reviewer approved the config and generated baselines with no-Critical, Important, or Minor findings. It independently confirmed:--- only the expected config/baseline files changed before this report;-- architecture values exactly match `build-report.json`;-- browser values and limits exactly derive from `browser-report.json`;-- launchpad ownership is unchanged;-- editor adds only `core/items.ts`;-- owned bytes and request counts do not grow;-- the 156-importer cap, structural policy, fixture schema, and migration- exceptions are unchanged;-- no suspicious budget weakening or hand edit is present.--## Final frontend verification--All commands ran from `invokeai/frontend/webv2`.--```text-pnpm lint- format: passed- OXC: passed- tsc: passed- architecture: 3 files, 34 tests passed--pnpm test:all- unit: 376 files, 5,005 tests passed- browser: 70 files, 358 tests passed- fixtures: 10 tests passed--pnpm test:performance:architecture- contracts: 9 tests passed- deterministic build/source-owner checks: passed- all browser route/resource/timing policies: passed--pnpm test:accessibility- production build: passed- all 9 representative/keyboard/video journeys: passed--pnpm check:release- complete aggregate lint, unit, browser, fixture, performance, and- accessibility sequence: passed-```--No timing-sensitive Tabs failure occurred, so the focused-rerun protocol was-not needed. Browser tests still emit their existing non-failing React `act`,-intentional error-boundary, and missing-test-i18n-instance console diagnostics.-Vite still reports its existing large-chunk and Babel plugin-timing warnings.--## Backend verification--From repository root:--```text-uv run pytest -q \- tests/app/services/gallery/test_gallery_default.py \- tests/app/routers/test_gallery.py--23 passed, 4 warnings-```--The warnings are environmental/upstream: the installed PyTorch build does not-target the host RTX 5090 CUDA capability, two protobuf container types use a-Python API deprecated for 3.14, and passlib imports `crypt`, which is deprecated-for Python 3.13. They do not affect the focused test result.--## Invariant scans--- The only production `<video>` element is in `PreviewFrame.tsx`.-- No production `useEffect` line was added since branch start.-- `GeneratedImageContract` is byte-for-byte unchanged.-- No existing production file was renamed.-- `core/items.ts` is the only new production source file.-- `migrationExceptions.ts` remains empty.-- Exactly one production accessibility call disables `video-caption`; the- other occurrence is the fixture test enforcing that count.-- The representative performance fixture keeps image index 0 as the default- selection.-- `/gallery/items/names` remains fetched on Shift-click/action demand, not- initial gallery render.-- Details query components mount only while Details is open.-- `git diff --check` passes.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-4-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-4-report.mddeleted file mode 100644index 0efe37cb64..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-4-report.md+++ /dev/null@@ -1,258 +0,0 @@-# Task 4 report — mixed gallery queries, hydration, overlays, and cache patches--## Delivered--- Renamed the final gallery read model to item semantics:- - `galleryItemsInfiniteOptions`- - `flattenGalleryItemsData`- - `GalleryItemsFilter`- - `GalleryItemsListQueryKey`- - `GalleryItemsWindow`- - `gallery/items/list` cache keys-- Updated the positional key guard to accept only the item-list layout and deduplicated flattened pages by `GalleryItemKey`, preserving same-name image/video pairs.-- Added lazy `galleryItemNamesOptions` for normal boards, date boards, and created ranges. Constructing the options performs no request; consumers must explicitly call `fetchQuery`.-- Replaced webv2 date-board `/image_names` use with `/item_names`.-- Kept the refcounted `dateBoardNamesConsumers` request sharing for date-board infinite and anchor consumers.-- Added mixed date hydration:- - images are fetched in one `images_by_names` request;- - videos are fetched through individual DTO requests with at most six active requests;- - hydrated output preserves reference order;- - missing 404 video refs are omitted;- - abort, authentication, network, and every other non-404 error propagate.-- Converted recent queue images to `GalleryImageItem` before mixed overlay merge.-- Added exact server-order comparison: starred first, created time, kind, then name, with order direction applied to every non-starred term.-- Merged and deduplicated overlays by qualified item key while retaining the existing 60-recent-item and rendered-window caps.-- Added confirmed-result cache patches. `patchGalleryItemCaches` derives qualified keys only from `GalleryItemMutationResult.succeeded`; failed refs are never patched.-- Generalized invalidation to item pages and item-name lists, retained one-time board invalidation, and preserved same-tick coalescing and account scoping.-- Removed the temporary backend `listGalleryImages = listPaletteImages` alias.-- Kept palette search explicitly image-only. Its date-board path now derives image refs from `/item_names`, so no webv2 gallery path calls `/image_names`.--## TDD evidence--### RED--Focused command from `invokeai/frontend/webv2`:--```sh-pnpm test src/features/gallery/data/task4Queries.test.ts src/features/gallery/data/task4QueryCache.test.ts src/features/gallery/data/task4Backend.test.ts src/features/gallery/ui/useGalleryData.test.ts-```--Initial result:--```text-Test Files 4 failed (4)-Tests 7 failed | 9 passed (16)-```--The query, cache, and overlay failures were causal missing-API failures:--```text-canonicalizeGalleryItemsFilter is not a function-flattenGalleryItemsData is not a function-galleryItemNamesOptions is not a function-galleryItemsInfiniteOptions is not a function-mergeGalleryItemWindow is not a function-```--After correcting a test-only hoisted mock, the backend-only RED command produced:--```text-Test Files 1 failed (1)-Tests 7 failed (7)-```--All seven failures were the expected missing seams:--```text-listGalleryDateBoardItemNames is not a function-listGalleryItemNames is not a function-hydrateGalleryDateBoardItemPage is not a function-```--The focused files were renamed after GREEN to their durable behavior names:--- `dateBoardItemHydration.test.ts`-- `mixedQueries.test.ts`-- `itemQueryCache.test.ts`--### GREEN--Final focused command:--```sh-pnpm test src/features/gallery/data/dateBoardItemHydration.test.ts src/features/gallery/data/mixedQueries.test.ts src/features/gallery/data/itemQueryCache.test.ts src/features/gallery/ui/useGalleryData.test.ts-```--Result:--```text-Test Files 4 passed (4)-Tests 23 passed (23)-```--The focused coverage includes the item key segment and positional guard, same-name image/video dedupe, lazy item-name options with created ranges, mixed page shape, date item-name URL and counts, reference order, one image batch, six-wide video concurrency, 404 omission, abort/auth/network propagation, server-exact overlay ordering, success-only qualified cache patches, and coalesced item/name/board invalidation.--## Compatibility obligations--Task 5/7 must remove the following narrowly scoped compatibility surfaces after Gallery state/projection, image actions, and Preview consume `GalleryItem`:--1. `gallery/legacy-images/list` key domain and `galleryKeys.legacy*`.-2. `galleryImagesInfiniteOptions`, which calls `listPaletteImages` directly and returns only `GalleryImagesPage` under the isolated legacy key. It does not alter or share the mixed item cache.-3. `flattenGalleryImagesData`.-4. Legacy image query discovery/key-guard helpers and the `GalleryImages*`/`CanonicalGalleryImagesFilter` aliases.-5. `patchGalleryImageCaches` and `GalleryImageCachePatch`; image actions must switch to `patchGalleryItemCaches` with confirmed `GalleryItemMutationResult`.-6. `invalidateGalleryImages`; legacy image consumers must switch to `invalidateGalleryItems`/`invalidateGallery`.-7. `mergeGalleryImageWindow`; Gallery projection must switch to `mergeGalleryItemWindow`.-8. The compatibility exports for those symbols in `features/gallery/queries.ts`.--Every production compatibility seam carries an inline `TODO(Task 5/7)` or `TODO(Task 5)` marker. The backend `listGalleryImages` alias was not retained.--## Files--### Production--- `invokeai/frontend/webv2/src/features/gallery/data/backend.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queries.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queryCache.ts`-- `invokeai/frontend/webv2/src/features/gallery/queries.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/useGalleryData.ts`--### Tests--- `invokeai/frontend/webv2/src/features/gallery/data/backend.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queries.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queryCache.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/dateBoardItemHydration.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/mixedQueries.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/itemQueryCache.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/useGalleryData.test.ts`--## Verification--From `invokeai/frontend/webv2`:--```sh-pnpm test-```--```text-Test Files 372 passed (372)-Tests 4928 passed (4928)-```--```sh-pnpm run lint-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture tests: 3 files passed, 34 tests passed-```--```sh-pnpm test src/features/gallery/data/backend.test.ts src/features/gallery/data/queries.test.ts src/features/gallery/data/queryCache.test.ts src/features/gallery/ui/useGalleryData.test.ts src/features/gallery/data/dateBoardItemHydration.test.ts src/features/gallery/data/mixedQueries.test.ts src/features/gallery/data/itemQueryCache.test.ts-```--```text-Test Files 7 passed (7)-Tests 72 passed (72)-```--## Self-review and concerns--- Confirmed the mixed query always returns `GalleryItemsPage`; legacy image pages live under a separate key and call the palette list directly.-- Confirmed no production webv2 gallery/workbench source contains `listGalleryImages` or `/image_names`.-- Confirmed item-name options are not subscribed or fetched eagerly.-- Confirmed cancellation and identity checks surround both names and page hydration.-- Confirmed no `useEffect` was added.-- No unresolved implementation concern. The listed Task 5/7 removals are deliberate branch-compatibility debt, not mixed-contract ambiguity.--## Fix Round 1--### Review issues addressed--1. Replaced locale-sensitive Gallery item ordering with a deterministic SQLite-BINARY-compatible text comparator. The same comparator now handles `createdAt`, `kind`, and `name`; the ASC/DESC multiplier is applied exactly once to each non-zero comparison result.-2. Added explicit `TODO(Task 5/7)` blocks above the legacy query/cache exports in `features/gallery/queries.ts` and directly above `patchGalleryImageCaches`.--### RED evidence--Command from `invokeai/frontend/webv2`:--```sh-pnpm test src/features/gallery/ui/useGalleryData.test.ts-```--Result before the production fix:--```text-Test Files 1 failed (1)-Tests 1 failed | 10 passed (11)-```--The new mixed-case/punctuation regression expected SQLite binary ascending order:--```text-!bang.png, A.png, Z.png, _draft.png, a.png-```--The locale-sensitive comparator instead produced:--```text-_draft.png, !bang.png, a.png, A.png, Z.png-```--### GREEN evidence--The same focused command after replacing `localeCompare`:--```text-Test Files 1 passed (1)-Tests 11 passed (11)-```--Focused overlay/query/cache regression command:--```sh-pnpm test src/features/gallery/ui/useGalleryData.test.ts src/features/gallery/data/mixedQueries.test.ts src/features/gallery/data/queries.test.ts src/features/gallery/data/itemQueryCache.test.ts src/features/gallery/data/queryCache.test.ts-```--Result:--```text-Test Files 5 passed (5)-Tests 30 passed (30)-```--Static verification:--```sh-pnpm run lint:tsc-pnpm run lint:oxc-pnpm run format:check-```--Results:--```text-tsc --noEmit: passed-oxlint --deny-warnings: passed-oxfmt --check: all matched files correctly formatted-```--### Files changed--- `invokeai/frontend/webv2/src/features/gallery/ui/useGalleryData.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/useGalleryData.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/queries.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queryCache.ts`-- `.superpowers/sdd/mixed-media-gallery-parity/task-4-report.md`--### Fix self-review--- The comparator uses direct deterministic string ordering, which matches SQLite BINARY for the ASCII ISO timestamps, item kinds, and regression names in this path.-- Both ascending and descending punctuation/mixed-case expectations are pinned; direction is not inverted or multiplied twice.-- The earlier starred-first and kind tie-break tests remain green.-- The public legacy facade and implementation-level cache wrapper now carry explicit removal obligations.-- No new compatibility surface or `useEffect` was introduced.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-5-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-5-report.mddeleted file mode 100644index 623ccc99f7..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-5-report.md+++ /dev/null@@ -1,415 +0,0 @@-# Task 5 Report: Canonical mixed-media selection and cross-project pruning--## Status--Complete.--Task 5 now persists canonical mixed-media selection state without renaming the-existing persisted properties:--- `selectedImage` writes a canonical `GalleryItem`.-- `selectedImageName` and `selectedImageNames` write qualified- `GalleryItemKey` values.-- `compareImage` writes only a canonical `GalleryImageItem`.-- `recentImages` remains an image-only `GeneratedImageContract[]`.--The state projection, reducer actions, shared query/cache path, image-only-consumer boundaries, and cross-project reconciliation logic all use the-qualified mixed-media contract.--## TDD evidence--### RED--The first focused run was made after adding the selection, projection,-consumer, and reducer assertions, before implementing the mixed state:--```sh-pnpm test \- src/features/gallery/core/selection.test.ts \- src/features/gallery/ui/galleryStateView.test.ts \- src/workbench/workbenchState.test.ts \- src/app/gallerySelectionConsumers.test.ts-```--Result:--```text-Test Files 4 failed (4)-Tests 17 failed | 173 passed (190)-```--The failures were the intended missing-contract failures: no canonical item-reader, old image-named projection fields, missing mixed reducer action types,-unqualified selection writes, comparison surviving video selection, and direct-Generation/Workflow consumers not exposing the image-only reader boundary.--After the reducer action candidates could execute, the narrowed reducer RED run-showed the three intended behavioral failures:--```sh-pnpm test src/workbench/workbenchState.test.ts \- -t "writes canonical mixed|prunes qualified|reconciles authoritative"-```--```text-Tests 3 failed | 155 skipped (158)-```--### GREEN--The final focused regression run after implementation and self-review was:--```sh-pnpm test \- src/workbench/workbenchState.test.ts \- src/features/gallery/core/selection.test.ts \- src/features/gallery/ui/galleryStateView.test.ts \- src/features/gallery/data/queryCache.test.ts \- src/app/gallerySelectionConsumers.test.ts-```--```text-Test Files 5 passed (5)-Tests 195 passed (195)-```--An earlier broader focused run also covered mixed query/data overlays and the-image-only compatibility views:--```text-Test Files 9 passed (9)-Tests 211 passed (211)-```--## Implementation--### Selection readers--- Added `getSelectedGalleryItemFromValues`.-- Canonical image and video items round-trip unchanged.-- Legacy generated-image objects and bare/qualified image names adapt to- canonical image items.-- `getSelectedGalleryImageFromValues` delegates to the item reader, narrows by- `kind`, and returns `null` for a selected video.-- Generation UI and Workflow field input selectors now use that image-only- reader directly.--### State projection and data--- Renamed the canonical projection fields to `items`, `selectedItemKey`,- `selectedItemKeys`, and `compareImageKey`.-- `GalleryCurrentItem` now identifies an item by qualified key.-- Persisted bare names are canonicalized as image keys; image/video items with- the same name remain distinct.-- Mixed selection order is preserved.-- Gallery data and Preview now consume `galleryItemsInfiniteOptions` and- `GalleryItemsPage`.-- The current image-only Grid and Preview paths use explicit narrowing adapters- that filter with `isGalleryImageItem` before constructing `GalleryImage`- contracts.--### Reducer and commands--- Renamed internal actions to:- - `selectGalleryItem`- - `toggleGalleryItemInSelection`- - `setGalleryMultiSelection`- - `patchGalleryItems`- - `removeGalleryItems`-- Added canonical item commands alongside narrow typed image adapters for the- Task 6/8 callers.-- Selecting or making a video primary clears comparison.-- Queue result routing keeps recents image-only while writing a canonical- selected image and qualified selection keys.-- Patch operations migrate legacy selected/compare objects to canonical items- while retaining the legacy recent-image shape.--### Pruning and board outcomes--- Qualified-key patch/removal runs across every open project.-- A video key never removes a same-name recent image or upscale image input.-- Image keys prune image-only recents and upscale inputs across all projects.-- The canonical board reconciliation action accepts authoritative- deleted/failed image/video arrays.-- Confirmed deletes are removed.-- Every other locally known item on the deleted board—including explicitly- failed items—is moved to `none`.-- Selected/project board references and pending/running queue destinations are- repaired across projects.--### Legacy query/cache cleanup--Removed all Task 4 compatibility debt assigned to Task 5:--- `gallery/legacy-images/list` and `galleryKeys.legacy*`-- `galleryImagesInfiniteOptions`-- `flattenGalleryImagesData`-- legacy image query discovery/key guards and type aliases-- `patchGalleryImageCaches` and `GalleryImageCachePatch`-- `invalidateGalleryImages`-- `mergeGalleryImageWindow`-- the corresponding `features/gallery/queries.ts` facade exports--Image actions now translate their image-only inputs into qualified-`GalleryItemMutationResult` values and patch the shared mixed item cache.--## Verification--From `invokeai/frontend/webv2`:--```sh-pnpm test-```--```text-Test Files 374 passed (374)-Tests 4938 passed (4938)-```--```sh-pnpm test:browser-```--```text-Test Files 58 passed (58)-Tests 240 passed (240)-```--The browser suite emitted its existing React `act(...)`, missing-i18n-instance,-and intentional error-boundary console output; the command exited successfully.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--```sh-pnpm format:check-pnpm lint:oxc-pnpm lint:tsc-pnpm architecture:check-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture: 3 files passed, 34 tests passed-```--From the repository root:--```sh-uv run pytest -q tests/app/services/gallery/test_gallery_default.py-```--```text-17 passed, 4 environment/deprecation warnings-```--## Compatibility obligations--The remaining adapters are deliberately narrow and type-safe:--1. `getGalleryImageStateView` is marked `TODO(Task 6)` and filters canonical- items before serving the current image-only Grid.-2. Image selection command adapters are marked `TODO(Task 6/8)` and convert- `GeneratedImageContract & Partial<GalleryImage>` to `GalleryImageItem`- before dispatch.-3. Preview's mixed-query image projection is marked `TODO(Task 8)` and filters- before converting.-4. `CurrentImageFlowNode` remains intentionally image-only by reading only- `recentImages`.--No adapter accepts a video as an image or relies on an unsafe mixed-to-image-cast.--## Self-review and concerns--- Confirmed every new reducer action is strongly typed in the internal action- union; the RED-only candidate-action test cast was removed after GREEN.-- Confirmed all new selection writes are canonical and all selected-name writes- are qualified.-- Confirmed comparison cannot be set to a video through the reducer or public- commands and is cleared when a video becomes primary.-- Confirmed same-name image/video pruning is kind-qualified across projects.-- Confirmed board reconciliation treats only deleted arrays as confirmed- deletion and moves every local non-deleted survivor.-- Confirmed all marked Task 5/7 legacy query/cache symbols are absent from- production and tests.-- Confirmed no `useEffect` was added.-- No unresolved implementation concern.--## Files--### Production--- `invokeai/frontend/webv2/src/app/GenerationUiAdapter.tsx`-- `invokeai/frontend/webv2/src/features/gallery/contracts.ts`-- `invokeai/frontend/webv2/src/features/gallery/core/selection.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queries.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queryCache.ts`-- `invokeai/frontend/webv2/src/features/gallery/queries.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx`-- `invokeai/frontend/webv2/src/features/gallery/ui/GalleryWidgetView.tsx`-- `invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/useGalleryData.ts`-- `invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx`-- `invokeai/frontend/webv2/src/workbench/image-actions/useImageActions.ts`-- `invokeai/frontend/webv2/src/workbench/widgets/layers/RunLayerWorkflowDialog.tsx`-- `invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewWidgetView.tsx`-- `invokeai/frontend/webv2/src/workbench/workbenchState.ts`-- `invokeai/frontend/webv2/src/workbench/workbenchStore.ts`--### Tests--- `invokeai/frontend/webv2/src/app/gallerySelectionConsumers.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/core/selection.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/data/queryCache.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/galleryStateView.test.ts`-- `invokeai/frontend/webv2/src/features/gallery/ui/useGalleryData.test.ts`-- `invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewNavigation.browser.test.tsx`-- `invokeai/frontend/webv2/src/workbench/workbenchState.test.ts`--## Review follow-up: authoritative mutation outcomes--The review of `a86b7cba25..8ac2a4fff0` identified three correctness gaps. This-follow-up fixes all three without adding the Task 7 mixed/video action ports.--### Follow-up RED evidence--The primary-toggle regression reproduced the inconsistent mixed selection:--```sh-pnpm test src/workbench/workbenchState.test.ts -t "atomically promotes"-```--```text-Test Files 1 failed (1)-Tests 1 failed | 158 skipped (159)-```--The reducer retained `selectedImageName: "video:shared"` while clearing the-primary object and retaining the stale image comparison.--The board deletion transport regressions reproduced the discarded response:--```sh-pnpm test src/features/gallery/data/backend.test.ts \- -t "deleteGalleryBoard outcomes"-```--```text-Test Files 1 failed (1)-Tests 2 failed | 36 skipped (38)-```--Both `include_images=true` and `include_images=false` returned `undefined`-instead of the backend outcome.--The image move/star transport regressions reproduced the other discarded-responses:--```sh-pnpm test src/features/gallery/data/backend.test.ts \- -t "image mutation outcomes"-```--```text-Test Files 1 failed (1)-Tests 2 failed | 38 skipped (40)-```--The action-level browser regressions then reproduced the manufactured-all-requested success:--```sh-pnpm test:browser \- src/workbench/image-actions/useImageActions.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 2 failed (2)-```--Both move and star patches included the backend-unconfirmed image.--### Follow-up fixes--- Primary toggle now receives the canonical next-primary item at the- action/command boundary. The reducer validates its qualified key and updates- object, key, ordered selection, and compare state atomically. Promoting a- video clears compare; an unresolved primary clears the leftover selection- instead of persisting orphan keys.-- Board deletion maps `board_id`, `deleted_board_images`,- `deleted_board_videos`, `deleted_images`, `deleted_videos`, `failed_images`,- and `failed_videos` into `GalleryBoardDeletionResult`. The UI forwards that- exact outcome to Workbench. Confirmed media deletes are removed; failed,- relationship-only, and otherwise locally known survivors move to `none`.-- The boolean board-deletion compatibility action and command were removed.-- Board add/remove and star/unstar map their authoritative success arrays.- Image actions compute success as the intersection of requested and confirmed- names, treat missing requested names as failed/ambiguous, and patch cache and- Workbench state only for confirmed names.-- Star/unstar no longer applies an optimistic all-requested patch.--### Follow-up GREEN and full verification--Focused integration:--```text-Unit: 2 files passed, 200 tests passed-Browser: 2 files passed, 3 tests passed-```--Full gates from `invokeai/frontend/webv2`:--```text-pnpm test- Test Files 374 passed (374)- Tests 4944 passed (4944)--pnpm test:browser- Test Files 60 passed (60)- Tests 243 passed (243)--pnpm test:fixtures- Tests 4 passed (4)--pnpm architecture:check- Test Files 3 passed (3)- Tests 34 passed (34)--pnpm format:check- all matched files correctly formatted--pnpm lint:oxc- zero warnings/errors--pnpm lint:tsc- tsc --noEmit passed-```--Relative to the pre-follow-up full verification, the suites increased from-4,938 to 4,944 unit tests and from 240 to 243 browser tests. The full browser-run retained the repository's existing React `act(...)`, missing-i18n-instance,-and intentional error-boundary console output and exited successfully.--### Follow-up self-review and concerns--- Confirmed the canonical board result preserves both relationship arrays, so- `include_images=false` moves retained images and videos rather than removing- them.-- Confirmed every requested-but-unconfirmed image remains in cache/state for- partial move and star outcomes.-- Confirmed the queue organization adapter type-checks while intentionally- ignoring the newly returned image success arrays.-- Confirmed the legacy boolean board action/command has no remaining callers.-- Confirmed no mixed/video image-action port was added; that remains Task 7.-- Confirmed no `useEffect` was added.-- No unresolved implementation concern.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-6-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-6-report.mddeleted file mode 100644index 54832f591e..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-6-report.md+++ /dev/null@@ -1,377 +0,0 @@-# Task 6 Report: Mixed-media DnD and virtualized gallery grid--## Status--Complete.--Task 6 replaces the gallery-image drag contract with ordered-`GalleryItemRef[]` payloads, forwards image/video/mixed board drops through a-typed item intent, and converts the existing virtualized grid to canonical-mixed-media items. Static video poster cells, qualified item identity, lazy-mixed range selection, and strict image-only drop refinements are covered by-focused browser and unit tests.--The App compatibility layer does not claim mixed board movement: it receives-the complete ordered ref vector from the board UI, handles an all-image vector-with the current image action, and rejects video/mixed vectors intact pending-Task 7.--## TDD evidence--### RED--The first DnD contract run was made after adding the item payload, qualified-ID,-guard, refinement, and board-resolution assertions:--```sh-pnpm test src/features/gallery/ui/galleryDnd.test.ts-```--```text-Test Files 1 failed (1)-Tests 6 failed | 1 passed (7)-```--The failures were the intended missing-contract failures:-`getGalleryItemDragData`, `getGalleryItemDragId`, the item guard, the all-image-refinement shape, and canonical board filtering did not yet exist.--The first board/consumer run was:--```sh-pnpm test \- src/features/gallery/ui/GalleryBoardSelect.test.ts \- src/workbench/widgets/canvas/canvasImageDropLayout.test.ts \- src/workbench/widgets/preview/previewCompareDnd.test.ts \- src/workbench/widgetDnd.test.ts-```--```text-Test Files 4 failed (4)-Tests 6 failed | 11 passed (17)-```--The missing item utility exports and board forwarding seam caused the expected-failures. The initial Preview drag browser run also failed at module import-because `PreviewFrame` still used the removed image constructor:--```sh-pnpm test:browser \- src/workbench/widgets/preview/PreviewFrameDrag.browser.test.tsx \- src/workbench/widgets/preview/PreviewCompareDropZone.browser.test.tsx-```--The initial Grid browser run likewise failed at module import while-`GalleryImageGrid` still depended on the removed image constructor:--```sh-pnpm test:browser src/features/gallery/ui/GalleryImageGrid.browser.test.tsx-```--### GREEN--The final focused unit regression run was:--```sh-pnpm test \- src/features/gallery/ui/galleryDnd.test.ts \- src/features/gallery/ui/GalleryBoardSelect.test.ts \- src/features/gallery/ui/galleryStateView.test.ts \- src/features/gallery/ui/useGalleryData.test.ts \- src/workbench/widgets/canvas/canvasImageDropLayout.test.ts \- src/workbench/widgets/preview/previewCompareDnd.test.ts \- src/workbench/widgetDnd.test.ts-```--```text-Test Files 7 passed (7)-Tests 69 passed (69)-```--The final focused browser regression run was:--```sh-pnpm test:browser \- src/features/gallery/ui/GalleryImageGrid.browser.test.tsx \- src/features/gallery/ui/useGalleryActions.browser.test.tsx \- src/workbench/widgets/preview/PreviewFrameDrag.browser.test.tsx \- src/workbench/widgets/preview/PreviewCompareDropZone.browser.test.tsx-```--```text-Test Files 4 passed (4)-Tests 15 passed (15)-```--## Implementation--### Shared DnD contract--- Added `GalleryItemDragData` with `kind: 'gallery-item'` and an ordered- `GalleryItemRef[]`.-- Draggable IDs retain the exact `GalleryItemKey` under a source namespace so- co-mounted Grid, Preview frame, and Preview filmstrip registrations remain- independent.-- Added the non-empty item guard and retained- `isGalleryImageDragData()` as a non-empty all-image refinement whose narrowed- items expose image names without a media cast.-- Board resolution accepts image, video, and mixed payloads, preserves ref- order, rejects virtual/date board targets, and excludes already-present refs- through canonical loaded items keyed by kind and name.-- `GalleryBoardSelect` forwards the complete resolved ref vector to- `moveItemsToBoard`; it never strips a video subset before forwarding.-- Canvas, Upscale, reference-image, Regional Guidance, and Preview comparison- consumers use the all-image refinement and therefore reject video/mixed- payloads.-- Grid, Preview frame, and Preview filmstrip sources now emit the item- contract. The current native Preview remains image-only until Task 8.--### Canonical virtualized grid--- Removed `GalleryImageStateView` and `getGalleryImageStateView`.-- Kept `GalleryImageGrid.tsx` and exactly two cell arms:- canonical item and queue placeholder.-- Selection, context targets, hotkey targets, React keys, and draggable IDs use- qualified item identity, so same-name images and videos remain independent.-- Preserved square cells, constant row estimates, viewport-width seeding,- scroll-to-index navigation, overscan `4`, the near-end infinite-load trigger,- and image-only queue placeholders.-- Shift-click lazily fetches ordered item refs on normal boards and reads the- existing item-name cache for date boards. It captures account epoch, filter- identity, and the selection anchor before awaiting, ignores stale results,- and falls back to the materialized range on cache misses or request failure.-- Alt-click sets comparison only for images. Alt-clicking a video performs- normal item selection, allowing the canonical reducer to clear comparison.-- Right-click outside the current selection forms a target containing only the- clicked canonical item.--### Video poster cell--- Renders the static thumbnail with an ordinary `<img decoding="async">`.-- Adds no `loading="lazy"` and no grid `<video>`.-- Shows an always-visible decorative Play icon and formatted duration badge in- the lower badge position.-- Uses tabular numerals and the required opacity-only transition.-- Uses a localized video label containing both the item name and formatted- duration.-- Renamed the list label to `Gallery items` and updated the accessibility- journey selector.-- Image thumbnail, dimensions, and star affordances retain their existing- behavior.--## Verification--All commands ran from `invokeai/frontend/webv2`.--```sh-pnpm lint:tsc-```--```text-tsc --noEmit: passed-```--```sh-pnpm test-```--```text-Test Files 375 passed (375)-Tests 4951 passed (4951)-```--```sh-pnpm test:browser-```--```text-Test Files 61 passed (61)-Tests 254 passed (254)-```--The browser suite emitted its existing React `act(...)`, missing-i18n-instance,-and intentional error-boundary diagnostics; the command exited successfully.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--```sh-pnpm architecture:check-```--```text-Test Files 3 passed (3)-Tests 34 passed (34)-```--```sh-pnpm lint-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture: 3 files passed, 34 tests passed-```--## Intentionally retained Task 7/8 adapters--1. `GalleryImageActions.moveItemsToBoard` is a narrow Task 7 bridge. The board- UI forwards the full ordered mixed ref vector; the App adapter handles only- an all-image vector and rejects video/mixed vectors without moving an image- subset.-2. The canonical Gallery context target is converted to the current- `ImageContextMenu` target only when its complete ordered ref vector resolves- to images. Video, mixed, and unresolved targets are rejected pending the- Task 7 common item action menu.-3. Grid delete/star hotkeys still call the image-action port only for a fully- resolved all-image selection. Video, mixed, and unresolved selections are- rejected pending Task 7.-4. Workbench `patchImages`/`removeImages` and the image-action methods remain- strict image adapters pending the Task 7 mixed mutation/action port.-5. Legacy Workbench selection commands (`selectImage`, `setCompareImage`,- `setMultiSelection`, and `toggleImageSelection`) remain for Preview and the- image command palette. Grid now uses canonical commands; the remaining- adapters are Task 8 cleanup.-6. Preview still narrows the mixed gallery query to images through- `flattenPreviewImages` and constructs an image ref for the selected saved- frame. Native video preview/navigation and the main preview video- non-draggable boundary remain Task 8 work.-7. Canvas, Upscale, reference-image, Regional Guidance, workflow collision, and- comparison targets remain intentionally image-only. Their shared refinement- accepts only non-empty all-image item payloads.--The App context-menu bridge retains-`actions as unknown as ImageActions` as a Task 7 compatibility cast. It does-not cast a media value or allow a video to cross an image-only boundary.--## Self-review--- Confirmed `GeneratedImageContract` is byte-for-byte unchanged from Task 5.-- Confirmed no image-only contract gained optional media fields.-- Confirmed no production file was added or renamed.-- Confirmed no `useEffect` was added.-- Confirmed no Task 6 production change adds `<video>` or lazy image loading.-- Confirmed `migrationExceptions.ts` and performance baselines are untouched.-- Confirmed old DnD constructors/IDs and the Task 5 image grid projection are- absent; the only old `gallery-image` payload literal is a negative guard- regression test.-- Confirmed `git diff --check` is clean.-- No unresolved implementation concern.--## Review follow-up: ordered identity and drop presentation--An independent review of `4c5aae43c1` found four interaction gaps. The-follow-up keeps the original scope and constraints while correcting them:--1. Grid drag payloads now derive the complete ordered ref vector directly from- `selectedItemKeys`. Lazy range members that are not materialized remain in- the payload, including videos that must make the Task 7 image bridge reject- the entire move.-2. Context targets carry both the complete ordered `itemRefs` and the currently- loaded canonical `items`. The App image menu resolves every ref by qualified- key and rejects mixed or unresolved targets instead of exposing a loaded- image subset.-3. Draggable registrations use- `gallery-grid|preview-frame|preview-filmstrip:<GalleryItemKey>`. This keeps- co-mounted sources independent while preserving qualified identity in every- ID. Disabled frames use a per-mount React ID instead of a synthetic- `image:none` registration.-4. Upscale, Generate Reference Images, and Regional Guidance share a compatible- image-droppable boundary. It disables dnd-kit registration and suppresses- visible `isOver` for video/mixed active payloads while continuing to accept- all-image payloads.--The board menu now also memoizes one `GalleryItemKey -> boardId` index and-passes it to every row, avoiding a complete loaded-item index rebuild per row.--### Follow-up RED--The full-ref Grid regressions initially produced:--```text-Test Files 1 failed (1)-Tests 3 failed | 9 passed (12)-```--The failures showed the unloaded video missing from the drag payload and-`itemRefs` missing from single and mixed context targets. The App bridge-regression then produced:--```text-Test Files 1 failed (1)-Tests 1 failed | 1 passed (2)-```--It exposed `["loaded.png"]` for a target whose complete selection also-contained an unloaded video.--The co-mounted registration regressions produced:--```text-Unit: 1 failed | 6 passed (7)-Browser: 1 failed | 12 passed (13)-```--The unit failure showed an un-namespaced `image:shared` ID. The browser failure-showed Preview's single-image registration replacing the Grid's mixed payload.--The visual-target regression initially failed at suite import because the-compatible image-droppable boundary did not exist:--```text-Test Files 1 failed (1)-Tests no tests-```--### Follow-up GREEN--The combined affected unit run was:--```text-Test Files 5 passed (5)-Tests 37 passed (37)-```--The combined affected browser run covered the App bridge, Grid, all three-image-only visual targets, Preview frame, and Preview comparison:--```text-Test Files 5 passed (5)-Tests 27 passed (27)-```--### Follow-up verification--```text-pnpm lint:tsc-tsc --noEmit: passed--pnpm test-Test Files 375 passed (375)-Tests 4951 passed (4951)--pnpm test:browser-Test Files 63 passed (63)-Tests 268 passed (268)--pnpm test:fixtures-Tests 4 passed (4)--pnpm architecture:check-Test Files 3 passed (3)-Tests 34 passed (34)--pnpm lint-format, oxlint, tsc, and architecture: passed-```--The full browser suite again emitted its existing React `act(...)`,-missing-i18n-instance, and intentional error-boundary diagnostics and exited-successfully.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-7a-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-7a-report.mddeleted file mode 100644index 32933f0b2f..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-7a-report.md+++ /dev/null@@ -1,318 +0,0 @@-# Task 7A Report: Mixed-media organization transport and domain results--## Status--Complete.--Task 7A adds the mixed-media `galleryItemOrganization` transport/domain API-through the existing gallery entry. Delete, star/unstar, and board movement-partition ordered qualified refs by media kind, trust only backend-confirmed-success names, and return confirmed successes, unconfirmed failures, and-deterministic affected board IDs.--This subtask does not patch caches or Workbench state, invalidate queries,-notify, add action providers, change UI, or implement downloads. Those-operation-level effects remain Task 7B responsibilities after it consumes the-confirmed result.--## TDD evidence--### Inherited RED--The original Task 7A implementer captured the focused RED before the production-edits and handed off this evidence with the uncommitted implementation:--```sh-pnpm test src/features/gallery/data/organization.test.ts-```--```text-Test Files 1 failed (1)-Tests 11 failed (11)-```--The failures covered the then-missing mixed organization entry, video bulk-transports, per-video board movement, confirmed-only result mapping, and abort-and concurrency behavior.--### GREEN--After independently auditing the inherited diff, the resumed focused run was:--```sh-pnpm test \- src/features/gallery/core/items.test.ts \- src/features/gallery/data/backend.test.ts \- src/features/gallery/data/organization.test.ts \- src/features/gallery/data/queryCache.test.ts \- src/features/gallery/data/itemQueryCache.test.ts-```--```text-Test Files 5 passed (5)-Tests 71 passed (71)-```--Aggregate lint then identified only an OXC structural warning in the bounded-worker loop (`no-unmodified-loop-condition`). The loop was rewritten without-changing its early-abort or scheduling behavior. The same focused command-passed again with 5 files and 71 tests before the full gates were repeated.--## Implementation--### Strict organization transports--- Image move, remove, star/unstar, and delete transports now map the required- authoritative success arrays and `affected_boards` array from strict runtime- DTOs.-- Existing image-only gallery organization methods remain available and keep- their image-name-only return types.-- Video delete, star, and unstar use one backend bulk request with the exact- `video_names` body.-- Video board movement uses the existing single-video- `POST /api/v1/videos/board` and `DELETE /api/v1/videos/board` contracts.-- Every request forwards the caller's abort signal and checks it before and- after transport resolution so an aborted response cannot become a confirmed- success.--### Confirmed mixed-media results--- Input refs are deduplicated by `GalleryItemKey`, retaining first-request- order.-- Image and video names retain their per-kind request order and execute as- independent `Promise.allSettled` partitions.-- Backend success names are intersected with the requested names; malformed or- unexpected names confirm nothing.-- `succeeded` and `failed` are reconstructed in original qualified-ref order,- so an image and video with the same name remain independent.-- A rejected bulk partition confirms none of its requested refs while the- independently fulfilled media partition is retained.-- Affected source/destination board IDs are included only for outcomes with a- requested confirmed success, deduplicated, and sorted deterministically.- The `none` board is retained.-- The shared mutation result can carry affected board IDs without weakening- its required `succeeded` and `failed` arrays. The public Task 7A API returns- affected board IDs as a required array.--### Bounded video movement--- At most four single-video move requests are active at once.-- A rejected or malformed per-video request remains unconfirmed without- converting it into success.-- Abort stops workers before scheduling another request. Aborted and unstarted- refs remain in `failed`.-- Per-request responses are reduced in input order; transport completion order- cannot reorder the domain result.--## Verification--All frontend commands ran from `invokeai/frontend/webv2`.--```sh-pnpm lint:tsc-```--```text-tsc --noEmit: passed-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 4962 passed (4962)-```--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--```sh-pnpm architecture:check-```--```text-Test Files 3 passed (3)-Tests 34 passed (34)-```--```sh-pnpm lint-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture: 3 files passed, 34 tests passed-```--The final full unit, fixture, and aggregate lint commands were run after the-worker-loop lint correction.--Browser tests were intentionally not run for this transport/domain-only-subtask; Task 7A requires proportionate non-UI gates and expressly excludes UI-and action behavior.--## Self-review--- Confirmed `GeneratedImageContract` and `core/types.ts` are unchanged.-- Confirmed image-only APIs remain strictly image-name/image typed.-- Confirmed the diff adds no production module or production file rename.-- Confirmed no UI, action provider, context menu, hotkey, download, archive, or- board UI file changed.-- Confirmed no cache/Workbench patch, query invalidation, or notification occurs- in the backend or domain API.-- Confirmed no `useEffect`, `@platform/ui` import, migration exception, or- performance baseline change was added.-- Confirmed same-name image/video identity is preserved end to end.-- Confirmed malformed/unexpected response names and rejected partitions cannot- become confirmed successes.-- Confirmed video board movement has one request per deduplicated video, at- most four in flight, and no per-video invalidation or duplicate operation- side effect.-- Confirmed `git diff --check` is clean.--Task 7B owns consuming the confirmed arrays to patch/prune state, perform one-operation-level invalidation, and issue one user notification. The subsequent-independent review and Task 7A fix round are recorded below.--## Independent review fix round--An independent review of `35bf5e98ae` found two transport-boundary gaps:--1. Bulk video delete/star/unstar accepted a success array without validating- the backend-required `failed_videos` array.-2. The bounded video-board worker treated authentication, identity-expiry, and- abort failures like isolated item failures, allowing later index claims and- potentially retaining video successes from a stale identity lifetime.--### Fix-round RED--The focused organization run after adding the malformed DTO and fatal-concurrency regressions was:--```sh-pnpm test src/features/gallery/data/organization.test.ts-```--```text-Test Files 1 failed (1)-Tests 9 failed | 13 passed (22)-```--Six failures showed that missing or wrong-type `failed_videos` still confirmed-the requested video across star, unstar, and delete. Two failures showed HTTP-401 and `HttpRequestIdentityExpiredError` were swallowed: all remaining video-requests were scheduled and their successes retained. The ninth showed that-an omitted caller signal did not bind movement to the captured account-lifetime, so account rotation scheduled eight requests instead of stopping at-the four already in flight.--### Fix-round implementation--- Added a strict bulk-video result mapper that requires arrays containing only- non-empty strings for the operation success field, `affected_boards`, and- `failed_videos`.-- Captured the account scope at the start of video board movement and composed- its lifetime signal with an optional caller signal.-- Added one shared fatal sentinel checked synchronously before every worker- index claim.-- Classified caller/account abort, `AccountScopeExpiredError`,- `HttpRequestIdentityExpiredError`, and HTTP 401 as partition-fatal.-- A fatal outcome rejects the video partition after the current workers settle,- so the outer `Promise.allSettled` orchestration confirms no video refs while- retaining an independently completed image partition.-- Kept ordinary HTTP 403/500 and malformed per-item move responses isolated to- their requested video; later video requests still run and may confirm.--### Fix-round GREEN and full verification--All commands ran from `invokeai/frontend/webv2` on the final formatted tree.--```sh-pnpm test src/features/gallery/data/organization.test.ts-```--```text-Test Files 1 passed (1)-Tests 22 passed (22)-```--```sh-pnpm test \- src/features/gallery/core/items.test.ts \- src/features/gallery/data/backend.test.ts \- src/features/gallery/data/organization.test.ts \- src/features/gallery/data/queryCache.test.ts \- src/features/gallery/data/itemQueryCache.test.ts-```--```text-Test Files 5 passed (5)-Tests 82 passed (82)-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 4973 passed (4973)-```--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--```sh-pnpm lint:tsc-```--```text-tsc --noEmit: passed-```--```sh-pnpm lint-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture: 3 files passed, 34 tests passed-```--The first aggregate lint attempt stopped only on formatting in the expanded-organization test. The repository formatter was applied to that test, then-the focused suite, full unit suite, fixtures, and aggregate lint were all run-again with the final counts above.--### Fix-round self-review--- Confirmed malformed bulk video results cannot contribute successes or- affected board IDs.-- Confirmed fatal 401/identity/account/abort outcomes stop new claims and reject- the complete video partition.-- Confirmed an already completed image partition remains independently- confirmable through the existing settled orchestration.-- Confirmed ordinary 403/500 move failures remain item-local and do not stop- later video work.-- Confirmed every video board request is account-lifetime-scoped even when the- caller omits a signal.-- Confirmed Task 7A still performs no cache patch, invalidation, notification,- UI/action, or download work.-- Confirmed no production module, `useEffect`, `@platform/ui` importer,- migration exception, or baseline change was added.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-7b-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-7b-report.mddeleted file mode 100644index 4246bfc9f0..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-7b-report.md+++ /dev/null@@ -1,443 +0,0 @@-# Task 7B Report: Mixed-media gallery actions and downloads--## Status--Complete.--Task 7B consumes the reviewed Task 7A `galleryItemOrganization` result and-finishes Task 7's App/action/UI integration. Gallery now receives an honest-common `GalleryItemActions` port, while App-owned `ImageActions` retains the-strict `GalleryImage` operations. Mixed image/video selections can be moved,-starred, deleted, and downloaded without narrowing or unqualified-name-collisions.--Confirmed mutation results are applied once at the operation boundary: only-`result.succeeded` patches caches and Workbench state, one all-gallery-invalidation follows the confirmed patch, and one success/partial/failure-notification is emitted.--## TDD evidence--All frontend commands ran from `invokeai/frontend/webv2`.--### Common action port and confirmed mutations--The first focused RED was:--```sh-pnpm test:browser src/workbench/image-actions/useImageActions.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 6 failed | 2 passed (8)-```--The failures covered the then-missing common delete/download/move/star methods,-confirmed-only patching, same-name image/video identity, mixed download order,-continuation, and operation-level invalidation/notification. The first common-action implementation made the file green with 8 tests.--The lazy App bridge then captured RED for the canonical mixed target and real-mixed board move:--```text-Test Files 1 failed (1)-Tests 2 failed (2)-```--After removing the unsafe cast and image-only move bridge, it passed with 2-tests. A later live-successor-context regression failed 1 of 3 tests before-the getter was forwarded. The honest item-named provider/export cleanup was-also test-first: all 3 bridge tests failed against the missing item-aware-symbols, then all 3 passed.--### Context menus and keyboard actions--The context-menu regression run was:--```sh-pnpm test:browser src/workbench/image-actions/ImageContextMenu.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 2 failed | 4 passed (6)-```--It showed that single-video and mixed selections had no common menu. The green-run passed all 6 tests with image-only actions hidden for video,-mixed-media, and unresolved selections.--The grid/hotkey regression run was:--```sh-pnpm test:browser src/features/gallery/ui/GalleryImageGrid.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 2 failed | 12 passed (14)-```--It showed that mixed hotkeys were rejected and videos had no star affordance.-The green run passed all 14 tests with qualified refs, the required-inside/outside right-click semantics, unloaded selection preservation, and-same-name media isolation.--### Delete successor guards--Adding ordered predecessor/successor, unloaded resolution, failed-ref, and-stale filter/selection cases produced:--```text-Test Files 1 failed (1)-Tests 5 failed | 8 passed (13)-```--All 13 passed after the ordered-names implementation. Two additional-regressions were captured and fixed independently:--- a captured names list without the deleted primary attempted to promote an- unrelated item;-- an account rotation while `galleryItems.resolve(ref)` was pending still- applied confirmed deletion side effects.--The stale-account test failed 1 of 18 tests before the post-resolution abort-guard and then passed all 18.--### Downloads and board archive wording--The board preparation-toast regression failed 1 of 3-`useGalleryActions.browser.test.tsx` tests against the old generic archive-message. The new board-menu regression failed its only test against-`Download Board`. Both passed after the exact `board.videoCount` omission-wording was added without a fetch.--Download regressions cover:--- one existing archive for an image-only selection;-- a protected single-video `fullUrl` download using the actual name;-- image archive first, then sequential videos for a mixed selection;-- continuation after rejected or unresolved videos;-- one partial/skipped summary.--### Final focused GREEN--```sh-pnpm test \- src/features/gallery/ui/GalleryBoardSelect.test.ts \- src/workbench/image-actions/ImageContextMenu.test.ts \- src/features/gallery/ui/GalleryWidgetView.test.ts \- src/features/gallery/ui/useGalleryData.test.ts \- src/features/gallery/data/queryCache.test.ts \- src/workbench/workbenchState.test.ts-```--```text-Test Files 6 passed (6)-Tests 183 passed (183)-```--```sh-pnpm test:browser \- src/app/GalleryImageActionsBridge.browser.test.tsx \- src/workbench/image-actions/useImageActions.browser.test.tsx \- src/workbench/image-actions/ImageContextMenu.browser.test.tsx \- src/features/gallery/ui/GalleryImageGrid.browser.test.tsx \- src/features/gallery/ui/useGalleryActions.browser.test.tsx \- src/features/gallery/ui/GalleryBoardMenu.browser.test.tsx-```--```text-Test Files 6 passed (6)-Tests 45 passed (45)-```--## Implementation--### Honest common and image-only ports--- `GalleryItemActions` accepts ordered qualified refs and canonical loaded- items for delete, download, move, preview/new-tab, and star operations.-- Gallery's provider, hook, widget context, and adapter field are item-named- and expose only that common surface.-- App `ImageActions` extends the common port and keeps canvas, reference,- compare, clipboard, prompt-template, and metadata-recall inputs strictly- `GalleryImage`.-- The lazy App bridge keeps the full `ImageActions` only in an App-local- context for the image-capable context menu. The retained- `as unknown as ImageActions` cast and all-image mixed-board bridge are gone.--### Confirmed operation boundary--- Delete, move, star, and unstar call the Task 7A- `galleryItemOrganization` methods directly.-- Cache and Workbench changes use only `result.succeeded` qualified keys;- `result.failed` remains materialized and selected.-- Every completed operation attempts exactly one `invalidateGallery` after- confirmed patches and emits one localized success, partial, or failure- notification.-- Account ownership is checked before patches, after async successor- resolution, before invalidation, and before notification.--### Primary selection after deletion--- The current filter and selection plus materialized items are captured before- transport.-- The ordered names query is captured before deletion and searched for the- nearest surviving predecessor, then successor.-- Every confirmed deletion and failed deletion is ineligible for promotion.-- An unloaded candidate resolves through `galleryItems.resolve(ref, signal)`.-- Failed names lookup falls back to materialized order.-- Account, filter, and selection currency are rechecked before selecting an- asynchronously resolved candidate.--### UI actions--- Board drops forward the complete ordered image/video/mixed ref payload.-- Keyboard delete/star uses common refs, including unloaded selected refs.-- Right-click outside a selection targets one item; right-click inside a- multi-selection keeps its complete ordered qualified selection.-- Single-video and mixed/unresolved menus show only supported common actions.- Fully resolved image-only targets retain the existing strict image menu.-- Video thumbnails now expose the shared star affordance. Compare and every- other image-only path remain image-gated.--### Downloads and archives--- Single video uses its protected `fullUrl` and actual file name.-- Image selections reuse the existing single archive transport.-- Mixed selection downloads the image archive first, then video files- sequentially in video-selection order.-- Rejected or unresolved videos do not prevent later videos from downloading;- the operation emits one summary.-- Board archive remains image-only. Its menu label and preparation toast state- the exact omitted video count from the already-loaded board; no count fetch- was added.--## Full verification--```sh-pnpm lint:tsc-```--```text-tsc --noEmit: passed-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 4973 passed (4973)-```--```sh-pnpm test:browser-```--```text-Test Files 64 passed (64)-Tests 290 passed (290)-```--The browser suite emitted its existing React `act(...)`,-missing-i18n-instance, and intentional error-boundary diagnostics and exited-successfully.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--```sh-pnpm architecture:check-```--```text-Test Files 3 passed (3)-Tests 34 passed (34)-```--```sh-pnpm lint-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture: 3 files passed, 34 tests passed-```--## Self-review--- Confirmed no production module or production file rename was added; the one- new source-tree file is a browser test.-- Confirmed no `useEffect`, platform UI barrel importer, migration exception,- or performance baseline was added.-- Confirmed `GeneratedImageContract` and the strict image-only action inputs- remain unchanged.-- Confirmed there is no mixed-to-image cast in the lazy bridge.-- Confirmed every mutation carries qualified identity end to end and only- confirmed successes can patch or prune state.-- Confirmed one operation cannot issue per-partition invalidations or- notifications.-- Confirmed `git diff --check` is clean.--## Retained Task 8–10 seams--- Task 8 retains native video rendering/controls in Preview. Task 7B opens the- selected video item and leaves the current image-only preview renderer- unchanged.-- Task 9 retains preview-only copy-current-frame and video Details/metadata.- Video and mixed gallery menus deliberately hide the existing image clipboard- and metadata-recall actions.-- Task 10 retains video upload, mock-backend fixture, broad accessibility, and- full gallery translation follow-through. Task 7B neither widens the current- image upload accept list nor changes mock fixtures or accessibility- exceptions.--## Concerns--None.--## Independent review fix round--An independent review of `a1ec2acbcb` found two action-integration gaps:--1. After a partial deletion confirmed the primary item deleted,- `removeItems()` retained failed qualified refs, but- `selectItem(successor)` replaced that surviving selection.-2. Video-only and mixed common bulk menus omitted the required primary-item- `Open in new tab` and `Open in preview` actions.--### Fix-round RED--The partial-deletion selection regression was added first:--```sh-pnpm test:browser src/workbench/image-actions/useImageActions.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 1 failed | 18 passed (19)-```--The failure showed that no atomic multi-selection write occurred after a-same-name image primary succeeded while ordered image/video failures remained-selected.--The two common bulk-menu regressions then produced:--```sh-pnpm test:browser src/workbench/image-actions/ImageContextMenu.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 2 failed | 5 passed (7)-```--Both a video-only multi-selection and a mixed selection with an unresolved-secondary ref lacked the primary open actions.--### Fix-round implementation--- Partial delete now intersects `result.failed` with the original ordered- requested refs by qualified key. When a successor exists, one- `setItemMultiSelection` write retains those failed keys in their original- order, appends the successor key, and makes the eligible successor primary.-- Same-name image/video failures remain separate. A failed ref is never chosen- as primary. When no eligible successor exists, the confirmed-only- `removeItems` write leaves failed keys materialized/selected without- promoting one.-- Common bulk menus now receive the already-loaded canonical primary item and- expose `Open in new tab` and `Open in preview` against it.-- The bulk path still renders no image clipboard, comparison, canvas,- prompt-template, or metadata-recall group. Native video preview rendering- remains Task 8.--### Fix-round focused GREEN--```sh-pnpm test:browser \- src/workbench/image-actions/useImageActions.browser.test.tsx \- src/workbench/image-actions/ImageContextMenu.browser.test.tsx-```--```text-Test Files 2 passed (2)-Tests 26 passed (26)-```--### Fix-round full verification--```sh-pnpm lint:tsc-```--```text-tsc --noEmit: passed-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 4973 passed (4973)-```--```sh-pnpm test:browser-```--```text-Test Files 64 passed (64)-Tests 292 passed (292)-```--The browser suite retained its existing React `act(...)`,-missing-i18n-instance, and intentional error-boundary diagnostics and exited-successfully.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--```sh-pnpm architecture:check-```--```text-Test Files 3 passed (3)-Tests 34 passed (34)-```--```sh-pnpm lint-```--```text-format: all matched files correctly formatted-oxlint: zero warnings/errors-tsc --noEmit: passed-architecture: 3 files passed, 34 tests passed-```--The fix-round diff changes only the two existing action implementations, their-browser tests, and this report. `git diff --check` is clean, and no Task 8+-surface or architecture exception was added.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-8-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-8-report.mddeleted file mode 100644index e00a7e5007..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-8-report.md+++ /dev/null@@ -1,293 +0,0 @@-# Task 8 Report: Native mixed-media Preview and protected video recovery--## Status--Complete.--Preview now consumes canonical `GalleryItem` contracts end to end. Images keep-their existing streaming, loupe, compare, and main-frame drag behavior, while-videos render through the only production `<video>` element in-`PreviewFrame.tsx`. Mixed navigation, filmstrip identity, header/common-actions, footer status, context-menu targets, and deletion context all use-qualified `GalleryItemKey`/`GalleryItemRef` identity.--Protected videos get one account-scoped cookie refresh and automatic-`video.load()` retry. Stale account/item completions are ignored, a second-failure shows a localized poster-backed Retry state, and manual Retry starts a-fresh one-refresh budget without synchronization effects.--## TDD evidence--All frontend commands ran from `invokeai/frontend/webv2`.--### Identity single-flight--The first focused RED was:--```sh-pnpm test src/features/identity/session.test.ts-```--```text-Test Files 1 failed (1)-Tests 3 failed | 15 passed (18)-```--The failures covered same-epoch single-flight, new-epoch isolation/stale-completion, and failure-as-`false`. After exporting-`refreshProtectedMediaCookie()`, the focused file passed all 18 tests.--### Qualified mixed navigation--Converting the pure navigation tests to canonical same-name image/video items-produced:--```text-Test Files 1 failed (1)-Tests 13 failed | 3 passed (16)-```--After the sequence, cursor, and target model moved to `GalleryItemKey`, all 16-tests passed.--The first full Preview integration RED was:--```text-Test Files 1 failed (1)-Tests 9 failed | 1 passed (10)-```--It covered canonical selection, same-name image/video order, native video-rendering, video comparison suppression, and image-only neighbor prefetch.--### Mixed filmstrip, footer, and actions--The new mixed chrome browser file initially failed all four tests. It passed-after:--- filmstrip keys and DnD IDs became source-qualified;-- static image/video posters selected canonical items;-- footer status added localized duration/fps and tabular dimensions;-- common star/download remained available for video while compare/copy stayed- image-only.--The initial native frame contract also failed three tests across the frame and-drag files before the source union and keyed video arm were introduced.--### Protected video retry--The tightened retry RED was:--```sh-pnpm test:browser src/workbench/widgets/preview/PreviewFrameVideo.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 6 failed | 2 passed (8)-```--Those failures required the first-error refresh/load, account and selected-item-stale guards, poster-backed terminal state, manual fresh budget, and keyed-per-item reset. The focused file then passed all 8 tests.--The combined Task 8 browser set passed:--```text-Test Files 5 passed (5)-Tests 37 passed (37)-```--The focused unit set passed:--```text-Test Files 3 passed (3)-Tests 38 passed (38)-```--Final review caught that Preview still supplied both Task 7's canonical-deletion-successor context and the legacy image callback. The regression test-failed 1 of 11 tests, then passed all 11 after removing the competing callback.--## Implementation--### Mixed Preview surface--- `PreviewWidgetView` derives, merges, navigates, and selects canonical mixed- items in backend order.-- Qualified keys preserve same-name image/video independence through cursor,- page-boundary, filmstrip, header, context-menu, and action contexts.-- Selecting a video clears comparison in the canonical reducer; Preview also- gates compare rendering, compare drops, swap, loupe, and zoom commands to- images.-- Neighbor prefetch creates `Image` requests only for image neighbors and- never assigns a full video URL.-- The common Task 7 deletion context supplies ordered mixed refs once; the- obsolete image-only successor callback is no longer registered.--### Native video arm--- `PreviewFrame` owns a local `PreviewMediaSource` union and delegates video to- a child keyed by `itemKey`.-- The keyed child contains the sole production `<video>` with `controls`,- `playsInline`, `preload="metadata"`, `poster`, and protected full `src`.-- The video arm registers no draggable, DnD listeners, compare drop zone,- loupe/pan/wheel handlers, or `touchAction: none`.-- Video failure state retains the poster, localized failure text, and a manual- Retry button.--### Protected-cookie recovery--- `refreshProtectedMediaCookie()` is account-epoch scoped and shares one- in-flight transport promise per epoch.-- A new epoch never reuses the prior promise, and transport failure/stale- completion resolves `false` rather than escaping into a media event.-- `PreviewVideo` captures the account epoch, element, and selected key before- refresh; all three must still be current before calling `load()`.-- Refs and keyed component lifetime implement retry synchronization without a- new `useEffect`.--## Full verification--```sh-pnpm lint-```--```text-format: passed-OXC: passed-tsc --noEmit: passed-architecture: 3 files, 34 tests passed-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 4977 passed (4977)-```--```sh-pnpm test:browser-```--```text-Test Files 66 passed (66)-Tests 307 passed (307)-```--The browser suite emitted its existing React `act(...)`,-missing-i18n-instance, and intentional error-boundary diagnostics and exited-successfully.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--## Source-policy scans--```sh-rg -n '^[[:space:]]*<video' src --glob '!**/*.test.*' --glob '!**/*.spec.*'-```--Only `src/workbench/widgets/preview/PreviewFrame.tsx` matched.--```sh-git diff -U0 -- '*.ts' '*.tsx' | rg '^\+.*\buseEffect\b'-```--No added `useEffect` matched.--`git diff --check` also passed.--## Retained Task 9 seams--- Video Details/metadata, workflow/graph rendering, and copy-current-frame are- intentionally absent.-- `actionImage` remains `null` for video, preserving the strict image-only- metadata/recall boundary for Task 9.-- `PreviewVideo` remains local to `PreviewFrame.tsx`; Task 9 can extend its- video-only UI without adding another media element or weakening image- contracts.--## Independent-review follow-up--The independent review found one critical, three important, and two minor-issues. All six were addressed in a separate follow-up:--- Protected-cookie recovery now captures the immutable account lifecycle scope- and passes its abort signal into the transport. An account transition aborts- the stale request synchronously, a new scope gets a distinct single flight,- and stale completion still resolves `false`.-- Preview ordering now reuses the gallery's canonical SQLite-compatible- timestamp, kind, and name comparator, including direction-aware ties.-- A video without a thumbnail renders a neutral filmstrip placeholder and- never falls back to its protected full URL in an `<img>`.-- Keyboard events originating from native video controls are left untouched,- while compare and zoom registrations are present only for image selections.-- The footer position text uses tabular numerals.-- The video Retry control imports the platform Button directly.--The lifecycle and ordering regression tests first failed as expected:--```text-Test Files 2 failed (2)-Tests 2 failed, 21 passed (23)-```--They passed after implementation, together with the existing gallery merge-coverage:--```text-Test Files 3 passed (3)-Tests 31 passed (31)-```--The UI regressions first failed as expected:--```text-Test Files 2 failed (2)-Tests 3 failed, 15 passed (18)-```--They then passed:--```text-Test Files 2 passed (2)-Tests 18 passed (18)-```--The broader focused browser set passed 5 files and 41 tests.--Final full verification after the follow-up:--```text-pnpm lint-format: passed-OXC: passed-tsc --noEmit: passed-architecture: 3 files, 34 tests passed--pnpm test-Test Files 376 passed (376)-Tests 4978 passed (4978)--pnpm test:browser-Test Files 66 passed (66)-Tests 310 passed (310)--pnpm test:fixtures-Tests 4 passed (4)-```--The browser suite retained its existing non-failing React `act(...)`,-missing-i18n-instance, and intentional error-boundary diagnostics.--The source-policy scans again found exactly one production `<video>` in-`PreviewFrame.tsx`, no added `useEffect`, and no whitespace errors.diff --git a/.superpowers/sdd/mixed-media-gallery-parity/task-9-report.md b/.superpowers/sdd/mixed-media-gallery-parity/task-9-report.mddeleted file mode 100644index 8ad5090e0c..0000000000--- a/.superpowers/sdd/mixed-media-gallery-parity/task-9-report.md+++ /dev/null@@ -1,289 +0,0 @@-# Task 9 Report: Video copy-current-frame and raw Details--## Status--Complete.--Preview videos now expose a readiness-gated Copy Current Frame action and-video Details from the header action strip, Preview context menu, and footer-disclosure. Frame capture stays inside the existing keyed `PreviewVideo`-boundary in `PreviewFrame.tsx`, which remains the sole owner of a production-`<video>`.--Details work is query-driven only while the disclosure is open. Query identity-includes the account epoch and qualified `GalleryItemKey`; video metadata and-workflow/graph requests start concurrently with the same abort signal. Images-retain parsed metadata rows, source-run identity, and existing recall actions,-while videos render raw Metadata, Workflow, and Graph JSON with no recall-controls.--## TDD evidence--All frontend commands ran from `invokeai/frontend/webv2`.--### Copy-current-frame controller--The first focused RED extended the existing native-video browser contract:--```sh-pnpm test:browser src/workbench/widgets/preview/PreviewFrameVideo.browser.test.tsx-```--```text-Test Files 1 failed (1)-Tests 9 failed | 8 passed (17)-```--Those failures covered:--- Clipboard API support, `HAVE_CURRENT_DATA`, and nonzero intrinsic dimensions;-- exact intrinsic-size canvas drawing and PNG `ClipboardItem` writes;-- unsupported, not-ready, canvas draw/taint, null/thrown encoding, and- ClipboardItem/write failures;-- account-epoch and selected-item staleness after an asynchronous clipboard- write.--After the local keyed video controller was implemented, the file passed all 17-tests.--### Query-driven Details and Preview-only actions--Before production edits, the consolidated Task 9 browser RED was:--```text-Test Files 4 failed (4)-Tests 18 failed | 20 passed (38)-```--The new Details file required closed-state inactivity, epoch + qualified-item-query keys, concurrent video requests with one query signal, close/item/epoch-abort and stale-result isolation, raw JSON tabs without recall, and the parsed-image metadata/recall regression. It passed all 7 tests after implementation.--The action-strip and shared-menu tests required localized Preview video-actions while retaining image copy and keeping Gallery video menus free of-frame copy. The focused action/menu set passed all 14 tests.--The notification translator was added from a focused unit RED:--```text-Test Files 1 failed (1)-Tests 7 failed | 5 passed (12)-```--It then passed all 12 tests, proving one success notice and distinct localized-notices for all six failure results. The combined Task 9 browser set passed:--```text-Test Files 4 passed (4)-Tests 38 passed (38)-```--### Full-suite timing regression--The first full browser run exposed a timing-sensitive assertion in the-pre-existing protected-video retry test:--```text-Test Files 1 failed | 66 passed (67)-Tests 1 failed | 327 passed (328)-```--Its intentionally invalid data-video URL could emit a trusted native media-error after the test's deterministic manual error when the full suite was-busy. That second event correctly entered the terminal retry state, racing the-first-retry assertion. The final harness uses a minimal valid media URL for-tests that dispatch deterministic recovery events and reserves an invalid URL-for one focused native-error contract. No trusted media error is suppressed.--### Completion-review follow-up--The completion review found no critical issues and three important edge cases.-All three were captured before follow-up production edits:--```text-Test Files 3 failed (3)-Tests 4 failed | 34 passed (38)-```--The REDs proved that:--- image recall-capability metadata work did not yet receive the Details query- signal;-- pending image Details had lost the prior disabled recall-button skeleton;-- a captured video A context menu could show actions bound to newly selected- video B.--The recall-capability port now accepts the caller signal and combines it with-the account-lifecycle signal through `AbortSignal.any`. Image Details keep-their recall row mounted and disabled while pending. Preview video context-extras now carry their selected `GalleryItemKey` and render only when it-matches the menu's captured single-video target.--The same three files then passed all 38 tests. The Details file passed 9/9-without its prior `act(...)` diagnostics after its asynchronous query-assertions were wrapped correctly.--### Review-fix round--The next review found that image recall capabilities were cached under only-the account epoch and item key even though they also depend on current-generation values and model inventory. The focused regression kept the epoch,-item, and cached metadata fixed, changed the current capability action, and-failed because the Recall All button remained enabled:--```text-Test Files 1 failed (1)-Tests 1 failed | 9 skipped (10)-AssertionError: expected false to be true-```--The cache now owns server metadata only. `ImageActions` exposes a synchronous-`deriveImageRecallCapabilities(image, metadata)` operation backed by its-current generation values and model inventory, and Preview calls it on every-render after metadata resolves. The regression proves that the button updates-without another metadata request. A second hook-level test switches the-current model from SD-1 to FLUX and proves clip-skip capability changes without-starting a metadata transport.--The review also found that a test-host capture listener suppressed every-trusted media error in the native-video file. A focused browser-generated-error test failed because protected-media recovery was never called:--```text-Test Files 1 failed (1)-Tests 1 failed | 17 skipped (18)-AssertionError: expected "vi.fn()" to be called once, but got 0 times-```--The blanket listener was removed. Deterministic synthetic recovery tests use a-valid media data URL, while the focused invalid-source test observes an-`isTrusted` browser error and proves it reaches cookie refresh. The existing-deterministic recovery tests retain terminal failure-UI coverage. The three-directly affected browser files then passed:--```text-Test Files 3 passed (3)-Tests 49 passed (49)-```--## Implementation--### Preview-owned frame capture--- `PreviewFrame` exposes a typed imperative controller through the existing- `PreviewFrame`/keyed `PreviewVideo` boundary.-- Readiness is published from media events and ref lifetime, with no- synchronization effect.-- Capture verifies ClipboardItem/write support, current-frame data, and- nonzero dimensions before drawing.-- The canvas uses `videoWidth`/`videoHeight`, draws the selected native player,- encodes `image/png`, and performs one clipboard write.-- Canvas draw/taint, encoding, clipboard, unsupported, not-ready, and stale- outcomes stay distinct.-- Account epoch, selected `GalleryItemKey`, and video element identity are- checked before the write and again before success.-- `PreviewWidgetView` translates every result into exactly one localized- success/error notification.--### Preview action surfaces--- Full-density Preview video headers expose Copy Current Frame and Video- Details; copy remains disabled until the controller publishes readiness.-- Preview's shared context-menu port is opt-in and video-only. Gallery callers- omit the port, so Gallery video/mixed context menus still hide frame copy.-- The opt-in port is qualified by `GalleryItemKey`; stale captured menus never- operate on a newly selected video.-- Image copy, compare, metadata, and recall behavior remain on the strict- image arm.-- Video Details explicitly opens the existing footer disclosure.--### Query-driven Details--- The old image metadata synchronization effect was removed.-- The query observer is mounted only while Details is open and is keyed by- `['preview', 'details', accountEpoch, itemKey]`.-- Unmounting on close/item/epoch change cancels supported transports through- the TanStack Query signal.-- The image query performs exactly one metadata transport. Recall capabilities- are derived synchronously from that cached metadata and the current- generation/model state, so they never become stale behind the item-only key.-- The asynchronous recall-capability port retained for context menus still- combines caller and account-lifecycle signals.-- Video metadata and workflow/graph requests use `Promise.all` and the same- signal.-- Video Metadata, Workflow, and Graph use `JsonPreview` from the direct- `@platform/ui/JsonPreview` subpath and never render recall controls.-- Image Details retain `parsePreviewMetadata`, Source Run, recall capability- loading, and a stable disabled-while-pending `RecallActionButtons` skeleton.--## Full verification--```sh-pnpm lint-```--```text-format: passed-OXC: passed-tsc --noEmit: passed-architecture: 3 files, 34 tests passed-```--```sh-pnpm test-```--```text-Test Files 376 passed (376)-Tests 4985 passed (4985)-```--```sh-pnpm test:browser-```--```text-Test Files 67 passed (67)-Tests 335 passed (335)-```--The full suite retained non-failing React `act(...)`, missing-i18n-instance,-and intentional error-boundary diagnostics from pre-existing files.--```sh-pnpm test:fixtures-```--```text-Tests 4 passed (4)-```--## Source-policy and contract scans--```sh-rg -n '^[[:space:]]*<video' src --glob '!**/*.test.*' --glob '!**/*.spec.*'-```--Only `src/workbench/widgets/preview/PreviewFrame.tsx` matched.--```sh-git diff -U0 -- '*.ts' '*.tsx' | rg '^\+.*\buseEffect\b'-```--No added `useEffect` matched.--The only added platform UI import is the required direct-`@platform/ui/JsonPreview` subpath. No production module, file rename,-migration exception, architecture/performance baseline, or additional-`@platform/ui` barrel importer was added.--`src/features/gallery/core/types.ts`, which owns-`GeneratedImageContract`, is byte-for-byte identical to reviewed head-`35644ab5be4bde2beb91cb9c52f6b92f7f2a3a65`; both SHA-256 values are:--```text-79398f2e0e0dd4c72409612531ba990cc0b6b5df64ee8e13c47a93f1b1190979-```--`git diff --check` also passed.