Skip to content

fix: fetch comment replies from crit-web during share sync#350

Merged
tomasz-tomczyk merged 1 commit intomainfrom
fix/fetch-replies
Apr 24, 2026
Merged

fix: fetch comment replies from crit-web during share sync#350
tomasz-tomczyk merged 1 commit intomainfrom
fix/fetch-replies

Conversation

@tomasz-tomczyk
Copy link
Copy Markdown
Owner

Summary

  • crit fetch (and re-share sync) silently dropped replies from web-authored comments because webComment struct had no Replies field
  • Add webReply struct and Replies field to webComment
  • Update mergeWebComments to map replies onto Comment.Replies for new comments
  • Add fetchWebComments() that also returns reply updates for existing comments (matched by external_id)
  • Update runFetch and runShareExisting callers

Review

  • All 21 share integration tests pass (19 existing + 2 new)
  • Full unit test suite passes

Test plan

  • TestShareSyncFetchReplies — share, seed comment + 2 replies on web, re-share, verify replies in local .crit.json
  • TestShareSyncFetchRepliesOnExistingComments — share with local comment, upsert to set external_id, seed reply on web, re-share, verify reply merged into existing local comment
  • See also: fix: add seed-reply endpoint for share integration testing crit-web#103 (seed-reply endpoint)

🤖 Generated with Claude Code

Previously, `crit fetch` and re-share silently dropped replies from
web-authored comments because the webComment struct had no Replies field.

- Add webReply struct and Replies field to webComment
- Update mergeWebComments to map replies onto Comment.Replies
- Add fetchWebComments() that also returns reply updates for existing
  comments (matched by external_id)
- Update runFetch and runShareExisting callers
- Add TestShareSyncFetchReplies and TestShareSyncFetchRepliesOnExistingComments
  integration tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tomasz-tomczyk tomasz-tomczyk merged commit b705cc1 into main Apr 24, 2026
4 checks passed
@tomasz-tomczyk tomasz-tomczyk deleted the fix/fetch-replies branch April 24, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant