feat(invoke): add image-board selector for reference uploads#222
Merged
feat(invoke): add image-board selector for reference uploads#222
Conversation
Reveals the InvokeAI username/password and a new "Upload to Image Board" dropdown only after /invokeai/status confirms the configured URL points to a working backend. Reference-image uploads target the selected board, falling back to Uncategorized when the board can't be fetched at config time or rejects the upload at runtime. Co-Authored-By: Claude Opus 4.7 (1M context) <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
Backend
Config.invokeai_board_idfield;to_dict/load_config/get_invokeai_settings/set_invokeai_settingsround-trip it.GET /invokeai/statusprobes the unauthenticated/api/v1/app/version. Returns{reachable, version, detail}. Used by the settings UI to decide whether to reveal the auth section. Treats a 200 without aversionfield as not-InvokeAI.GET /invokeai/boardsfetches/api/v1/boards/?all=truethrough the existing auth-fallback helper (renamed_post_with_auth_fallback→_request_with_auth_fallbacksince it's now used for GET as well). Returns a flat[{board_id, board_name}]list; handles paginated responses too. Any failure surfaces as 502.GET /invokeai/configaddsboard_idto the response.POST /invokeai/configround-trips it with the same preserve-on-null / clear-on-empty-string semantics as the password field._upload_image_to_invokeaiacceptsboard_idand retries without it on a 4xx, returning a warning string the caller surfaces./use_ref_imageincludeswarningin the response on fallback.Frontend
settings.html: wraps username/password rows + new<select id="invokeaiBoardSelect">in#invokeaiAuthSection(hidden by default).settings.js: load →/invokeai/status→ conditional reveal →/invokeai/boards. URL/user/pass autosave (debounced) and re-probe; board selection autosaves on change. On boards fetch failure the dropdown is disabled and shows only "Uncategorized".Test plan
ruff check photomap testsclean.pytest tests/backend— 119 passed (+12 new: status reachable / unreachable / non-InvokeAI / paginated boards / board_id round-trip / preserve-on-null / clear-on-empty / boards 502 / upload uses board_id / fallback to Uncategorized + warning).npm test— 239 passed (+6 new ininvokeai-settings.test.jscovering reveal/hide, board population, and fallback).npm run lintandnpm run format:checkclean.🤖 Generated with Claude Code