+ {Object.entries(groupedThreads).length === 0 && (
+
+ Debug: No grouped threads found. groupedThreads keys: {Object.keys(groupedThreads).join(', ')}
+
+ )}
+ {Object.entries(groupedThreads).map(([topicId, topicThreads]) => {
+ const topicInfo = DISCUSSION_TOPICS.find(t => t.id === topicId)
+ if (!topicInfo || topicThreads.length === 0) return null
+
+ return (
+
+
+
+
{topicInfo.label}
+
+ ({topicThreads.length} {topicThreads.length === 1 ? t('thread') : t('threads')})
+
+
+
+ {topicThreads.map(thread => (
+ {
+ push(toNote(thread))
+ }}
+ />
+ ))}
+
+
+ )
+ })}
+
) : (