Fix nested comments not displaying on comment view page

Summary

  • Fixed nested comments not being displayed when opening a comment directly via URL
  • The pagination logic was hardcoded to look for depth === 1, which only works for main posts
  • Changed to dynamically calculate depth based on postData.depth + 1

Problem

When a user opens a comment directly (e.g., /hive-160391/@gtg/hive-hardfork-25-jump-starter-kit), the nested replies to that comment were not shown.

Root Cause

The comment pagination logic in content.tsx filtered comments with comment.depth === 1, assuming we're always viewing the root post. When viewing a comment (which has depth > 0), its replies have depth = postData.depth + 1, not depth === 1.

Solution

Changed the filter from:

comment.depth === 1

to:

comment.depth === postData.depth + 1

Test plan

  • Open a post with nested comments
  • Click on a nested comment link to open it in a new page
  • Verify that replies to that comment are now displayed

Fixes #769 (closed)

🤖 Generated with Claude Code

Merge request reports

Loading