|
|
|
@ -238,6 +238,14 @@ function analyzeDynamicTopics(entries: EventMapEntry[]): { |
|
|
|
|
|
|
|
|
|
|
|
const allTopics = [...mainTopics, ...subtopics] |
|
|
|
const allTopics = [...mainTopics, ...subtopics] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Debug logging
|
|
|
|
|
|
|
|
console.log('Dynamic topics analysis:', { |
|
|
|
|
|
|
|
hashtagCounts: Object.fromEntries(hashtagCounts), |
|
|
|
|
|
|
|
mainTopics: mainTopics.map(t => ({ id: t.id, count: t.count })), |
|
|
|
|
|
|
|
subtopics: subtopics.map(t => ({ id: t.id, count: t.count })), |
|
|
|
|
|
|
|
allTopics: allTopics.map(t => ({ id: t.id, count: t.count, isMainTopic: t.isMainTopic, isSubtopic: t.isSubtopic })) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
return { mainTopics, subtopics, allTopics } |
|
|
|
return { mainTopics, subtopics, allTopics } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -632,6 +640,16 @@ const DiscussionsPage = forwardRef(() => { |
|
|
|
return !!dynamicTopic |
|
|
|
return !!dynamicTopic |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Debug logging for subtopic detection
|
|
|
|
|
|
|
|
if (entrySubtopics.length > 0) { |
|
|
|
|
|
|
|
console.log('Found subtopics for entry:', { |
|
|
|
|
|
|
|
threadId: entry.event.id.substring(0, 8), |
|
|
|
|
|
|
|
allTopics: entry.allTopics, |
|
|
|
|
|
|
|
entrySubtopics, |
|
|
|
|
|
|
|
dynamicTopics: dynamicTopics.allTopics.map(dt => ({ id: dt.id, isSubtopic: dt.isSubtopic })) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (entrySubtopics.length > 0) { |
|
|
|
if (entrySubtopics.length > 0) { |
|
|
|
// Group under the first subtopic found
|
|
|
|
// Group under the first subtopic found
|
|
|
|
const subtopic = entrySubtopics[0] |
|
|
|
const subtopic = entrySubtopics[0] |
|
|
|
|