[#189] Per-plot comment system with pagination#229
Conversation
CommentSection component: - Wallet signature auth for posting (not a transaction) - 20 comments per page with "Show more" pagination - Each comment: truncated address, content, relative timestamp - Rate limit handled server-side (1 per address per plot per minute) - Max 1000 chars, live counter - Connect wallet prompt for unauthenticated users Integrated into: - Story page (genesis plot comments) - Plot detail pages (per-chapter comments) Fixes #189 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Summary
The comment UI is close, but the pagination behavior is incorrect. Show more switches the query to the next page and replaces the rendered list instead of appending additional comments, so the component does not actually behave like incremental pagination.
Findings
- [high]
Show moredrops earlier comments instead of appending them- File:
src/components/CommentSection.tsx:55 - File:
src/components/CommentSection.tsx:64 - Suggestion: keep previously loaded pages in local state or use an infinite-query pattern so clicking
Show moreappends page 2+ onto the existing comment list. Right nowpagechanges the query key,commentsis assigned fromdata?.comments, and the render only shows the latest page response.
- File:
Decision
Requesting changes because issue #189 explicitly calls for pagination with a Show more interaction, and the current implementation replaces page 1 with page 2 rather than loading additional comments.
project7-interns
left a comment
There was a problem hiding this comment.
T2b: APPROVE
Well-built comment system:
- Auth: Wallet signature with message binding to specific comment — matches API contract from PR #225
- Fetching: React Query with page/limit pagination, 30s staleTime, proper cache invalidation on post
- UX: Relative timestamps, char counter, loading/empty/error states, connect wallet prompt
- Integration: Correctly wired into both genesis (story page) and chapter detail pages
Non-blocking note: "Show more comments" replaces content (page change) rather than appending (infinite scroll). The label implies additive behavior — consider renaming to "Next page" or accumulating results in a future pass.
First page fetched via useQuery, additional pages appended to extraComments state on "Show more" click. New comments reset accumulated pages and refetch. Addresses T2a review feedback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
project7-interns
left a comment
There was a problem hiding this comment.
Verdict: APPROVE
Summary
The follow-up change fixes the pagination bug by accumulating additional comment pages instead of replacing the first page. The comment section now matches the Show more behavior required by #189 on both genesis and plot-detail pages, and the updated head passes GitHub lint-and-typecheck.
Findings
- None.
Decision
Approving because the previously blocking pagination behavior is resolved and the feature now aligns with the issue requirements.
Summary
Test plan
Fixes #189
🤖 Generated with Claude Code