Increase unread cap to 99+ (#10985)

This commit is contained in:
DS Boyce
2026-06-25 14:57:03 -07:00
committed by GitHub
parent 29a0d16b69
commit eae15aca3e
5 changed files with 31 additions and 37 deletions
@@ -856,18 +856,16 @@ export function useUnreadMessageCount(): {
const request = data?.unreadRequestConvos ?? 0
if (accepted > 0) {
const total = accepted + Math.min(request, 1)
return {
count: total,
count: accepted,
// accepted is sentinel-capped at UNREAD_ACCEPTED_CAP (meaning "more than
// cap - 1"). show the "+" overflow label only when accepted is actually
// capped - the +1 request nudge must not trip it at exactly cap - 1
// accepted convos. otherwise clamp the number to cap - 1 so the nudge
// never surfaces the sentinel value (31) itself
// capped, otherwise clamp the number to cap - 1 so we never surface the
// sentinel value (100) itself
numUnread:
accepted >= UNREAD_ACCEPTED_CAP
? `${UNREAD_ACCEPTED_CAP - 1}+`
: String(Math.min(total, UNREAD_ACCEPTED_CAP - 1)),
: String(Math.min(accepted, UNREAD_ACCEPTED_CAP - 1)),
// only needed when numUnread is undefined
hasNew: false,
}