({
entries, selectedId, readIds, onSelect,
}: {
entries: readonly InboxEntry[]
selectedId: string | null
readIds: Record<string, true>
onSelect: (id: string) => void
})
| 271 | // ==================== Time (flat chronological) view ==================== |
| 272 | |
| 273 | function TimeView({ |
| 274 | entries, selectedId, readIds, onSelect, |
| 275 | }: { |
| 276 | entries: readonly InboxEntry[] |
| 277 | selectedId: string | null |
| 278 | readIds: Record<string, true> |
| 279 | onSelect: (id: string) => void |
| 280 | }) { |
| 281 | const { t } = useTranslation() |
| 282 | const groups = useMemo(() => groupByBucket(entries), [entries]) |
| 283 | |
| 284 | return ( |
| 285 | <> |
| 286 | {groups.map(([bucket, items]) => ( |
| 287 | <div key={bucket} className="mb-1"> |
| 288 | <div className="px-3 mt-2 mb-1 text-[10px] font-medium text-text-muted/60 uppercase tracking-wider"> |
| 289 | {t(BUCKET_KEYS[bucket])} |
| 290 | </div> |
| 291 | <div className="flex flex-col"> |
| 292 | {items.map((entry) => ( |
| 293 | <TimeRow |
| 294 | key={entry.id} |
| 295 | entry={entry} |
| 296 | active={entry.id === selectedId} |
| 297 | unread={!readIds[entry.id]} |
| 298 | onClick={() => onSelect(entry.id)} |
| 299 | /> |
| 300 | ))} |
| 301 | </div> |
| 302 | </div> |
| 303 | ))} |
| 304 | </> |
| 305 | ) |
| 306 | } |
| 307 | |
| 308 | /** Row in the flat time feed — carries the workspace label (no cluster |
| 309 | * header to provide it). */ |
nothing calls this directly
no test coverage detected