// Inbox — Reginald only rings the bell when it matters function InboxScreen({ onOpenIssue, onOpenDirectives, readIds, setReadIds }) { const DS = window.CommiTeaDesignSystem_20e63b; const { Card, Tabs, Button, Icon } = DS; const all = window.CT_DATA.inbox; const [tab, setTab] = React.useState('all'); const isRead = (n) => !n.unread || readIds.includes(n.id); const unreadCount = all.filter((n) => !isRead(n)).length; const FILTERS = { all: () => true, mentions: (n) => n.type === 'mention' || n.type === 'assignment', drift: (n) => n.type === 'drift' || n.type === 'nag' || n.type === 'milestone', system: (n) => n.type === 'system' || n.type === 'review', }; const items = all.filter(FILTERS[tab]); const days = [...new Set(items.map((n) => n.day))]; const toneColor = { ok: 'var(--ok)', warn: 'var(--warn)', info: 'var(--info)', neutral: 'var(--ink-3)' }; const open = (n) => { setReadIds((r) => (r.includes(n.id) ? r : [...r, n.id])); if (n.issue) onOpenIssue(n.issue); else if (n.to === 'directives') onOpenDirectives(); }; return (

Inbox

{unreadCount ? `${unreadCount} unread` : 'all read'} · nothing here rings twice

{unreadCount ? ( ) : null}
{days.map((day) => (
{day}
{items.filter((n) => n.day === day).map((n) => { const read = isRead(n); return (
open(n)} style={{ display: 'flex', alignItems: 'flex-start', gap: 12, padding: '11px 20px', cursor: n.issue || n.to ? 'pointer' : 'default', opacity: read ? 0.72 : 1, }} onMouseEnter={(e) => { e.currentTarget.style.background = 'var(--paper-2)'; }} onMouseLeave={(e) => { e.currentTarget.style.background = 'transparent'; }} >
{n.who ? {n.who} : null}{n.text}
{n.detail}
{n.time}
); })}
))}

I only ring the bell when it matters. The rest can wait for morning service.

); } Object.assign(window, { InboxScreen });