Files
Andrew Beveridge ☄️andClaude Opus 5.5 47c6691823 fix(admin): delete-outputs dialog shows success as green; YouTube 404 = already deleted (v0.294.3) (#1260)
## Summary
When Andrew deleted NOMAD-1875's outputs (2026-11-09), the result dialog
showed **YouTube, Dropbox and Google Drive all red** ("Partial
Success"). In reality:
- **Dropbox and Drive were deleted fine.** The backend logged `Dropbox:
success, GDrive: success`, and the brand code was recycled, which only
happens when both succeed. The dialog only treats `"deleted"` as green,
but the shared cleanup helpers (`published_outputs_cleanup.py`) return
`"success"`. The regression E2E mocks also used `"deleted"`, which is
why they never caught it.
- **The YouTube video was already gone.** The API returned 404 and
yt-dlp says "removed by the uploader", so it was removed outside gen.
The delete reported this as `failed`, with no message in the dialog.

## Changes
- `frontend/app/admin/jobs/page.tsx`: green for `success`.
`failed`/`partial` now show a reason, and a partial Drive delete lists
the files left behind ("Not deleted: cdg").
- `KaraokeFinalise.delete_youtube_video`: an HTTP 404 counts as already
deleted (warning log, returns True). Other errors (e.g. 403) still fail.
- `frontend/e2e/regression/admin-job-detail.spec.ts`: mocks now use the
real backend statuses, plus a partial-Drive assertion.
- Version 0.294.3.

## Testing
- `tests/unit/test_karaoke_finalise/test_youtube_integration.py -k
delete`: 6 passed (2 new: 404 = success, 403 = still a failure).
- Playwright regression spec: left to CI, since frontend deps aren't
installed in this worktree.
- Local CodeRabbit: 1 minor finding (show per-file Drive outcomes),
fixed.

@coderabbitai ignore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_012RYLVUwKapcjF8czVQrPD5

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 11:57:38 -05:00
..