1c9223b2

Author: Michael Lynch <git@mtlynch.io>

Committer: Michael Lynch <mtlynch@noreply.codeberg.org>

Import Tinybeans comment threads without duplicating root comments (#50)

Tinybeans exports threaded conversations in comment-thread-*.json files,
but metadata.json only includes the root comments for each media item.
Little Moments does not support comment subthreads, so the importer needs
to read those extra files and flatten the replies into a single comment
list during conversion.

This change teaches tinybeans.Parse to read comment-thread-*.json files,
parse nested replies, and merge each thread back onto the matching root
comment from metadata.json by comment ID. If a thread file refers to a
root comment that is missing from metadata.json, parsing now fails with a
clear error instead of silently importing inconsistent data.

Convert now walks threaded Tinybeans comments and rewrites them into flat
Little Moments comments ordered by CreatedAt. That preserves the full
conversation while avoiding the duplicate-root bug described in DESIGN.md,
where the thread root appears both in metadata.json and in the matching
comment-thread-*.json file.

The test suite now covers:
- parsing comment-thread-*.json files directly
- merging thread replies into parsed entry comments
- flattening threaded comments during conversion without duplicating the
  root comment

Reviewed-on: https://codeberg.org/mtlynch/little-moments/pulls/50
Co-authored-by: Michael Lynch <git@mtlynch.io>
Co-committed-by: Michael Lynch <git@mtlynch.io>
configuredevShellbackendbackend-devcheck-bashcheck-frontendcheck-go-formattingcheck-trailing-newlinecheck-trailing-whitespacediagramdocker-imagee2e-testsgo-testsimport-from-tinybeanslint-sqllittle-momentslittle-moments-devx86_64-linux