# Feature AI-98 - Admin UI: manage description assistant actions

Project: Stream AI
Status: in test
URL: https://community.openproject.org/work_packages/AI-98

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 18.0.0 |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Artificial Intelligence (AI) |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups | https://www.figma.com/design/8GwgqK4ejWnYJUHEM81as0/Artificial-Intelligence--AI-?node-id=354-3986 |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Ihor Khomenko |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |
| Labor costs |  |

## Description

As an OpenProject admin
I want to manage the text-transform actions of the description assistant
so that I can tailor the assistant to my organization's templates and writing standards.

## Acceptance criteria

  - In the admin section "Artificial Intelligence (AI)", a new menu entry "Text transform actions" is available (sibling of "LLM settings").
    
      - This is only visible if the feature flag `ai_text_transform_actions` is enabled (to be aligned with the feature toggle for AI/LLM from <mention class="mention" data-id="AI-3" data-type="work_package" data-text="##AI-3">##AI-3</mention> once it is merged)

  - There is a switch (eg. toggle) to enable the feature
    
      - When disabled, the admin settings (eg. creating, editing, updating, removing or re-ordering actions) is possible but they are not visible to users in CKEditor.

  - If no LLM connection is configured/enabled, a warning banner informs the admin user of this required action. *(Follow-up once <mention class="mention" data-id="AI-3" data-type="work_package" data-text="##AI-3">##AI-3</mention> is merged)*
    
      - Text: *{to be defined}*
    
      - The actions remain editable (prompts are plain configuration data).

  - **Action list:** The is a BorderBoxList of available/configured actions, with "Enable all" / "Disable all" in the list header and a primary "+ Action" button. Each one has:
    
      - a drag handle to reorder the list
    
      - a name
    
      - information about scope (eg. how many types it's enabled for)
    
      - a toggle to enable or disable the action
    
      - a more button

  - Clicking the name of the action goes to the edit screen.
    
      - PageHeader with the name of the action~~, with a more button with these actions:~~ *(renaming happens via the action name field, deleting via the list)*
        
          - ~~Rename~~
        
          - ~~Delete~~
    
      - An edit form:
        
          - Action name (required, max length: 255)
        
          - Prompt (text area, required~~; for builtin actions pre-filled with the effective prompt text~~)
        
          - ~~Model (select, required)~~ *(obsolete — the model is configured globally in <mention class="mention" data-id="AI-3" data-type="work_package" data-text="##AI-3">##AI-3</mention>)*
            
              - ~~This lists all models provided by the configured LLM, defaulting to the first item or a default (if one has been designated as default)~~
            
              - ~~If only one model is available, this select is not visible~~
        
          - Scope selector
            
              - By default, an action is available everywhere (as in, full scope)
            
              - *\[decided\]* The scope can be limited to "All work package types" or "Specific work package types"; further areas (comments, wiki, long text custom fields, meeting notes...) can be added as new scope values later.
            
              - *\[decided\]* For "Specific work package types", types are selected via a select panel; all variants of a type are included automatically.
        
          - "Insert work package type template" checkbox, only available for the work package scopes. When checked, the type's description template is added to the prompt; the prompt should contain instructions on what to do with it.
        
          - ~~Active checkbox~~
            
              - *\[decided\]* Not necessary; enabling/disabling happens in the list of actions.

  - The more button has these actions:
    
      - Edit action
    
      - *(separator)*
    
      - Move to top
    
      - Move up
    
      - Move down
    
      - Move to bottom
    
      - *(separator)*
    
      - Delete action

  - ~~For default actions (that ship built-in), there is a "Reset to default" button on the header~~ *(obsolete — the seeded defaults are plain records without built-in tracking, see <mention class="mention" data-id="AI-96" data-type="work_package" data-text="##AI-96">##AI-96</mention>)*
    
      - ~~The admin user is shown a ConfirmationDialog~~
    
      - ~~This restores the action to its initial setting (including prompt and scope)~~

  - ~~Builtin actions cannot be deleted, only deactivated. Custom actions can be deleted (with confirmation).~~ All actions can be deleted (with confirmation).

  - Related:
    
      - A preview function will be implemented with <mention class="mention" data-id="AI-99" data-type="work_package" data-text="##AI-99">##AI-99</mention>

  - There is a primary "Save" action at the bottom of the page

  - ~~The builtin action "Sort into template" shows an informational hint that its availability additionally depends on the work package type having a default description template, with a link to the types administration.~~

  - Changes are effective immediately for subsequent action listings (no caching requirements).

## Technical notes

  - Modern admin stack: `layout "admin"`, Primer ViewComponents, `ApplicationForm` (see `app/forms/admin/settings/color_form.rb` as reference), Turbo where useful (`OpTurbo::ComponentStream`).

  - Menu registration in `config/initializers/menus.rb` under the AI parent (`:ai`), route namespace `/admin/text_transform_actions`.

  - Feature toggle as a Setting (`Settings::Definition`): `ai_text_transform_actions_enabled`. The UI itself is gated by the feature flag `ai_text_transform_actions` (`OpenProject::FeatureDecisions`) until release.

## Permissions and visibility considerations

  - Admins only (`before_action :require_admin`).

  - Whether the feature is Enterprise-gated is an open product decision tracked on the epic; the implementation should make gating trivial to add (single guard).

## Translation considerations

  - All UI strings translatable. Seeded action labels are translated via the seeder mechanism; admin-entered labels and prompts are not translated.

  - "LLM" is not translated (consistent with AI-3).

## Out of scope

  - Testing sandbox (separate feature)

  - Grouping, icons, drag & drop beyond simple reordering

  - Import/export of actions

  - Per-project actions

  - Model selection per action (handled globally in <mention class="mention" data-id="AI-3" data-type="work_package" data-text="##AI-3">##AI-3</mention>)
