MessageList
Purpose
The fold from what a member can read to what their screen shows — the presentation's one real piece of work. The timeline below already settled order, identity, and deduplication; this projection settles names and voice: a readable entry names its sender by sub, because that is what rides inside a seal, but a person reads people by their shown names. The list resolves each sender through the members the reader has seen across their unsealed epochs — not just the current one, because a message from a closed epoch is still read and its speaker still has a name, even when the speaker themselves has been removed since. A sender no seen member answers to keeps their sub as their name — an honest stranger, not an invented one. And the list knows whose voice is whose: a line by the reader speaks in the voice "mine", every other in "theirs" — which is all a screen needs to lay a conversation out as one.
Props
- entries: the member's readable
TimelineEntries, in the fold's order - members: the
Membersthe reader has seen across their unsealed revisions — every epoch's roster, not only the latest - reader: the
Memberwhose reading this is
Role Players
(none)
Role Methods
(none)
Functionalities
present
Produces the Lines of the reading, one per entry, in the entries' own order. A readable entry
becomes a spoken line: its message id and words carried over, its sender resolved to the shown name
of the seen member with that sub — or left as the sub when no seen member answers to it — and
in the voice "mine" when the sender is the reader and "theirs" otherwise. A missing entry becomes
an awaited line naming what it waits for.
Result: the Lines of the reading, in the entries' order
tip
Produces the MessageId of the last readable entry among the entries, if any — what a post into
this reading follows: a member replies to what they saw, and a reading holding no readable entry
yet is followed by nothing.
Result: the MessageId of the last readable entry, if any
Scenarios
The tip is the last readable entry
Given: readable entries for MessageId "m-8001" by sender "anne.bruun" with writing "The hearing moved to Thursday." and for "m-8002" by sender "sofie.lind" with writing "I'll bring the file.", members anne.bruun shown as "Anne Bruun" and sofie.lind shown as "Sofie Lind", and reader sofie.lind shown as "Sofie Lind"
When: tip is asked
Then: the answer is "m-8002" — the last thing the reading shows is what a reply follows
An empty reading has no tip
Given: no entries, no members, and reader sofie.lind shown as "Sofie Lind" When: tip is asked Then: there is no answer — a post into an empty reading opens the conversation, following nothing
The reading speaks in shown names
Given: readable entries for MessageId "m-8001" by sender "anne.bruun" with writing "The hearing moved to Thursday." and for "m-8002" by sender "sofie.lind" with writing "I'll bring the file.", members anne.bruun shown as "Anne Bruun" and sofie.lind shown as "Sofie Lind", and reader karin.dahl shown as "Karin Dahl"
When: present is called
Then: two spoken lines in that order — "The hearing moved to Thursday." from "Anne Bruun" and "I'll bring the file." from "Sofie Lind" — both in the voice "theirs"
The reader hears their own voice
Given: a readable entry for MessageId "m-8003" by sender "sofie.lind" with writing "Noted.", members sofie.lind shown as "Sofie Lind", and reader sofie.lind shown as "Sofie Lind"
When: present is called
Then: one spoken line, "Noted." from "Sofie Lind", in the voice "mine"
A speaker from a closed epoch keeps their name
Given: a readable entry for MessageId "m-8001" by sender "karin.dahl" with writing "The audit starts Monday.", members drawn from two epochs — karin.dahl shown as "Karin Dahl" named only in the earlier one, anne.bruun shown as "Anne Bruun" in both — and reader anne.bruun
When: present is called
Then: the line speaks as "Karin Dahl" — the reader saw her in an epoch they can read, and her removal since does not unname her words
A stranger keeps their sub
Given: a readable entry for MessageId "m-8009" by sender "ove.kjaer" with writing "Fine.", members anne.bruun shown as "Anne Bruun", and reader anne.bruun
When: present is called
Then: the line speaks as "ove.kjaer" — no seen member answers to that sub, and the list does not invent a name
A hole in the reading stays visible
Given: a missing entry awaiting MessageId "m-8000" followed by a readable entry for "m-8001" by sender "anne.bruun" with writing "As I said.", members anne.bruun shown as "Anne Bruun", and reader sofie.lind
When: present is called
Then: an awaited line waiting for "m-8000", then the spoken line — the hole is presented, not papered over