Skip to content

Commit 39ff6ee

Browse files
0xdevcollinsclaude
andauthored
feat(judging): unallocated partner funds become a warning, not a blocker (#574)
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) <noreply@anthropic.com>
1 parent 0b143cf commit 39ff6ee

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

components/organization/hackathons/judging/AllocationPreviewCard.tsx

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,17 @@ export default function AllocationPreviewCard({
130130
if (gates.reviewedCount === 0) {
131131
blockers.push('No submissions have been reviewed yet.');
132132
}
133+
134+
// Unallocated partner contributions are surfaced as a non-blocking
135+
// warning. The escrow still holds the funds; organizers can release
136+
// or refund them after publish. The backend gate that prevented this
137+
// is intentionally relaxed (see judging.service.publishResults).
138+
const warnings: string[] = [];
133139
if (gates.unallocatedPartnerContributionAmount > 0.0000001) {
134-
blockers.push(
140+
warnings.push(
135141
`${gates.unallocatedPartnerContributionAmount.toFixed(2)} ${
136142
gates.currency
137-
} of partner contributions are unallocated.`
143+
} of partner contributions are unallocated. Publish will succeed; funds remain in escrow until you release or refund them.`
138144
);
139145
}
140146

@@ -191,6 +197,22 @@ export default function AllocationPreviewCard({
191197
</div>
192198
)}
193199

200+
{warnings.length > 0 && (
201+
<div className='rounded border border-blue-500/30 bg-blue-950/20 p-3'>
202+
<div className='mb-2 flex items-center gap-2 text-xs font-semibold text-blue-300'>
203+
<AlertTriangle className='h-3.5 w-3.5' />
204+
Heads up
205+
</div>
206+
<ul className='space-y-1 text-xs text-blue-200/80'>
207+
{warnings.map((w, i) => (
208+
<li key={i} className='ml-4 list-disc'>
209+
{w}
210+
</li>
211+
))}
212+
</ul>
213+
</div>
214+
)}
215+
194216
{/* Overall placements */}
195217
{overall.length > 0 && (
196218
<div className='space-y-2'>

0 commit comments

Comments
 (0)