From 12c165a481b907fc1e9083eeebd170b67230bd5a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 4 Jul 2026 02:06:14 +0000 Subject: [PATCH] Surface partial mirror fan-out failures as a warning, not a green success When some mirror windows fail to sync during reprocess, return an error result so it renders as a warning banner (with the synced/failed counts and reasons) instead of a green success the admin might skim past while those windows are left stale. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013UkZVYgLmquWV2xDn349T2 --- ...ports-seasons.$id.events.$eventId.bracket.server.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/routes/admin.sports-seasons.$id.events.$eventId.bracket.server.ts b/app/routes/admin.sports-seasons.$id.events.$eventId.bracket.server.ts index 2dadadb..500858d 100644 --- a/app/routes/admin.sports-seasons.$id.events.$eventId.bracket.server.ts +++ b/app/routes/admin.sports-seasons.$id.events.$eventId.bracket.server.ts @@ -772,12 +772,16 @@ export async function action({ request, params }: Route.ActionArgs) { if (event.isPrimary && event.tournamentId) { try { const report = await syncMajorFromPrimaryEvent(event.id, { markComplete: false }); - let fanout = ` Synced ${report.windowsSynced} mirror window(s).`; + // Surface a partial fan-out as an error so it renders as a warning + // banner, not a green success the admin might skim past while some + // mirror windows are left stale. if (report.windowsFailed > 0) { const reasons = report.failures.map((f) => f.error).join("; "); - fanout = ` Synced ${report.windowsSynced} mirror window(s); ${report.windowsFailed} failed: ${reasons}`; + return { + error: `${baseMessage} Synced ${report.windowsSynced} mirror window(s), but ${report.windowsFailed} failed (those windows may be stale): ${reasons}`, + }; } - return { success: `${baseMessage}${fanout}` }; + return { success: `${baseMessage} Synced ${report.windowsSynced} mirror window(s).` }; } catch (error) { return { error: `Primary window recomputed, but mirror fan-out failed (mirror windows may be stale): ${error instanceof Error ? error.message : String(error)}`,