A community based topic aggregation platform built on atproto

feat(service): implement comment query service with threading master

Add service layer orchestrating comment queries and thread assembly: comment_service.go (285 lines): - GetComments: Main query method with validation and pagination - buildThreadViews: Recursively constructs comment trees - Iterative loading strategy (loads 5 replies per level) - Respects depth limit (default 10, max 100) - Sets HasMore flag for pagination hints - buildCommentView: Converts entities to API views - Hydrates author from CommenterHandle - Builds stats (upvotes, downvotes, score, replyCount) - Creates post/parent references with CIDs - Stub viewer state (Phase 2B) - validateGetCommentsRequest: Input validation with defaults view_models.go (150 lines): - CommentView: Complete comment with author, stats, viewer state - ThreadViewComment: Recursive wrapper for nested replies - Supporting types matching lexicon definitions - Follows existing patterns from posts.AuthorView Changes to existing files: - comment.go: Add CommenterHandle field (hydrated at query time) - errors.go: Add IsValidationError helper for handler error mapping Design decisions: - Empty slices instead of nil (JSON serialization) - Iterative loading prevents N+1 query explosion - Soft-deleted comments filtered out - Post/user integration stubbed (Phase 2C) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>


+362
4 changed files