selection.toggle(p.memory_id, e.shiftKey)}
/>
) : null,
@@ -580,8 +612,10 @@ export function ProposalsPanel() {
{p.value_preview}
)}
{hasAdvice(p) && }
- {canDecide && !inBatch.has(p.memory_id) && (
- {aloneReason(p, perKey)}
+ {untickable.has(p.memory_id) && (
+
+ {untickable.get(p.memory_id)}
+
)}
@@ -797,8 +831,9 @@ const PLAN_LIST = "max-h-[50vh] divide-y divide-border overflow-y-auto rounded-m
/** The plan of a batch and, once it is sent, its result. A rejection lists each row as the
* list showed it and is bound to the listed hashes. An acceptance reads each text whole,
- * is bound to the hashes of those reads, and leaves out a text it could not read. A plan
- * shows the key, the proposer and the text, and nothing else of the row. */
+ * is bound to the hashes of those reads, and leaves out a text it could not read or whose
+ * hash another listed row of its key lists. A plan shows the key, the proposer and the
+ * text, and nothing else of the row. */
function BatchDialog({
batch,
scope,
@@ -829,15 +864,17 @@ function BatchDialog({
const cancel = useRef(null);
const close = useRef(null);
- // An acceptance reads every text whole as its plan opens, through the review's read.
+ // An acceptance reads every text whole as its plan opens, through the review's read. A
+ // text whose hash another listed row of its key lists is left out like one not read.
const { org, namespace } = scope;
useEffect(() => {
if (plan?.decision !== "accept") return;
let live = true;
for (const p of plan.proposals)
- void readProposal({ org, namespace }, p).then(
- (read) => live && setReads((prev) => ({ ...prev, [p.memory_id]: read })),
- );
+ void readProposal({ org, namespace }, p).then((read) => {
+ const error = read.error ?? (listedElsewhere(plan.listed, p, read.row?.content_sha256) ? SAME_TEXT : undefined);
+ if (live) setReads((prev) => ({ ...prev, [p.memory_id]: { ...read, error } }));
+ });
return () => {
live = false;
};
@@ -845,7 +882,7 @@ function BatchDialog({
const loading = accept && proposals.some((p) => !reads[p.memory_id]);
// What the button counts and the call sends: every row of a rejection, and of an
- // acceptance every text but those that could not be read.
+ // acceptance every text but those left out.
const sending = proposals.filter((p) => !(accept && reads[p.memory_id]?.error));
const apply = async () => {