feat: Append to InvokeAI reference image + capability-gated recall buttons#332
Merged
Conversation
Both slots of the link — the standalone row below the recall buttons and the sticky cell at the bottom of the Image Details table — were right-aligned. Also removes a stray closing brace after the #descriptionText rule that made the stylesheet syntactically invalid. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds an "Append to InvokeAI" button to the right of "Send to InvokeAI" in the metadata drawer. It runs the same upload + recall flow but sends ?append=true on the recall, which asks InvokeAI to add the image to its existing reference-image list instead of replacing it. Requires an InvokeAI backend whose recall endpoint understands the append query parameter (lstein fork branch lstein/feat/recall-append-ref-images); older backends ignore the parameter and keep the replace behaviour. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The recall buttons now activate only after PhotoMap confirms the configured InvokeAI backend supports them: * no /recall router -> no recall buttons at all * recall without append -> Send to InvokeAI / Remix / Recall only * recall with append -> all buttons GET /invokeai/capabilities probes the backend's OpenAPI schema for the recall route and its append query parameter — probing capabilities rather than comparing versions keeps development backends working the moment the feature exists on their branch. When the schema can't be fetched it falls back to version thresholds (recall 6.13.0, append 6.13.5); an unreachable backend reports no capabilities. Successful probes are cached for 5 minutes, failures for 30 seconds, and saving the InvokeAI settings drops the cache. The frontend fetches capabilities at startup and after settings saves, reflecting the result as body classes that CSS uses to reveal the buttons — the server still renders all of them into the drawer HTML. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an "Append to InvokeAI" reference-image button to the metadata drawer, a small alignment tweak to the metadata link, and a capability probe so the recall buttons only appear when the configured InvokeAI backend actually supports them.
This is the PhotoMap side of a two-part change. It depends on a matching InvokeAI backend change (
appendquery parameter onPOST /api/v1/recall/{queue_id}); against an older backend the new button is automatically hidden by the capability probe.What's in here (three commits)
fix(ui): left-align the "View Metadata (JSON)" link — both render slots (the standalone row below the recall buttons and the sticky cell at the bottom of the Image Details table) were right-aligned. Also removes a stray}inmetadata-drawer.cssthat made the stylesheet syntactically invalid.feat(invoke): "Append to InvokeAI" button — sits to the right of "Send to InvokeAI". It runs the same upload + recall flow but sends?append=trueon the recall, asking InvokeAI to add the image to its existing reference-image list instead of replacing it. Newappendfield onUseRefImageRequest; newappend_refbutton mode ininvoke-recall.js.feat(invoke): gate the recall buttons on a backend capability probe — newGET /invokeai/capabilitiesprobes the backend's OpenAPI schema for the recall route and itsappendquery parameter (falling back to version thresholds — recall ≥ 6.13.0, append ≥ 6.13.5 — when the schema can't be fetched). The frontend reflects the result asbodyclasses that CSS uses to reveal the buttons:Probing capabilities rather than comparing versions keeps a development backend working the moment the feature lands on its branch. Results are cached (5 min on success, 30 s on failure) and the cache is dropped when the InvokeAI settings are saved.
Testing
make testgreen: 436 backend (pytest) + 379 frontend (Jest) tests.appendrecall parameter, and the body-class gating.ruff,eslint, andprettierall clean.🤖 Generated with Claude Code