fix: default dashboard to all jobs, fix E2E completion detection (#655)

## Summary
- Default the dashboard status filter from "active" to "all" so
completed jobs remain visible (existing localStorage preferences
preserved)
- Add recovery logic to E2E happy path test: after 10 consecutive "card
unavailable" polls, automatically switch the filter dropdown to "All
statuses"
- Bump version to 0.157.4

**Root cause:** The daily E2E test (run #126) timed out at Step 9
because the "active" filter uses `hide_completed: true` at the API level
— when the job completed, the card vanished from the DOM and the test
retried for ~25 min until timeout. The generator itself was working
fine.

## Test plan
- [x] All 707 tests pass (`make test`)
- [x] CodeRabbit review clean (1 finding fixed)
- [ ] Next scheduled E2E run should pass with these changes

@coderabbitai ignore

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew Beveridge ☄️andClaude Opus 4.6 authored and GitHub committed 2026-04-03 11:41:48 -04:00
1 parent a0e6448e7b
commit 105a5b28fd
3 files changed
+33 -6

No files matched your search

+4 -4
View File
@@ -64,8 +64,8 @@ function AppPageContent() {
return saved ? Number(saved) : 10
})
const [statusFilter, setStatusFilter] = useState<string>(() => {
if (typeof window === "undefined") return "active"
return localStorage.getItem("nomad-karaoke-status-filter") || "active"
if (typeof window === "undefined") return "all"
return localStorage.getItem("nomad-karaoke-status-filter") || "all"
})
const [searchInput, setSearchInput] = useState("")
const [searchQuery, setSearchQuery] = useState("")
@@ -453,7 +453,7 @@ function AppPageContent() {
<CardDescription style={{ color: 'var(--text-muted)' }}>
{!hasFetchedSuccessfully
? 'Loading...'
: searchQuery || statusFilter !== 'active'
: searchQuery || (statusFilter !== 'all' && statusFilter !== 'active')
? `${jobs.length} job${jobs.length !== 1 ? 's' : ''} matching filters`
: `${jobs.length} job${jobs.length !== 1 ? 's' : ''}`}
</CardDescription>
@@ -466,7 +466,7 @@ function AppPageContent() {
<Loader2 className="w-12 h-12 mx-auto mb-3 opacity-50 animate-spin" />
<p>Loading jobs...</p>
</>
) : searchQuery || statusFilter !== 'active' ? (
) : searchQuery || (statusFilter !== 'all' && statusFilter !== 'active') ? (
<>
<Search className="w-12 h-12 mx-auto mb-3 opacity-50" />
<p>No jobs match your filters.</p>
@@ -833,6 +833,9 @@ test.describe('E2E Happy Path - Real User with Full UI Interactions', () => {
// Add extra buffer for variable processing times
const completionTimeout = TIMEOUTS.videoRendering + TIMEOUTS.finalEncoding + 600_000; // 35 minutes total
let consecutiveUnavailable = 0;
const maxConsecutiveUnavailable = 10; // ~2 minutes of retries before trying recovery
while (Date.now() - encodeStartTime < completionTimeout) {
if (await refreshBtn.isVisible().catch(() => false)) {
await refreshBtn.click();
@@ -844,8 +847,32 @@ test.describe('E2E Happy Path - Real User with Full UI Interactions', () => {
let statusText: string;
try {
statusText = await jobCard.textContent({ timeout: 15000 }) || '';
consecutiveUnavailable = 0; // Reset counter on success
} catch {
console.log(' Job card temporarily unavailable, retrying...');
consecutiveUnavailable++;
console.log(` Job card temporarily unavailable (${consecutiveUnavailable}/${maxConsecutiveUnavailable}), retrying...`);
if (consecutiveUnavailable >= maxConsecutiveUnavailable) {
// Card has been gone too long — the job likely completed and the status filter
// is hiding it. Switch filter to "All statuses" to make it visible again.
console.log(' Card missing too long — switching status filter to "All statuses"...');
const filterSelect = page.getByRole('combobox', { name: /filter by status/i });
if (await filterSelect.isVisible().catch(() => false)) {
await filterSelect.click();
await page.waitForTimeout(500);
const listbox = page.getByRole('listbox');
const allOption = listbox.getByRole('option', { name: /all statuses/i });
if (await allOption.isVisible().catch(() => false)) {
await allOption.click();
await page.waitForTimeout(3000);
consecutiveUnavailable = 0; // Reset and try again with new filter
continue;
}
}
// If we couldn't change the filter, throw a descriptive error
throw new Error('Job card disappeared for too long — job may have completed but status filter is hiding it');
}
await page.waitForTimeout(5000);
continue;
}
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "karaoke-gen"
version = "0.157.3"
version = "0.157.4"
description = "Generate karaoke videos with synchronized lyrics. Handles the entire process from downloading audio and lyrics to creating the final video with title screens."
authors = ["Andrew Beveridge <andrew@beveridge.uk>"]
license = "MIT"