misherate blog
21 November 2026 · eventsconcurrencyinterfaces

“Done” needs a message number

An iterate mind runs the page, the agent that can change it, and the event streams between them. That makes for an awkward little race: the agent fixes the sentence you flagged, but you’ve already asked it about the caption. The page says Done. Done with what?

The first version of page feedback had a simple answer. Select some text, leave a note, and get a receipt that tells you when the work is done. That was enough while one receipt meant one request. On the blog, the receipt is now a conversation: the highlight stays put after the selection clears, and tapping it opens the notes and a composer right there. You can ask a second question without creating a second receipt. So the thing you reopen and the thing the agent finishes are no longer the same thing.

A later event can be about earlier work

Suppose the original note is event 41: “The diagram says seconds, but the text says minutes.” While the agent checks the units, you add note 45: “The caption might need changing too.” The fix for the units lands, and the agent records a resolution at event 48.

If the page lets the latest event set a single open-or-closed flag, 48 beats 45 and the whole thread looks done. Sorting the events correctly doesn’t help; that is the correct order. Event 48 needs to say that it answers 41. A later resolution that answers 45 can close the thread without pretending the first fix never happened.

The receipt therefore has two numbers with different jobs. The submission’s offset identifies the conversation. The resolution’s through offset identifies the latest note it addresses. A follow-up goes to the original agent without routing it again, and the agent receives that follow-up’s offset with the message. The server checks that the caller is the agent assigned to the receipt and that the offset names either the original submission or a follow-up on that receipt. It deduplicates resolutions by the pair, so retrying the first Done won’t add another line or prevent a second, legitimate Done.

// Pseudocode: rows already authorized for this receipt.
function threadStatus(submissionOffset, rows) {
  const latestNote = Math.max(
    submissionOffset,
    ...rows.filter(row => row.kind === "note").map(row => row.offset),
  );
  const done = rows
    .filter(row => row.kind === "resolved" && row.through >= latestNote)
    .sort((a, b) => b.offset - a.offset)[0];
  return done ? { closed: true, summary: done.summary } : { closed: false };
}

The browser receives an authorized stream for the one receipt, not the feedback inbox. Rows carry their original offsets from the shared feedback log, so the browser can compare the note and the acknowledgement in the same numbering scheme. The stream’s own cursor is for catching up, not for deciding what got answered. The receipt was already built to overlap live delivery with replay; deriving status from the rows lets it reach the same answer whether a follow-up arrives live or is read back on reconnect.

The highlight is a view, not the record

A useful fix may remove the exact words that started the thread. In that case the widget doesn’t guess which new words to highlight. It keeps the original quote and conversation available from its menu. Conversely, an old Done can stay in the timeline while the highlight stays active for newer work. The visual marker answers “where is the outstanding discussion?” The receipt answers “what happened?” Neither has to lie to preserve the other.

This isn’t a check that the agent fixed the caption. The agent still has to do and verify the work it claims. It’s a smaller promise: once the agent says which request it answered, the interface won’t quietly turn that into a claim about a request it hadn’t seen.

Want this in your own iterate mind? The button copies a note for it: it reads this page, tells you what it would change, and changes nothing until you say yes.

← A reply can go stale before it is sent
A red circle should move with the page →

One email per new post, at most two a day. Unsubscribe any time. Your address is kept privately and never shown.