Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UI] Not load the AI extensions if the plugin is not properly installed and configured #26556

Closed
Tracked by #26495
oidacra opened this issue Oct 27, 2023 · 7 comments · Fixed by #27006
Closed
Tracked by #26495

Comments

@oidacra
Copy link
Member

oidacra commented Oct 27, 2023

Parent Issue

#26495

User Story

As a user, I want the AI Plugin for the Block Editor to not load if it's not properly installed and configured, ensuring a smooth and error-free experience in the content editing environment.

Acceptance Criteria

  • The AI content and image nodes should not appear in the Block Editor if the AI plugin it is not correctly installed and configured.
  • The Block Editor should function normally without any disruption or errors due to the AI Plugin not loading.

dotCMS Version

master

Proposed Objective

User Experience

Proposed Priority

Priority 2 - Important

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

to_define

Assumptions & Initiation Needs

  • Assumption that the plugin has a mechanism to check its installation and configuration status.
  • Need for clear documentation on proper installation and configuration steps for the AI Plugin.

Quality Assurance Notes & Workarounds

to_define

Depend of #26723

@oidacra
Copy link
Member Author

oidacra commented Nov 16, 2023

Can we use the endpoint directly and if we get a 404 assume the plugin is not installed?. @john-thomas-dotcms @dsilvam

@john-thomas-dotcms
Copy link
Contributor

Yes, anything we can do to reliably determine if the plugin is installed. But we need to make sure it doesn't cause an error in the log if the plugin isn't installed - it should just fail silently.

@oidacra
Copy link
Member Author

oidacra commented Nov 16, 2023

@hmoreras we need to do a small test for this.

@oidacra oidacra self-assigned this Dec 12, 2023
@oidacra
Copy link
Member Author

oidacra commented Dec 13, 2023

We use api/v1/ai/image/test to detect if the plugin is installed. This does not validate if the plugin has the key. We will handle that with an error(retrieve a 500 status). @john-thomas-dotcms @dsilvam

github-merge-queue bot pushed a commit that referenced this issue Dec 14, 2023
…I Extensions in Block Editor (#27006)

* feat(block-editor) detect if the AI plugin is installed and turn on/off load AI Extensions

* feat(block-editor) fix comments

* feat(block-editor) rebase from master, rebuild block-editor file
@hmoreras hmoreras reopened this Jan 3, 2024
@hmoreras
Copy link
Contributor

hmoreras commented Jan 4, 2024

QA notes:

  1. Add the package com.barchart.udt in the Exported Packages button in the plugin portlet.
  2. Install the last version of the AI plugin.
  3. Add the token key in the apps configuration portlet.
  4. Create a content that has a block editor on it, or use one that already have it like BLOG.
  5. In the Editor type /ai.
  6. AI Content and AI image should be present.
  7. Remove the plugin.
  8. Go to the content an in the editor try to filter by ai like spep 4.
  9. nodes should not be present.

@dsilvam
Copy link
Contributor

dsilvam commented Jan 8, 2024

Passed Internal QA: AI Options not showing when plugin is either stopped or removed.

@josemejias11
Copy link
Contributor

Approved: Tested on master_52eaaa9, Docker, macOS 13.0, FF v121.0.1
AI extension not showing after the plugin was stoped.
Screenshot 2024-01-23 at 9 05 49 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment