Fix: restore all saved boards when editing an InvokeAI board album#336
Merged
Conversation
Reopening a board album for editing left only "Uncategorized" checked when the saved selection included it. populateBoardAlbumEditForm paints a placeholder checklist (board names unresolved) that shows only the checked Uncategorized box, then auto-loads the real list. The auto-load derived its selected ids from the DOM, which had collapsed to just ["none"], so every other saved board came back unchecked. The auto-load now passes the album's saved invokeai_board_ids directly; only the manual "Connect & Load Boards" button reads the in-progress DOM selection (so an in-flight edit isn't clobbered on reconnect). Co-Authored-By: Claude Opus 4.8 (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.
Bug
When editing a previously-saved InvokeAI board-backed album, the board checklist showed only "Uncategorized" checked, even though more boards (or all of them) had been selected and indexed successfully.
Root cause
populateBoardAlbumEditForm(album-manager.js) renders a placeholder checklist immediately — but with board names still unresolved, that render only paints the prepended "Uncategorized" box. It then kicks off the asyncloadBoards()to fetch the real list. The trouble was howloadBoardschose which boxes to check:When the saved selection included Uncategorized (
none), the placeholder render left that box checked, socollectSelectedBoardIds()returned["none"](truthy) and the fullalbum.invokeai_board_idswas never used. Every other saved board came back unchecked. (The bug only bit whennonewas among the saved boards — otherwise the DOM scrape returned[]and the fallback kicked in.)Fix
loadBoardsnow takes an explicitpreferredIds:album.invokeai_board_idsdirectly — no DOM scrape.Testing
npm test(381 tests),npm run lint,npm run format:checkall clean.🤖 Generated with Claude Code