10up / classifai

Supercharge WordPress Content Workflows and Engagement with Artificial Intelligence.
https://classifaiplugin.com
GNU General Public License v2.0
577 stars 53 forks source link

Preserve existing data & provide rollbacks #590

Open jeffpaul opened 1 year ago

jeffpaul commented 1 year ago

Is your enhancement related to a problem? Please describe.

ClassifAI has several features that when triggered (either by a purposed human action or via other publishing/editing workflows) could overwrite existing post content/meta (e.g., post classification, image tags, bulk & CLI ClassifAI interactions). This focus will look at potentially changing the default handling in these scenarios to not overwrite existing content or perhaps requiring a purposeful human interaction to denote a desire to overwrite existing content (and a filter to be able to change the ClassifAI default handling). That override could be at a post level, or at the plugin/site level, or perhaps a blend of both.

Similarly, any change that ClassifAI makes to post content/meta will be stored as a new Revision to that post so that a user could utilize the WordPress built-in revisions editor to roll back any unwanted Assistive AI edits to content/meta.

The Post Meta Revisions is relatively achievable, but the Meta and Taxonomy Term Revisions is not quite as clear on feasibility and approach and will require some research before implementation to ensure a stable result.

Designs

n/a

Describe alternatives you've considered

n/a

Code of Conduct

dkotter commented 12 months ago

Recent post about storing post meta in revisions: https://make.wordpress.org/core/2023/10/24/framework-for-storing-revisions-of-post-meta-in-6-4/

jeffpaul commented 12 months ago

There's also a post from earlier this summer about the broad work across Revisions coming in Gutenberg Phase 3: https://make.wordpress.org/core/2023/07/05/revisions/

jeffpaul commented 12 months ago

In considering all the various ClassifAI features that take immediate action without allowing for human review before saving to post content/meta, let's first focus on the Post Classification feature that's best expressed in #566.

Once that's updated, we can next consider re-generating excerpts and generating alt text in a later phase. After that we can consider if we want to continue these updates across the remaining features that do not yet allow for human review:

So essentially let's consider 566 as the primary focus related to:

ClassifAI has several features that when triggered (either by a purposed human action or via other publishing/editing workflows) could overwrite existing post content/meta (e.g., post classification, image tags, bulk & CLI ClassifAI interactions). This focus will look at potentially changing the default handling in these scenarios to not overwrite existing content or perhaps requiring a purposeful human interaction to denote a desire to overwrite existing content (and a filter to be able to change the ClassifAI default handling). That override could be at a post level, or at the plugin/site level, or perhaps a blend of both.

...and then look to open a separate issue to handle the additional features in a later iteration.

iamdharmesh commented 10 months ago

@jeffpaul Please find information on data storage and revision support for ClassifAI features. Revision support is currently determined based on the availability of the core's revision feature. I have raised issue #626 to add the autosave feature to title generation and content resizing, which will enable the tracking of every change made by ClassifAI. We can then rollback using WordPress core's default revision support.

For features marked with no revision support, we may need customization to add revision/rollback support. Please let me know if we want to proceed with checking potential solutions and adding revision/rollback support for these features.

image

Thank you cc: @dkotter

jeffpaul commented 10 months ago

Here's a tracking issue for Gutenberg on Revisions UX updates, but I don't think anything here improves our ability to add revision support on additional ClassifAI features: https://github.com/WordPress/gutenberg/issues/55776

jeffpaul commented 10 months ago

Re-opening to tackle additional Revisions-based integrations as those become available in core though moving this to Future Release as there's no immediate action possible.