Keep the notifications worth interrupting for
Splitting system messages out of the modal was right for payout receipts,
but it would have silenced two that a member genuinely loses money by
ignoring:
- "@someone is trying to buy. Link your wallet so it pays you" — a sale
is blocked right now, and the referral is lost permanently once it
routes to someone else.
- "You missed 43 POL on InstantAdPay" — a payout passed them by, and the
message explains exactly how to stop the next one doing the same.
So the dividing line is not system-versus-human, it is "does this need you
to do something". Those two become kind 'alert' and still interrupt; the
receipts stay kind 'notice' and stay in the inbox.
The modal no longer credits an alert to a person either. It was saying "A
message from @martbost" over machine-generated text, because system mail
is sent by member 1 at ADMIN_EMAIL. Alerts now read "Action needed on your
account".
Also reclassified "X is now in your line for good" as a notice — it is
good news about a referral the member gained, with nothing at stake.
qa/messages-notice.mjs now covers both lanes: 14 checks, including that an
alert interrupts and a flood of 25 receipts does not.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -1302,7 +1302,11 @@
|
||||
if (!$('msgModal') || !msg || msgModalShown.has(msg.id)) return;
|
||||
if (!$('msgModal').hidden) return; // one already open
|
||||
msgModalShown.add(msg.id);
|
||||
$('mmFrom').textContent = 'A message from ' + (msg.fromName || 'your sponsor');
|
||||
// An alert is generated by the system, so crediting it to a person ("A message from
|
||||
// @martbost") is both wrong and misleading about what the member is looking at.
|
||||
$('mmFrom').textContent = msg.kind === 'alert'
|
||||
? 'Action needed on your account'
|
||||
: 'A message from ' + (msg.fromName || 'your sponsor');
|
||||
$('mmSubject').textContent = msg.subject || '';
|
||||
$('mmBody').innerHTML = msg.body || ''; // server-sanitized
|
||||
$('msgModal').hidden = false;
|
||||
|
||||
Reference in New Issue
Block a user