A reply to a case mail becomes a note on its record
Test / test (push) Failing after 53s
Publish release / publish (push) Successful in 3m14s

Whatever reads the mailbox publishes on portal.mail.received; portal
appends the note after checking the record exists in a bucket this
site has and the sender is the address the record itself holds. A
note never moves a case: a mailbox is the one door anyone may knock
on, so it cannot drive a state machine even if someone forges their
way past the checks. The desks show the conversation beside the case.

Tested: the address parser, every refusal (a stranger, no address to
compare, an empty reply, the same reply twice, an unknown contract),
and the whole path through a real JetStream - the note lands, the
state does not move, and no event is written.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-24 21:26:57 +02:00
co-authored by Claude Opus 5
parent 4fd60293fa
commit 26c1762dfa
9 changed files with 337 additions and 3 deletions
+40
View File
@@ -1187,3 +1187,43 @@ textarea:focus {
.answer-field-map .answer-field-value {
display: block;
}
/* Replies that came back by mail, under the record they belong to.
They move nothing, so there is no control here - only who wrote,
when, and what they said. */
.answer-notes {
list-style: none;
margin: 0.4rem 0 0;
padding: 0 0 0 0.7rem;
border-left: 0.12rem solid var(--line);
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.answer-note-who {
font-weight: 600;
}
.answer-note-time {
margin-left: 0.4rem;
font-size: 0.85em;
color: var(--ink-dim);
}
.answer-note-text {
margin: 0.15rem 0 0;
white-space: pre-wrap;
}
/* A page that is about a place: the map sits under the question, at
the width of the text it belongs to. */
.question-place {
margin: 0.8rem 0 0;
}
.question-place figcaption {
margin-top: 0.3rem;
font-size: 0.9em;
color: var(--ink-dim);
}