feat: attribute top comments with u/ and @ handles in evidence lines (#292)

Reddit, TikTok, YouTube, Instagram, Bluesky, X and Threads top comments
now render as u/author or @handle in the evidence block, instead of the
generic "Comment (...)" label. The enrichment adapters already captured
author; only the render layer was dropping it.

Also fixes the TikTok adapter to prefer user.unique_id (the @handle) over
user.nickname (display name) so attribution round-trips to a profile URL.

Legacy "Comment (...)" shape is preserved when author is empty, [deleted],
or [removed].

Bumps to 3.0.10.

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
Matt Van Horn
2026-04-21 08:23:47 -07:00
committed by GitHub
parent 1f23e3f980
commit 952a876536
6 changed files with 132 additions and 20 deletions
+3 -1
View File
@@ -658,7 +658,9 @@ def _fetch_post_comments(
if not text:
continue
user = c.get("user") if isinstance(c.get("user"), dict) else {}
author = user.get("nickname") or user.get("unique_id") or ""
# Prefer unique_id (the @handle) over nickname (display name) so
# downstream render can cite @handle consistently across platforms.
author = user.get("unique_id") or user.get("nickname") or ""
create_time = c.get("create_time")
date_str = ""
if create_time: