Skip to content

TEAM 9 - AI Content Preparation Wizard - #29

Open
roromedia wants to merge 36 commits into
openeuropa:masterfrom
roromedia:master
Open

TEAM 9 - AI Content Preparation Wizard#29
roromedia wants to merge 36 commits into
openeuropa:masterfrom
roromedia:master

Conversation

@roromedia

Copy link
Copy Markdown

No description provided.

FGDumitru and others added 30 commits January 27, 2026 13:06
A 3-step wizard for preparing content from uploaded documents using
AI-assisted planning and Canvas page creation.

Features:
- Step 1: Drag & drop file upload (TXT, DOCX, PDF, MD)
- Step 2: AI-generated content plan with refinement
- Step 3: Canvas page creation with component mapping

Architecture:
- Plugin system for document processors (Pandoc, PlainText, Markdown)
- AI integration via ContentPlanGenerator service
- Canvas integration via CanvasCreator service
- Session management via PrivateTempStore
- PHP 8.1 enums for type safety

Includes:
- ADR and DDD architecture documentation
- UI/UX specification
- Drupal coding standards compliance

Co-Authored-By: claude-flow <ruv@ruv.net>
…roller

- Renamed module from content_preparation_wizard to ai_content_preparation_wizard
- Updated all namespaces, service IDs, config names, and route names
- Added missing WizardAjaxController for AJAX plan regeneration
- Updated documentation to reflect new module name

Co-Authored-By: claude-flow <ruv@ruv.net>
- Replace ctools _wizard routing with standard _form routing
- Create new ContentPreparationWizardForm.php as standard multi-step form
- Remove ctools dependency from info.yml
- Rename module display name to 'AI Content Preparation Wizard'
- Fix WizardSession method calls (setTemplateId, addProcessedDocument)

Co-Authored-By: claude-flow <ruv@ruv.net>
Remove $configFactory and $messenger from constructor as these properties
are already defined in FormBase. Use inherited $this->configFactory() and
$this->messenger() methods instead.

Co-Authored-By: claude-flow <ruv@ruv.net>
…uploads

- Add PdfToTextProcessor using poppler-utils for lightweight PDF extraction
- Add PDFTOTEXT to ProcessingProvider enum
- Fix all document processors to use ProcessedDocument::create() factory method
- Add DocumentMetadata::empty() static method
- Fix ContentPlanGenerator to handle string context IDs from form
- Fix ContentPreparationWizardForm to use public properties instead of getters
- Add markdown log saving to PandocProcessor for debugging
- Add Canvas patch to allow private:// file scheme uploads
- Add pandoc and poppler-utils to DDEV container

Co-Authored-By: claude-flow <ruv@ruv.net>
- Remove form state caching call that caused LogicException on GET requests
- Add autosave form disabled flag to prevent module interference
- Add disable-refocus to AJAX buttons to prevent focus issues
- Add limit_validation_errors to step navigation buttons
- Improve validation to check triggering element
- Add progress throbbers for better UX feedback
- Add status messages to AJAX callback

Co-Authored-By: claude-flow <ruv@ruv.net>
- Add proper wizard step indicator with active/completed states
- Implement 50/50 split layout for Step 2 with markdown preview
- Add dark-themed scrollable markdown preview panel
- Fix caret overlap on details/summary elements
- Handle AI response arrays in ContentPlanGenerator
- Scope all CSS selectors under .content-preparation-wizard

Co-Authored-By: claude-flow <ruv@ruv.net>
Reinstalled canvas module to apply all patches including the
local private file scheme patch.

Co-Authored-By: claude-flow <ruv@ruv.net>
Remove duplicate entry with old module name (content_preparation_wizard).
The correct module name is ai_content_preparation_wizard.

Co-Authored-By: claude-flow <ruv@ruv.net>
- Replace hardcoded mock context options with dynamic entity query
- Load ai_context config entities via EntityTypeManager
- Update ContentPlanGenerator to fetch context content from entities
- Add EntityTypeManagerInterface dependency to ContentPlanGenerator
- Fallback gracefully if ai_context module unavailable

Co-Authored-By: claude-flow <ruv@ruv.net>
The CanvasAiComponentDescriptionSettingsForm was passing objects
(like TranslatableMarkup) to Yaml::encode() which doesn't support
object serialization. Added sanitizeForYaml() method that recursively
converts objects to strings before YAML encoding.

Co-Authored-By: claude-flow <ruv@ruv.net>
Regenerated patches.lock.json via `composer patches-relock` to include
the new canvas-ai-yaml-object-encoding-fix.patch which fixes the
"Object support when dumping a YAML file has been disabled" error
in CanvasAiComponentDescriptionSettingsForm.

Co-Authored-By: claude-flow <ruv@ruv.net>
Removed the patch that fixed TranslatableMarkup object serialization
in CanvasAiComponentDescriptionSettingsForm as requested.

Co-Authored-By: claude-flow <ruv@ruv.net>
- Update refine() method to accept contexts parameter
- Pass selected contexts from session during plan regeneration
- Include context guidelines in refinement prompts
- Add #name='op' to Step 1 Next button to prevent file upload interference

Co-Authored-By: claude-flow <ruv@ruv.net>
- Add step indicator and wrapper class to Step3CreateForm
- Fix caret/label overlap in plan sections with custom ::before pseudo-element
- Filter out empty sections from plan display
- Fix spinner on submit buttons using wrapper element (::after doesn't work on inputs)
- Add CSS for step 3 fieldsets and ensure wizard bar visibility
- Update canvas_ai component descriptions config

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants