From b809a01250fc7953d9f0fd748b7e9d4463860ffb Mon Sep 17 00:00:00 2001 From: Collins Ikechukwu Date: Wed, 20 May 2026 11:31:40 +0100 Subject: [PATCH] feat(judging): unallocated partner funds become a warning, not a blocker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirrors the backend relaxation. The allocator preview's "Ready to publish" badge previously turned amber whenever any partner contribution had unallocated balance — but the backend gate that backed that signal has been relaxed (the funds stay in escrow post-publish; they're not lost). Split the existing publish-readiness messaging into two lists: - Blockers — the hard gates (deadline, completeness, no reviews). Same red treatment, same ready-to-publish badge logic. - Warnings — informational, never blocks. Renders in blue, calls out the unallocated amount with a note that it remains in escrow. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../judging/AllocationPreviewCard.tsx | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/components/organization/hackathons/judging/AllocationPreviewCard.tsx b/components/organization/hackathons/judging/AllocationPreviewCard.tsx index 402eeb88..871ad93c 100644 --- a/components/organization/hackathons/judging/AllocationPreviewCard.tsx +++ b/components/organization/hackathons/judging/AllocationPreviewCard.tsx @@ -130,11 +130,17 @@ export default function AllocationPreviewCard({ if (gates.reviewedCount === 0) { blockers.push('No submissions have been reviewed yet.'); } + + // Unallocated partner contributions are surfaced as a non-blocking + // warning. The escrow still holds the funds; organizers can release + // or refund them after publish. The backend gate that prevented this + // is intentionally relaxed (see judging.service.publishResults). + const warnings: string[] = []; if (gates.unallocatedPartnerContributionAmount > 0.0000001) { - blockers.push( + warnings.push( `${gates.unallocatedPartnerContributionAmount.toFixed(2)} ${ gates.currency - } of partner contributions are unallocated.` + } of partner contributions are unallocated. Publish will succeed; funds remain in escrow until you release or refund them.` ); } @@ -191,6 +197,22 @@ export default function AllocationPreviewCard({ )} + {warnings.length > 0 && ( +
+
+ + Heads up +
+
    + {warnings.map((w, i) => ( +
  • + {w} +
  • + ))} +
+
+ )} + {/* Overall placements */} {overall.length > 0 && (