Improve UX in Automators Tool add form (help text and workflow field behavior)
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3586382. --> Reported by: [cadence96](https://www.drupal.org/user/3520894) >>> <p>[Tracker]<br> <strong>Update Summary: </strong>Improve UX in Automators Tool add form.<br> <strong>Short Description: </strong>Add help text and improve field behavior in Automators Tool form.<br> <strong>Check-in Date: </strong>04/22/2026<br> <em>Metadata is used by the <a href="https://www.drupalstarforge.ai/" title="AI Tracker">AI Tracker.</a> Docs and additional fields <a href="https://www.drupalstarforge.ai/ai-dashboard/docs" title="AI Issue Tracker Documentation">here</a>.</em><br> [/Tracker]</p> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The UX of the Automators Tool creation form (<code>/admin/config/ai/ai-automators/automators_tool/add</code>) can be improved to reduce confusion and guide users more effectively.</p> <p>The following issues were identified:</p> <ul> <li><strong>Description field</strong> does not include help text, leaving users without guidance on what to enter.<br><img width="400" height="auto" src="https://www.drupal.org/files/issues/2026-04-22/1-description-without-help-text.png"></li> <li>The <strong>"Choose workflow first"</strong> section is clickable even when the <strong>Workflow</strong> field is empty. However, it requires a selected workflow to function properly. This creates a confusing interaction.<br><img width="400" height="auto" src="https://www.drupal.org/files/issues/2026-04-22/2-choose-workflow-first-clickable-but-empty.png"> </li> <li>The <strong>Workflow</strong> field: <ul> <li>Is an autocomplete field but does not indicate that at least <strong>3 characters</strong> are required to trigger suggestions.<br><img width="400" height="auto" src="https://www.drupal.org/files/issues/2026-04-22/3-autocomplete-does-not-indicate-3-characters-required.png"></li> <li>Does not explain that workflows must exist beforehand.</li> <li>Does not mention that workflows require the <strong>AI Agents</strong> module.<br><img width="400" height="auto" src="https://www.drupal.org/files/issues/2026-04-22/4-cant-create-workflow-when-ai-agents-is-not-enabled.png"></li> <li>Does not provide a direct link or guidance on where to create workflows.</li> </ul> </li> </ul> <p>These gaps may lead to user confusion, especially for first-time users configuring AI Automators.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Update <code>AutomatorsToolForm</code> (<code>web/modules/contrib/ai/modules/ai_automators/src/Form/AutomatorsToolForm.php</code>) to:</p> <ul> <li>Add help text to the <strong>Description</strong> field: <ul> <li>Explain that it is used as an administrative description and may be consumed by AI.</li> </ul> </li> <li>Improve the <strong>Workflow</strong> field help text: <ul> <li>Indicate that at least 3 characters are required to search.</li> <li>Clarify that workflows must be created beforehand.</li> <li>Mention that the <strong>AI Agents</strong> module is required.</li> <li>Provide a link to <code>/admin/config/ai/automator_chain_types/add</code>.</li> </ul> </li> <li>Use <strong>Drupal States API</strong> to control visibility of the <strong>"Choose workflow first"</strong> section: <ul> <li>Hide or disable it when the <strong>Workflow</strong> field is empty.</li> <li>Only display it once a valid workflow is selected.</li> </ul> </li> </ul> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ul> <li>Implement help text additions.</li> <li>Add Drupal States logic to control field visibility.</li> <li>Test UX behavior with and without workflows available.</li> <li>Validate behavior with and without AI Agents module enabled.</li> </ul> <h3>Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)</h3> <p>This change improves usability without affecting existing data structures or APIs. It is a non-breaking UX enhancement.</p> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[x] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[ ] AI Assisted Code<br> [ ] AI Generated Code<br> [ ] Vibe Coded</p>
issue