/* Brand Lens — the calibration panel: AI's call (shown first) + your reaction.
Your comment is the star; one Agree/Disagree tap tracks convergence. */
function ReactPanel({ ai, aiState, category, setCategory, agree, setAgree, comment, setComment, submit, submitting, pos, total, retry, skip }) {
const last = pos + 1 >= total;
return (
{/* category control */}
{/* the AI's call, shown first */}
{aiState === 'loading' || aiState === 'idle' ? (
Reading the image and forming a call…
) : aiState === 'error' || !ai ? (
Couldn't analyze this image right now.
A momentary hiccup — try again, or skip it and come back.
Try again
Skip
) : (
<>
{ai.headline}
{ai.rationale}
{ai.reasons && ai.reasons.length > 0 && (
{ai.reasons.map((r, i) => )}
)}
{ai.verdict === 'keep' && ai.suggestedUse && ai.suggestedUse.length > 0 && (
)}
{ai.calibratedFrom > 0 && (
This call is calibrated from {ai.calibratedFrom} of your past reviews.
)}
{/* your reaction — comment-led */}
Did the AI get it right?
One tap, then tell it why — the “why” is what trains the judge.
setAgree(true)} kind="agree" />
setAgree(false)} kind="disagree" />
>
)}
);
}
function ReactBtn({ active, onClick, kind }) {
const agree = kind === 'agree';
const col = agree ? 'var(--st-success)' : 'var(--ps-flag)';
const soft = agree ? '#EAF6F0' : 'var(--ps-flag-soft)';
return (