Source observations and release documentation from Shuyang Home v1.6.0 (54ac363). The 41/42 sequence below is a teaching example, not a production event log.
Two states describe different facts
Opening a collection reminder tells the system that a member has seen a message. It says nothing about whether the goods were collected. The order completes through the original receive action, with its own permissions and transition rules.
The release separates notification read state from task completion. If the destination cannot be opened, it retains unread state; the member can still mark the message read explicitly.
A read-all action needs a time boundary
Suppose the visible inbox was fetched through sequence 41. Message 42 arrives before the user presses read all. Updating every unread row at click time would clear a message the user never saw.
The documented operation sends the maximum sequence from the last query. That expresses which snapshot the user is acting on, while newer messages remain unread.
visibleSnapshot.maxSequence = 41
newMessage.sequence = 42
markRead(recipient = currentUser, through = 41)
// Message 42 remains unread. Task state is unchanged.Duplicate reminders have a business definition
BusinessNotifications builds a key from the recipient, business kind, object id, businessVersion and message. Repeating a save without a meaningful change should not create another reminder, while a later business version may require one.
Including message text in identity is a tradeoff: a wording change can affect identity too. If this grows into a distributed service, stable event ids and storage-level uniqueness would deserve a separate design and concurrency test. They are proposed extensions here.
Four scenarios worth keeping
- Open a reminder and verify that the underlying order is still waiting for the appropriate business action.
- Fetch through 41, insert 42, then mark the snapshot read. Only the earlier messages should change.
- Repeat an unchanged operation, then make a genuine transition. Check both duplicate suppression and a new reminder.
- Fail the business transaction and inspect whether a notice remains. The release documents shared rollback; verify it at the transaction boundary.
A practical frontend lesson
An unread badge is a view of notification state. A task badge is a view of business state. Keeping their refresh rules separate makes retries, multiple tabs and delayed responses easier to reason about.
Sources & further reading
Compiled from code and documents, with AI-assisted drafting and translation. Examples and proposed checks are learning material; only linked evidence establishes what was run.