# Feature AI-99 - Admin UI: Prompt testing sandbox in admin UI

Project: Stream AI
Status: new
URL: https://community.openproject.org/work_packages/AI-99

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | Product Backlog |
| 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 |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Jonas Jabari |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/923083/content">

As an OpenProject admin  
I want to test an action&#x27;s prompt against sample text directly in the admin UI  
so that I can iterate on prompts before activating them for users.

## Acceptance criteria

*   The action edit form contains a &quot;Test&quot; panel with:
    
    *   a textarea for sample input text
        
    *   for actions restricted to types (and for &quot;Sort into template&quot;): a work package type selector, so the server can inject that type&#x27;s template during the test
        
    *   a &quot;Run test&quot; button
        
*   Running a test uses the **current form state** of the prompt (unsaved changes included), so admins can iterate without saving.
    
*   The result is displayed rendered as formatted text, with a toggle to view the raw markdown.
    
*   Optionally (collapsible), the final assembled request is shown (system scaffold + action prompt + injected template) — valuable for understanding why a prompt behaves as it does.
    
*   Errors from the LLM connection (unreachable, timeout, invalid key) are shown inline in the panel; they do not block saving the form.
    
*   Nothing is persisted: no work package is touched, no log entry with content is stored.
    
*   The panel is disabled with a hint when no LLM connection is configured or the global AI toggle is off.
    

## Technical notes

*   Reuses the server-side prompt assembly of the text transform API (same code path — the sandbox is effectively the transform endpoint with a dry-run input) and the LLM client from AI-3. Avoid a parallel implementation.
    
*   Synchronous request with a strict timeout is acceptable here (admin-only, low volume), regardless of the sync-vs-job decision for the end-user path.
    

## Permissions and visibility considerations

*   Admins only (part of the admin form).
    

## Translation considerations

*   UI strings translatable; sample text and results are not.
    

## Out of scope

*   Automated prompt regression testing (openproject-llm-evals, see separate task)
    
*   Test history / saved test cases
