Content
View differences
Updated by Dominic Bräunlein 5 days ago
**As** a user
**I want to** preview suggested AI action results before applying them
**so that** I can verify the changes and understand the scope of the AI's input before committing to the update.
**Acceptance criteria**
* When an AI-Action is triggered from the CKEditor, the AI result popover should be displayed.
* The AI result popover pane shows the triggered action as title and is displayed on the upper right corner underneath the OpenProject toolbar, as shown in the designs asa tite
* The AI result popover pane must display context information indicating the scope of the input used (e.g., "Selected text" or "Work package "Whole description").
* The pane must include a "Replace" button to apply the suggested changes.
* A "Generating..." information must be visible while the LLM is processing the request.
* When generating was successful, the popover must show:
* A "Replace" button to apply the suggested changes.
* When the context is "selected text" only the selected text should be replaced
* When the context is the whole description, all text in the editor should be replaced
* A "Discard" button that closes the AI result popover without any changes applied
* A "Copy" button that copies the generated text into the users clipboard
* A "Cancel" button must be available to stop the operation while the LLM is processing.
* ~~The AI result pane must function as a draggable overlay, allowing the user to move it around the screen to view underlying OpenProject UI elements.~~
* The updates of the LLM LM generation should be shown into the result pane as they are developed.
* If the LLM returns an error, the pane must display a clear error message informing the user that the operation failed.
* The Result popover Pane needs to deal with canceled streams when e.g. guardrails block further generation. As a result of a canceled stream, the already displayed content needs to be removed and a error message shown.
<br>
<br>
**Technical details** <br>
* The AI Result popover should be build on top of the popover. See:
<br>
https://qa.openproject-edge.com/lookbook/inspect/primer/beta/popover/playground
**Out of scope**
* Diff view
* Resizing and moving result pane freely
* Animated loading icon
* Global toolbar icon
<br>
**Design positioning**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/924224/content">**
**Design generating**
**<img class="image_resized op-uc-image op-uc-image_inline" style="width:477px;" src="/api/v3/attachments/924222/content">**
<br>
**Design done**
**<img class="image_resized op-uc-image op-uc-image_inline" style="width:488px;" src="/api/v3/attachments/924223/content">**
**Design errors**
<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><figure class="image image_resized op-uc-figure" style="width:509px;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/924225/content"></div></figure></td><td class="op-uc-table--cell"><figure class="image image_resized op-uc-figure" style="width:428px;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/924226/content"></div></figure></td></tr></tbody></table></figure>
**Design text selected**
<img class="image_resized op-uc-image op-uc-image_inline" style="width:436px;" src="/api/v3/attachments/924227/content">
**I want to** preview suggested AI action results before applying them
**so that** I can verify the changes and understand the scope of the AI's input before committing to the update.
**Acceptance criteria**
* When an AI-Action is triggered from the CKEditor, the AI result popover should be displayed.
* The AI result popover
* The AI result popover
*
*
* When generating was successful, the popover must show:
* A "Replace" button to apply the suggested changes.
* When the context is "selected text" only the selected text should be replaced
* When the context is the whole description, all text in the editor should be replaced
* A "Discard" button that closes the AI result popover without any changes applied
* A "Copy" button that copies the generated text into the users clipboard
* A "Cancel" button must be available to stop the operation while the LLM is processing.
* ~~The AI result pane must function as a draggable overlay, allowing the user to move it around the screen to view underlying OpenProject UI elements.~~
* The updates of the LLM
* If the LLM returns an error, the pane must display a clear error message informing the user that the operation failed.
* The Result popover
<br>
<br>
**Technical details**
* The AI Result popover should be build on top of the popover. See:
<br>
https://qa.openproject-edge.com/lookbook/inspect/primer/beta/popover/playground
**Out of scope**
* Diff view
* Resizing and moving result pane freely
* Animated loading icon
* Global toolbar icon
<br>
**Design positioning**
**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/924224/content">**
**Design generating**
**<img class="image_resized op-uc-image op-uc-image_inline" style="width:477px;" src="/api/v3/attachments/924222/content">**
<br>
**Design done**
**<img class="image_resized op-uc-image op-uc-image_inline" style="width:488px;" src="/api/v3/attachments/924223/content">**
**Design errors**
<figure class="table op-uc-figure_align-center op-uc-figure"><table class="op-uc-table"><tbody><tr class="op-uc-table--row"><td class="op-uc-table--cell"><figure class="image image_resized op-uc-figure" style="width:509px;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/924225/content"></div></figure></td><td class="op-uc-table--cell"><figure class="image image_resized op-uc-figure" style="width:428px;"><div class="op-uc-figure--content"><img class="op-uc-image" src="/api/v3/attachments/924226/content"></div></figure></td></tr></tbody></table></figure>
**Design text selected**
<img class="image_resized op-uc-image op-uc-image_inline" style="width:436px;" src="/api/v3/attachments/924227/content">