feat: AI description generation buttons in category & manufacturer admin forms - #10
Merged
Conversation
…ufacturer admin forms (P0 #3) - Add categoryDescriptionStatus/generateCategoryDescription and manufacturerDescriptionStatus/generateManufacturerDescription to FroshAiApiService - Override sw-category-basic-form with a 'Generate description with AI' trigger (acl 'category.editor') and a new frosh-ai-category-generate-modal - Override sw-manufacturer-detail with the same trigger (acl 'product_manufacturer.editor') and frosh-ai-manufacturer-generate-modal - Modals: description-only (tone, maxWords, extra instructions, fill-empty/ overwrite handling), mirroring the product generate modal pattern - Add frosh-ai-category.* and frosh-ai-manufacturer.* snippets (en-GB, de-DE) Administration sources only; admin build intentionally not run.
…acturer block - Shopware 6.7 has no sw-category-basic-form; the category description editor lives in sw-category-detail-menu (block sw_category_detail_menu_description). - Manufacturer uses the dedicated sw_manufacturer_detail_base_info_field_description block; sw-manufacturer-detail exposes manufacturer as data with no allowEdit prop, so gate purely on the product_manufacturer.editor acl privilege.
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 "Generate description with AI" buttons to the Category and Manufacturer admin detail forms, wiring up the P0 category/manufacturer description-generation backend features (merged in #6/#7) with a UI.
Mirrors the existing product-description generation UX exactly.
What changed
Category (
sw-category-detail-menu)sw_category_detail_menu_descriptionblock (where the category description field lives in Shopware 6.7 —sw-category-basic-formdoes not exist there).frosh-ai-category-generate-modal(tone, max words, extra instructions, "only fill empty description" toggle).POST /api/_action/frosh-ai/category/generate-description, gated onGET .../category/description-status({enabled}) +category.editoracl.Manufacturer (
sw-manufacturer-detail)sw_manufacturer_detail_base_info_field_descriptionblock so the trigger sits directly above the description editor.frosh-ai-manufacturer-generate-modal.POST .../manufacturer/generate-description, gated on.../manufacturer/description-status+product_manufacturer.editoracl.Shared
frosh-ai-api.service.js(category/manufacturer status + generate).descriptionfield via post-closesetTimeout, matching the product pattern.Verification
Browser-verified end-to-end against a live Shopware 6.7.2.2 shop:
HTTP 401error banner renders inside the modal (which stays open for retry). Full UI → backend → provider pipeline confirmed working.Notes