- Move agent code from backend/src/agent/ to agent/src/ss_tools/agent/ - Extract shared stdlib-only utilities to shared/src/ss_tools/shared/ - Add #region/#endregion contracts to all ~140 functions (INV_1 compliance) - Update docker files, entrypoint, build scripts for new package layout - Backend now imports ss_tools.shared._llm_health (no gradio/langchain deps) - Add specs for 036-039 feature plans
86 lines
5.2 KiB
Markdown
86 lines
5.2 KiB
Markdown
#region AgentTestStabilization.UxReference [C:3] [TYPE ADR] [SEMANTICS ux,reference,agent,dashboard-testing]
|
|
@BRIEF UX reference for stabilized agent execution before dashboard test scenario generation.
|
|
|
|
**Feature Branch**: `036-agent-test-stabilization`
|
|
**Created**: 2026-07-07 | **Status**: Draft
|
|
|
|
## 1. User Persona & Context
|
|
|
|
* **Who is the user?**: QA engineer, dashboard owner, or analyst preparing an agent-generated dashboard test scenario.
|
|
* **What is their goal?**: Start a reliable, recoverable agent run from a dashboard and preview generated outputs before any durable write.
|
|
* **Context**: Browser-based Svelte `/agent` workspace launched from a dashboard page with Superset environment selected.
|
|
|
|
## 2. Happy Path Narrative
|
|
|
|
The user clicks "Создать сценарий тестирования" on a dashboard. `/agent` opens with the dashboard context already visible: dashboard name, id, environment, and intent. The agent starts a recoverable run, streams structured progress stages, produces draft artifacts, and shows a confirmation card before saving anything. If the user denies, the run ends cleanly with no side effects.
|
|
|
|
## 3. Interface Mockups
|
|
|
|
### Agent Context Header
|
|
|
|
```text
|
|
┌─────────────────────────────────────────────────────────────────────────────┐
|
|
│ 🧪 Dashboard Test Scenario Agent ● connected │
|
|
├─────────────────────────────────────────────────────────────────────────────┤
|
|
│ Context: FI-0080 | dashboard_id=42 | env=ss-dev │
|
|
│ Intent: build_dashboard_test_scenario | run_id: ag-run-20260707-001 │
|
|
└─────────────────────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
### Progress Strip
|
|
|
|
```text
|
|
[Context ✓] → [Inspect …] → [Scenario] → [Parameters] → [Generate] → [Validate] → [Save]
|
|
```
|
|
|
|
### Draft Artifact Preview
|
|
|
|
```text
|
|
┌──────────────────────── Draft artifacts ────────────────────────────────────┐
|
|
│ Run: ag-run-20260707-001 │
|
|
│ ✓ scenario.yaml valid │
|
|
│ ⚠ baseline-candidates.yaml needs approval reason │
|
|
│ ✓ generated-preview.json valid │
|
|
│ │
|
|
│ [Preview] [Download draft] [Request save] │
|
|
└─────────────────────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
### Confirmation Gate
|
|
|
|
```text
|
|
┌──────────────────────── Confirmation required ──────────────────────────────┐
|
|
│ Save generated artifacts │
|
|
│ Target: tests/generated/dashboards/fi_0080/ │
|
|
│ Files: 3 │
|
|
│ Risk: repository write │
|
|
│ Warnings: 1 baseline candidate remains draft │
|
|
│ │
|
|
│ [Confirm save] [Deny] │
|
|
└─────────────────────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
## 4. Error Experience
|
|
|
|
### Scenario A: Stale or Invalid Context
|
|
|
|
* **System Response**: Context card turns warning-tone and lists invalid fields.
|
|
* **Recovery**: User can return to dashboard, retry context handoff, or continue in non-scenario chat mode.
|
|
|
|
### Scenario B: Stream Drops During Run
|
|
|
|
* **System Response**: UI shows `run_id`, last known stage, and reconnect actions.
|
|
* **Recovery**: User reconnects and resumes viewing draft status; no write happens during disconnected state.
|
|
|
|
### Scenario C: Unauthorized Approval
|
|
|
|
* **System Response**: Permission-denied card with required role and no confirm button.
|
|
* **Recovery**: User can download draft only if allowed, or request approval from an authorized role.
|
|
|
|
## 5. Tone & Voice
|
|
|
|
* **Style**: Technical, explicit, side-effect aware.
|
|
* **Terminology**: Use "run", "draft artifact", "confirmation", "approval reason", and "dashboard context" consistently.
|
|
|
|
#endregion AgentTestStabilization.UxReference
|