# S06: Admin UI — Multi-Source Pipeline Management — UAT

**Milestone:** M014
**Written:** 2026-04-03T02:01:20.602Z

# S06 UAT: Admin UI — Multi-Source Pipeline Management

## Preconditions
- Chrysopedia stack running on ub01 (all containers healthy)
- At least one technique page exists in the database
- Browser access to http://ub01:8096

## Test Cases

### TC1: Admin Technique Pages endpoint returns correct structure
1. `curl -sf http://ub01:8096/api/v1/admin/pipeline/technique-pages | python3 -m json.tool | head -30`
2. **Expected:** JSON with `items` array, `total` (integer), `offset`, `limit`. Each item has: id, title, slug, creator_name, creator_slug, topic_category, body_sections_format, source_video_count, version_count, created_at, updated_at.

### TC2: Multi-source filter
1. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?multi_source_only=true"`
2. **Expected:** Only items where source_video_count > 1. Currently returns 0 items (no multi-source pages yet). When multi-source pages exist, all returned items must have source_video_count >= 2.

### TC3: Creator filter
1. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?creator=skope"`
2. **Expected:** Only items where creator_slug matches "skope". Verify creator_name and creator_slug fields are consistent.

### TC4: Sort options
1. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?sort=alpha&limit=5"` — items ordered A-Z by title
2. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?sort=creator&limit=5"` — items ordered by creator name
3. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?sort=recent&limit=5"` — items ordered by updated_at descending

### TC5: Pagination
1. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?offset=0&limit=3"` — returns 3 items, total unchanged
2. `curl -sf "http://ub01:8096/api/v1/admin/pipeline/technique-pages?offset=3&limit=3"` — returns next 3 items, different from first page

### TC6: Admin page renders in browser
1. Navigate to http://ub01:8096/admin/techniques
2. **Expected:** Table with columns: Title, Creator, Category, Format, Sources, Versions, Updated
3. Each row shows data from the API. Format column shows "v1" or "v2" badge.

### TC7: Row expansion shows source videos
1. On /admin/techniques, click any technique row
2. **Expected:** Row expands to show "Source Videos" section. If the technique has source videos, they display with filenames and dates. Links to pipeline admin via video ID query param.

### TC8: Filter controls work in UI
1. Check "Multi-source only" checkbox → table filters to only multi-source pages (currently empty)
2. Uncheck → all pages return
3. Type a creator name in the creator filter → table filters to matching creator
4. Change sort dropdown → table reorders

### TC9: Cross-links work
1. Click a technique title in the table → navigates to public technique page (/techniques/{slug})
2. Click a creator name → navigates to creator detail page (/creators/{slug})
3. In expanded row, click a source video link → navigates to /admin/pipeline with video query param

### TC10: Admin dropdown includes Techniques
1. Click the admin dropdown (gear icon) in the navigation bar
2. **Expected:** Three entries visible: Reports, Pipeline, Techniques
3. Click "Techniques" → navigates to /admin/techniques

### Edge Cases

### TC11: Empty database
1. If no technique pages exist, the table should show an empty state or "No technique pages found" message
2. Total should be 0, items array empty

### TC12: body_sections_format display
1. Verify pages with format "v1" show a v1 badge and pages with "v2" show a v2 badge
2. Currently all pages are v1 — when v2 pages exist after composition runs, both badges should appear
