31 KiB
Chat Playground Page Requirements
This document contains the complete frontend requirements for the chat playground page and workflow management components. All UI components are dynamically generated from backend metadata—no hardcoding required.
Table of Contents
- Overview
- Page Structure and Layout
- User Interactions and Functionality
- Backend Routes and API Integration
- Field and Attribute Reference
- Dynamic Rendering Guidelines
Overview
The chat playground page enables users to create, manage, and track AI-powered workflows that process user requests through task planning and action execution. The frontend consists of a single page (/chat-playground or /workflows/playground) with different views/states:
- Input View - Start new workflows or continue existing ones with prompt input, mode selection, and file attachments
- Workflow View - Live tracking of workflow execution with messages, logs, and statistics
- Workflow History View - View completed workflows with full message history
All views use backend-driven UI generation, meaning field definitions, labels, validation rules, and UI structure come entirely from backend metadata through the /api/attributes/ChatWorkflow and /api/attributes/UserInputRequest endpoints. Views are managed through component state and routing within the same page, not as separate routes.
Note: Workflows are user-scoped. Users can only see and manage their own workflows. The backend enforces this security.
Page Structure and Layout
Chat Playground Page (/chat-playground or /workflows/playground)
The chat playground page uses different views/states to handle different user interactions. Views are managed through component state and routing within the same page component.
Input View
State: view === 'input' or selectedWorkflowId === null (starting new workflow)
What the user sees:
-
Main Content Area:
- Chat input form with the following components:
- Workflow Dropdown - Select previous workflow to continue (optional, shows "New Workflow" by default)
- Prompt Dropdown - Select saved prompt template (optional)
- Prompt Text Input - Multi-line text area for user input (required)
- Workflow Mode Selector - Radio buttons or tabs for Actionplan, Dynamic, or Template (required)
- Neutralization Toggle - Checkbox/toggle to enable/disable data neutralization (optional)
- File Attachment Area - Drop zone with drag-and-drop support, plus "Attach File" button and "Browse Files" button
- Action Buttons:
- "Start Workflow" button (when no workflow selected)
- "Continue Workflow" or "Send" button (when workflow selected)
- Chat input form with the following components:
-
File Attachment Display:
- List of attached files with preview (name, size, type)
- Remove button for each attached file
- Visual feedback for drag-and-drop (highlight, border, overlay when dragging)
-
Workflow Context Display (when workflow selected):
- Previous messages from selected workflow displayed in chat view
- Workflow status indicator
- Workflow mode pre-selected from selected workflow
Workflow View
State: view === 'workflow' and selectedWorkflowId !== null (active workflow tracking)
What the user sees:
-
Main Content Area:
-
Chat Interface:
- Message history displayed chronologically
- User messages and assistant responses
- File attachments displayed as part of each message
- Each file attachment shows:
- File name, size, and type/icon
- Action buttons: "Show", "Download", "Delete"
- File preview (if applicable) when "Show" is clicked
- Auto-scroll to latest message (optional, user can disable)
-
Log Panel (optional, can be toggled):
- Execution logs displayed chronologically
- Log level indicators (info, warning, error)
- Timestamps for each log entry
-
Statistics Panel (optional, can be toggled):
- Performance metrics
- Task completion status
- Execution time
-
Workflow Status Indicator:
- Current workflow status (running, completed, stopped, failed)
- Visual status badge with color coding
- Neutralization indicator (if enabled)
-
-
Action Buttons:
- "Stop" button (when workflow is running)
- "Delete Message" button (on individual messages)
- File Action Buttons (on each file attachment in messages):
- "Show" button - Opens file preview/viewer
- "Download" button - Downloads file to user's device
- "Delete" button - Removes file from message (with confirmation)
- "Back to Input" button (return to input view)
-
Live Updates:
- Real-time polling for new messages, logs, and statistics
- Visual indicators for new content
- Automatic UI updates without page refresh
User Interactions and Functionality
Starting a New Workflow
Workflow Selection:
- User sees workflow dropdown with "New Workflow" as default option
- Dropdown shows list of previous workflows (name, status, last activity)
- Selecting "New Workflow" clears any selected workflow context
- Selecting a previous workflow loads its context (messages, mode)
Prompt Selection:
- User can optionally select a saved prompt from dropdown
- Selecting a prompt pre-fills the prompt text field
- User can still edit the pre-filled text
- Prompt selection is optional
Workflow Mode Selection:
- User must select one of three modes:
- Actionplan - Traditional task planning (shows description on selection)
- Dynamic - Iterative dynamic-style processing (shows description on selection)
- Template - Template-based processing (shows description on selection)
- Mode selection is required before starting workflow
- Visual indicator shows selected mode
Neutralization Toggle:
- User can toggle neutralization on/off
- Frontend checks neutralization config status
- If config exists and enabled, neutralization is enabled for workflow
- If config disabled or not found, neutralization is disabled
- User can configure neutralization settings on separate settings page
- Toggle shows current state (enabled/disabled indicator)
File Attachment:
-
Drag and Drop:
- User drags files over drop zone
- Visual feedback shown (highlight, border, overlay)
- User drops files onto drop zone
- Files processed and uploaded automatically
- File preview shown immediately
-
Button Upload:
- User clicks "Attach File" or "Upload File" button
- File picker dialog opens
- User selects files from device
- Files uploaded and preview shown
-
Browse Existing Files:
- User clicks "Browse Files" or "Select File" button
- File browser/selector opens with paginated file list
- User selects existing files
- Selected files added to attachment list
-
File Management:
- Attached files shown in list with name, size, type
- Remove button for each file
- Multiple files can be attached
- Files validated before upload (size limits, type restrictions)
Form Validation:
- Required fields: prompt text, workflow mode
- Optional fields: prompt selection, neutralization, files
- Validation errors shown inline
- Form cannot be submitted until required fields are filled
Workflow Submission:
- User clicks "Start Workflow" button
- Form validates (required fields, types, workflowMode)
- If validation fails, show errors
- If validation passes:
- Build UserInputRequest with prompt, listFileId (if files attached), userLanguage
- Show loading state
- Submit to
/api/chat/playground/startwith workflowMode query param - On success: Navigate to workflow view, start polling
- On error: Show error message, revert optimistic updates
Continuing an Existing Workflow
Workflow Selection:
- User selects previous workflow from dropdown
- Frontend loads workflow data via
GET /api/workflows/workflowId - Previous messages displayed in chat view
- Workflow mode pre-selected from selected workflow
- Selected workflow name/ID shown
Additional Input:
- User can optionally select a prompt (pre-fills text)
- User enters or edits prompt text
- User can toggle neutralization
- User can attach files (same methods as starting new workflow)
Workflow Continuation:
- User clicks "Continue" or "Send" button
- Form validates (required fields)
- If validation passes:
- Build UserInputRequest with prompt, listFileId (if files attached)
- Show optimistic update (add user message to UI)
- Submit to
/api/chat/playground/startwith workflowId and workflowMode query params - On success: Continue polling, update workflow view
- On error: Revert optimistic update, show error
Live Tracking Workflow Progress
Polling Mechanism:
- Start polling when workflow view is active
- Poll interval: every 2 seconds (configurable)
- Poll endpoint:
GET /api/chat/playground/{workflowId}/chatData - Use
afterTimestampquery param for selective data transfer
Data Updates:
- Compare new data with existing data
- If new data available:
- Append new messages to chat view
- Append new logs to log panel
- Update statistics display
- Update workflow status indicator
- Scroll to latest content (if auto-scroll enabled)
- If no new data, continue polling silently
Polling Control:
- Stop polling when workflow status is "completed", "stopped", or "failed"
- Stop polling when user navigates away
- Show final status when workflow completes
- Handle errors gracefully (404 stops polling, shows error)
Visual Feedback:
- Loading indicators during polling
- New content indicators
- Status change animations
- Progress indicators for long-running workflows
Stopping a Running Workflow
Stop Action:
- User clicks "Stop" button (only visible when workflow is running)
- Confirmation dialog appears: "Stop this workflow?"
- User can cancel or confirm
Stop Submission:
- If user confirms:
- Show optimistic update (status to "stopping")
- Submit to
POST /api/chat/playground/{workflowId}/stop - On success: Stop polling, update UI with stopped status
- On error: Revert optimistic update, show error
Viewing Files in Messages
Show File:
- User clicks "Show" button on file attachment in message
- Frontend fetches file data via
GET /api/files/{fileId}/downloador preview endpoint - File preview/viewer opens (modal, sidebar, or inline)
- Preview supports different file types:
- Images → Display image viewer
- PDFs → Display PDF viewer
- Text files → Display text content
- Other types → Show file info or download prompt
- User can close preview to return to message view
Download File:
- User clicks "Download" button on file attachment in message
- Frontend triggers download via
GET /api/files/{fileId}/download - Browser automatically downloads file with proper filename
- File name properly encoded for Unicode characters
- Handle 403 (permission denied) and 404 (file not found) errors
Deleting Context from a Workflow
Delete Message:
- User clicks "Delete" button on message
- Confirmation dialog: "Delete this message? This will remove it from the workflow context."
- If user confirms:
- Show optimistic update (remove message from UI)
- Submit to
DELETE /api/workflows/{workflowId}/messages/{messageId} - On success: Keep optimistic update, refresh workflow data
- On error: Revert optimistic update, show error
Delete File from Message:
- User clicks "Delete" button on file attachment in message
- Confirmation dialog: "Delete this file? This will remove it from the message context."
- If user confirms:
- Show optimistic update (remove file from UI)
- Submit to
DELETE /api/workflows/{workflowId}/messages/{messageId}/files/{fileId} - On success: Keep optimistic update, refresh message data
- On error: Revert optimistic update, show error
Backend Routes and API Integration
Complete Route Reference
All backend routes used by chat playground pages:
| Route | Method | Purpose | When Used | Access Control |
|---|---|---|---|---|
/api/chat/playground/start |
POST | Start new workflow or continue existing | User clicks "Start Workflow" or "Continue" | Current user only |
/api/chat/playground/{workflowId}/stop |
POST | Stop running workflow | User clicks "Stop" button | Current user only |
/api/chat/playground/{workflowId}/chatData |
GET | Get unified chat data for polling | Live tracking (polling every 2 seconds) | Current user only |
/api/workflows/ |
GET | Get all workflows for current user | Load workflow dropdown, initial page load | Current user only |
/api/workflows/{workflowId} |
GET | Get workflow by ID | User selects workflow from dropdown | Current user only |
/api/workflows/{workflowId}/messages/{messageId} |
DELETE | Delete message from workflow | User confirms message deletion | Current user only |
/api/workflows/{workflowId}/messages/{messageId}/files/{fileId} |
DELETE | Delete file from message | User confirms file deletion | Current user only |
/api/prompts |
GET | Get all prompts for current user | Load prompt dropdown | Current user only |
/api/prompts/{promptId} |
GET | Get prompt by ID | User selects prompt from dropdown | Current user only |
/api/files/upload |
POST | Upload new file | User drags/drops or clicks upload | Current user only |
/api/files/list |
GET | Get all files for current user | User clicks "Browse Files" | Current user only |
/api/files/{fileId}/download |
GET | Download file | User clicks "Download" button on file | Current user only |
/api/neutralization/config |
GET | Get neutralization config | User toggles neutralization | Current user only |
/api/attributes/ChatWorkflow |
GET | Get field definitions | Page load (once per page) | All authenticated users |
/api/attributes/UserInputRequest |
GET | Get field definitions | Page load (once per page) | All authenticated users |
API Request Patterns
Start Workflow Request:
POST /api/chat/playground/start?workflowMode=Dynamic
Content-Type: application/json
Body: {
"prompt": "User prompt text here...",
"listFileId": ["fileId1", "fileId2"],
"userLanguage": "en"
}
workflowModequery parameter is required: "Actionplan", "Dynamic", or "Template"workflowIdquery parameter is optional (for continuing existing workflow)listFileIdarray contains file IDs to attach (optional)promptfield contains user's prompt text (required)userLanguageshould match user's preferred language- Handle 403 (permission denied) and 400 (validation errors)
Continue Workflow Request:
POST /api/chat/playground/start?workflowId=workflow-id&workflowMode=Dynamic
Content-Type: application/json
Body: {
"prompt": "Additional prompt text...",
"listFileId": ["fileId1"],
"userLanguage": "en"
}
workflowIdquery parameter is required (ID of workflow to continue)workflowModequery parameter is required (from selected workflow)- Same body structure as start workflow
- Handle 403, 404 (workflow not found), and 400 errors
Stop Workflow Request:
POST /api/chat/playground/{workflowId}/stop
- No body required
- Returns updated ChatWorkflow with status "stopped"
- Handle 403 (permission denied) and 404 (workflow not found)
Get Chat Data Request (Polling):
GET /api/chat/playground/{workflowId}/chatData?afterTimestamp=1234567890.123
afterTimestampquery parameter is optional (Unix timestamp for selective data transfer)- Returns unified chat data:
{messages: [], logs: [], stats: []} - Data is chronologically ordered by
_createdAttimestamp - Handle 404 (workflow not found) - stop polling
Get Workflows Request:
GET /api/workflows/
- Returns paginated workflows list
- Can include pagination parameter:
?pagination={"page":1,"pageSize":10,"sort":[]} - Used to populate workflow dropdown
- Returns only current user's workflows
Get Workflow Request:
GET /api/workflows/{workflowId}
- Returns full workflow data including messages, logs, stats
- Used when user selects workflow from dropdown
- Handle 404 (workflow not found)
Upload File Request:
POST /api/files/upload
Content-Type: multipart/form-data
Body: {
file: <file data>,
workflowId: "optional-workflow-id" (optional)
}
- File sent as multipart/form-data
workflowIdis optional form field- Handle 403 (permission denied), 413 (file too large), and 400 (validation errors)
- Response includes duplicate information
Get Prompts Request:
GET /api/prompts
- Returns paginated prompts list
- Used to populate prompt dropdown
- Returns only current user's prompts
Get Prompt Request:
GET /api/prompts/{promptId}
- Returns prompt details (name, content)
- Used when user selects prompt from dropdown
- Handle 404 (prompt not found)
Get Neutralization Config Request:
GET /api/neutralization/config
- Returns neutralization configuration (enabled status, settings)
- Used when user toggles neutralization
- Returns default config if none exists
Delete Message Request:
DELETE /api/workflows/{workflowId}/messages/{messageId}
- Deletes message from workflow
- Updates workflow's messageIds list
- Handle 403 (permission denied) and 404 (message not found)
Download File Request:
GET /api/files/{fileId}/download
- Returns file content with Content-Disposition header
- Browser automatically triggers download
- Filename properly encoded for Unicode characters
- Handle 403 (permission denied) and 404 (file not found)
Delete File Request:
DELETE /api/workflows/{workflowId}/messages/{messageId}/files/{fileId}
- Deletes file reference from message
- Handle 403 (permission denied) and 404 (file not found)
Response Handling
Start/Continue Workflow Response:
{
"id": "workflow-id",
"status": "running",
"workflowMode": "Dynamic",
"messages": [...],
"logs": [...],
"stats": [...],
...
}
- Returns ChatWorkflow object with status "running"
- Includes all workflow data
Chat Data Response (Polling):
{
"messages": [
{
"id": "message-id",
"role": "user",
"content": "...",
"_createdAt": 1234567890.123,
...
}
],
"logs": [
{
"id": "log-id",
"level": "info",
"message": "...",
"_createdAt": 1234567890.124,
...
}
],
"stats": [
{
"id": "stat-id",
"metric": "...",
"value": 123,
"_createdAt": 1234567890.125,
...
}
]
}
- All data types in chronological order by
_createdAt - Empty arrays if no new data
Error Responses:
- 403 Forbidden → Show permission error message
- 404 Not Found → Show "not found" error message
- 400 Bad Request → Display validation errors from response
- 413 Request Entity Too Large → Show file size error
- 500 Internal Server Error → Show generic error message
Field and Attribute Reference
Complete Field List
The following is a comprehensive list of all parameters, attributes, and fields that will be displayed for workflows and user input. All of these are provided by the backend through the /api/attributes/ChatWorkflow and /api/attributes/UserInputRequest endpoints and should never be hardcoded in the frontend.
ChatWorkflow Fields
Identification Fields:
id- Unique workflow identifier (text, readonly, not required, visible)mandateId- ID of the mandate this workflow belongs to (text, readonly, not required, visible)name- Workflow name (text, editable, not required, visible)
Workflow Properties:
status- Workflow status (select, readonly, not required, visible)- Options: "running", "completed", "stopped", "failed"
- Each option has localized labels (en/fr)
workflowMode- Execution mode (select, readonly, not required, visible)- Options: "Actionplan", "Dynamic", "Template"
- Each option has localized labels (en/fr)
currentRound- Current user interaction round (number, readonly, not required, visible)currentTask- Current task in task plan (number, readonly, not required, visible)currentAction- Current action within task (number, readonly, not required, visible)totalTasks- Number of tasks in task plan (number, readonly, not required, visible)totalActions- Number of actions in current task (number, readonly, not required, visible)maxSteps- Maximum steps for Dynamic mode (number, readonly, not required, visible)
Timestamp Fields:
startedAt- When workflow was created (timestamp, readonly, not required, visible)lastActivity- Last activity timestamp (timestamp, readonly, not required, visible)
Related Data:
messages- List of ChatMessage objects (array, readonly, not required, visible)logs- List of ChatLog objects (array, readonly, not required, visible)stats- List of ChatStat objects (array, readonly, not required, visible)tasks- List of task objects (array, readonly, not required, visible)
UserInputRequest Fields
Input Fields:
prompt- User prompt text (textarea, editable, required, visible)listFileId- Array of file IDs to attach (array, editable, not required, visible)userLanguage- User's preferred language (select, editable, not required, visible)- Options: "en", "fr", etc.
- Each option has localized labels
Prompt Fields
Prompt Properties:
id- Unique prompt identifier (text, readonly, not required, visible)mandateId- ID of the mandate this prompt belongs to (text, readonly, not required, visible)name- Prompt name (text, readonly, not required, visible)content- Prompt content (textarea, readonly, not required, visible)
Attribute Definition Structure
Each field returned from /api/attributes/ChatWorkflow and /api/attributes/UserInputRequest contains:
name- Field name (e.g., "status", "workflowMode", "prompt", "listFileId")type- Field data type (e.g., "text", "select", "textarea", "array", "timestamp", "number")label- Localized field label (object with language keys: {"en": "English Label", "fr": "French Label"})description- Field description textrequired- Boolean indicating if field is requiredreadonly- Boolean indicating if field is read-onlyeditable- Boolean indicating if field can be edited (inverse of readonly)visible- Boolean indicating if field should be displayed in UIoptions- Array of options for select fields (each option hasvalueand localizedlabel)
Dynamic Rendering Guidelines
The frontend must render all UI components dynamically based on backend metadata. No field definitions, labels, validation rules, or UI structure should be hardcoded.
Form Field Generation
When rendering input forms:
- Fetch attribute definitions from
/api/attributes/UserInputRequestand/api/attributes/ChatWorkflow - Filter attributes where
visible: trueANDeditable: trueto determine which fields to show - For each editable field, generate appropriate form input based on
type:textfields → Text inputtextareafields → Multi-line text areaselectfields → Dropdown/select input with options fromoptionsarray (use localized labels)arrayfields → Array input with add/remove controlsnumberfields → Number input
- Use
labelproperty for field labels (localized) - Use
requiredproperty to show required indicators (asterisk, etc.) - Use
descriptionproperty to show help text or tooltips - Validate form before submission:
- Check all
required: truefields have values - Validate types (e.g., array fields must be arrays)
- Validate select fields (value must be in options array)
- Check all
- On submit, build UserInputRequest object with all form data
Workflow Mode Selector Generation
When rendering workflow mode selector:
- Fetch attribute definitions from
/api/attributes/ChatWorkflow - Find
workflowModefield - Extract
optionsarray from field definition - Generate radio buttons or tabs for each option
- Use localized labels from options:
option.label[userLanguage] - Show description/help text when option is selected
- Mark one option as required (user must select before starting)
Dropdown Generation
Workflow Dropdown:
- Fetch workflows via
GET /api/workflows/ - Display workflows in dropdown with name, status, last activity
- Add "New Workflow" as default/first option
- When workflow selected, load full workflow data
- Display previous messages when workflow selected
Prompt Dropdown:
- Fetch prompts via
GET /api/prompts - Display prompts in dropdown with name
- When prompt selected, fetch prompt details and pre-fill text field
- Allow user to edit pre-filled text
File Attachment UI Generation
Drop Zone:
- Create drop zone area with visual boundaries
- Handle drag events (dragenter, dragover, dragleave, drop)
- Show visual feedback when files dragged over (highlight, border, overlay)
- Process dropped files and upload automatically
- Show file preview immediately after drop
File Upload Button:
- Create file input element (hidden)
- Trigger file picker on button click
- Handle multiple file selection
- Upload files and show preview
File Browser:
- Fetch files via
GET /api/files/list - Display files in browser/selector with pagination
- Allow multiple file selection
- Add selected files to attachment list
File List Display:
- Show attached files with name, size, type
- Display remove button for each file
- Update list when files added or removed
Message Display Generation
When rendering messages in workflow view:
- Fetch messages from workflow data or chatData endpoint
- Display messages chronologically
- Format based on message role:
- User messages → Right-aligned or distinct styling
- Assistant messages → Left-aligned or distinct styling
- Display file attachments as part of each message:
- Show file name, size, and type/icon for each attachment
- Display file attachments in organized list or grid within message
- For each file attachment, render action buttons:
- "Show" button - Opens file preview/viewer
- "Download" button - Triggers file download
- "Delete" button - Removes file from message (with confirmation)
- File preview can be displayed inline, in modal, or sidebar
- Support different file type previews (images, PDFs, text, etc.)
- Show timestamps (relative or absolute)
- Add delete button for each message (if user has permission)
Log Display Generation
When rendering logs in log panel:
- Fetch logs from workflow data or chatData endpoint
- Display logs chronologically
- Format based on log level:
- Info → Default styling
- Warning → Yellow/orange styling
- Error → Red styling
- Show timestamps for each log entry
- Support filtering by log level (optional)
Statistics Display Generation
When rendering statistics in stats panel:
- Fetch stats from workflow data or chatData endpoint
- Display statistics in organized format
- Format based on metric type:
- Numbers → Display with appropriate units
- Percentages → Display as percentage
- Timestamps → Format as duration or absolute time
- Update statistics in real-time during polling
Display Formatting
When displaying field values:
- Use
typeproperty to determine formatting:text→ Display as-is (may need HTML escaping)textarea→ Preserve line breaksselect→ Look up value inoptionsarray and display localized labeltimestamp→ Format as relative time or absolute date/timenumber→ Format with appropriate decimal placesarray→ Display as list or comma-separated
- Handle
nullorundefinedvalues gracefully (show "-" or "Not set") - Use
readonlyproperty to determine if field should show edit indicators - Special formatting for workflow fields:
- Status → Color-code badges (Running = blue, Completed = green, Stopped = gray, Failed = red)
- Workflow Mode → Display as badge with icon
- Timestamps → Show relative time in list view, absolute date in detail view
Localization
All labels and options support multiple languages:
- Use user's preferred language (from user settings or browser locale)
- Access localized labels from
labelobject:label[userLanguage]orlabel.enas fallback - For select options, use
option.label[userLanguage]oroption.label.enas fallback - If label for current language is missing, fall back to English
Polling Implementation
Polling Setup:
- Start polling when workflow view is active
- Use
setIntervalor similar mechanism (2 second interval) - Store last timestamp to use in
afterTimestampparameter - Stop polling when workflow completes or user navigates away
Polling Logic:
- Call
GET /api/chat/playground/{workflowId}/chatData?afterTimestamp={lastTimestamp} - Compare returned data with existing data
- Append new messages, logs, stats to UI
- Update last timestamp
- Check workflow status - stop polling if completed/stopped/failed
- Handle errors gracefully (404 stops polling)
Performance Considerations:
- Debounce rapid updates
- Batch UI updates
- Use virtual scrolling for long message lists
- Limit polling frequency
- Stop polling when tab is not visible (Page Visibility API)
Key Principles
- Never hardcode field names, labels, types, or validation rules
- Always fetch attribute definitions from backend before rendering UI
- Use attribute metadata to determine what to display and how to display it
- Support all field types dynamically - if backend adds new types, frontend should handle them
- Respect
visible,editable,readonly, andrequiredflags from backend - Use localized labels from backend metadata
- Generate forms, dropdowns, and displays entirely from attribute definitions
- When backend adds new fields, frontend should automatically display them without code changes
- Handle all error cases gracefully (403, 404, 400, 413, 500)
- Provide user feedback for all actions (loading states, success messages, error messages)
- All workflows are user-scoped (backend enforces this)
- Polling should be efficient (use selective data transfer with afterTimestamp)
- Optimistic updates for better UX (show changes immediately, revert on error)
Summary
This document provides complete frontend requirements for the chat playground page and workflow management components. All requirements follow the principle of backend-driven UI generation—no hardcoding of field definitions, labels, or validation rules. The frontend should dynamically generate all UI components from backend metadata provided through the /api/attributes/ChatWorkflow and /api/attributes/UserInputRequest endpoints.
Key Architecture Pattern: The chat playground interface is a single page (/chat-playground) with different views managed through component state. All interactions happen within the same page component without separate routes.
Security Note: Workflows are user-scoped. Users can only see and manage their own workflows. The backend enforces this security, and the frontend should never attempt to access other users' workflows.
Real-Time Updates: The workflow view uses polling-based live tracking to show real-time updates. Polling should be efficient using selective data transfer with timestamps.
For generic patterns that apply across all entity types (not just workflows), see the Dynamic Forms and Pagination documentation.