# OSIUN Handover - 20260526-004507

## Files backed up
- expert-clean.html
- committee-clean.html
- expert.html if present
- committee.html if present
- index.html if present
- backend endpoint search result
- detected backend Python files
- OpenAPI schema
- Committee review queue sample

## Current Expert UI state
- Pilih Penempatan Materi moved above Upload Material and full width.
- Upload Material has:
  - Create Materi by AI
  - Direct ke Komite for manual/final non-AI route, pending backend manual-submit endpoint if not available.
- Generated Output Aktif:
  - Shows current active batch only, not all backend history.
  - Uses scroll/slider when active batch is more than 5.
  - Has Regenerate Selected.
  - Has Submit ke Komite for selected generated/regenerated outputs.
  - Has Download Selected.
- Materi Under Review:
  - Full width.
  - Under review normal state is neutral.
  - Revision/correction with committee note is yellow.
- Database Output AI:
  - Full width.
  - Contains backend history/archive.
  - Has Download Selected Archive.
  - Each row has Download button.

## Current Committee UI state
- Reads backend queue from:
  - GET /api/v1/committee/review-queue?limit=200
- Sends decision to:
  - POST /api/v1/committee/decision
- Review options:
  - Approved → Publish Moodle/Learner
  - Kirim Instruksi Koreksi with note
- Correction note should return to Expert as committee_note/correction_note.
- Expert yellow state should trigger only from committee_note/correction_note or revision status, not AI review_notes.

## Important fixed regressions
- Removed/neutralized old layout scripts that moved Active Working Files out of workspace.
- Generated Output Aktif is no longer full backendDrafts history.
- review_notes from AI is not treated as committee correction note.
- Submit ke Komite for selected generated output restored.
- Download available in Generated Output Aktif and Database Output AI.

## Validation URLs
- Expert:
  http://192.168.100.32/expert-clean.html?v=20260526-004507
- Committee:
  http://192.168.100.32/committee-clean.html?v=20260526-004507
- Public/Tailscale Expert:
  https://osiun.tail251e1e.ts.net/expert-clean.html?v=20260526-004507
- Public/Tailscale Committee:
  https://osiun.tail251e1e.ts.net/committee-clean.html?v=20260526-004507
- Handover latest:
  https://osiun.tail251e1e.ts.net/downloads/osiun-handover-latest/

## Suggested regression checks
```bash
curl -s "http://192.168.100.32/expert-clean.html?v=20260526-004507" \
  | grep -nEi "currentActiveDrafts|active-output-set|backend-submit-selected|backend-download-selected|archive-download-selected|materi-under-review|osiun-placement-top" \
  | sed -n '1,240p'

curl -s "http://192.168.100.32/committee-clean.html?v=20260526-004507" \
  | grep -nEi "review-queue|committee/decision|committee-approve-btn|committee-revise-btn|committee-note|committee-note-badge" \
  | sed -n '1,240p'

curl -s "http://192.168.100.32:8090/api/v1/committee/review-queue?limit=5" \
  | python3 -m json.tool | head -120
```
