Add the post-editor Add Gallery Images workflow #13
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Implement the bDS2-compatible post-editor batch workflow that imports selected images, links them to the current post, enriches them when AI is available, and inserts the gallery macro.
Current state
crates/bds-ui/src/app.rsthroughMessage::MediaFilesPicked.crates/bds-ui/src/platform/dialog.rs.Add Gallery Imagesaction or post-specific import pipeline.specs/media.allium,PostEditorGalleryImportSurfaceandBatchImportProcessLinkImages, is normative.Required behavior
Add a localized post-editor quick action named
Add Gallery Imagesfor a persisted post.image_import_concurrency, default 4 and clamped to 1 through 8.\n[[gallery]]\ninto the current editor, refresh linked media/editor state, and write the final selected-count summary.All metadata changes must continue to flush through the normal sidecar path and remain compatible with metadata diff and rebuild-from-filesystem.
Implementation notes
docs/UI_STYLE_GUIDE.mdbefore changing the editor UI.post_media, AI, translation, task/output, and dialog code. Do not create a second media pipeline.../bDS2/lib/bds/desktop/shell_live/gallery_import.ex, theadd_gallery_imageshandlers inshell_live.ex, and gallery pipeline tests when the spec is silent.Acceptance criteria
allium check specs/*.allium,cargo fmt --all -- --check,cargo build --workspace, andcargo test --workspacepass.Implemented in commit
055dd5e. Added the localized post-editor Add Gallery Images action, airplane/local-endpoint gating, native image-only multi-selection, bounded concurrent import, mandatory post linking before best-effort AI enrichment, deduplicated media translations, per-image and final Output entries, gallery macro insertion, and editor/media refresh. Regression coverage verifies partial failure, link survival when AI fails, metadata and translation sidecars, rebuild restoration, concurrency bounds, picker cancellation, and configured local AI enrichment. README, core/extension plans, and AGENTS.md definition-of-done guidance were updated. Verified with allium check specs/*.allium, cargo fmt --all -- --check, cargo build --workspace, and cargo test --workspace --quiet.