I wanted to announce Arythmatic Notes

Sumit Kumar TiwariS

Sumit Kumar Tiwari

1 min read179 words

Notes for everyone

Introduction

What is Arythmatic Notes. it depends on what you use for.

Summary

  • New upsert-style reaction endpoints POST/DELETE /api/v1/articles/<id>/reactions/ and POST/DELETE /api/v1/answers/<id>/reactions/, mirroring PostReactionView. Returns the parent serializer with my_reaction populated so the heart-button can render correct state without a follow-up fetch.

  • New GET/POST /api/v1/articles/<id>/comments/ for top-level article comments (uses the existing add_comment service which already broadcasts feed.new_comment).

  • ArticleListSerializer, ArticleDetailSerializer, AnswerListSerializer, AnswerDetailSerializer gain a my_reaction SerializerMethodField backed by the same Reaction lookup pattern PostSerializer uses.

  • Adds Answer to the engagement helper dispatch maps (_get_content_object, CommentListView fk_map) for consistency.

  • Extends soft_delete_comment to walk to whichever parent (Post / Article / Question) the comment hangs off and decrement that counter, so deleting an article comment no longer leaves Article.comment_count drifting.

Test plan

  • pytest engagement/ content/

  • Manual: react / unreact / flip on an article — counts and my_reaction round-trip

  • Manual: post + delete a comment on an article — comment_count increments and decrements correctly

  • Manual: react / unreact on an answer — answer card updates without page refresh

🤖 Generated with Claude Code

1 comment

Comments

Loading comments…

Sign in to leave a comment.