// 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 (
{unreadCount ? `${unreadCount} unread` : 'all read'} · nothing here rings twice
I only ring the bell when it matters. The rest can wait for morning service.