Skip to content

Development#73

Merged
sametekinpolat merged 25 commits intomainfrom
development
May 3, 2026
Merged

Development#73
sametekinpolat merged 25 commits intomainfrom
development

Conversation

@sametekinpolat
Copy link
Copy Markdown
Owner

No description provided.

sametekinpolat and others added 25 commits May 2, 2026 00:55
Adds two dedicated karma counters on the User model. The legacy
karmaScore field is kept for compatibility. DB pushed via prisma db push.
formatKarma: 999→"999", 1.2k, 15.4k, 1.5m with negative support.
slugify: converts post title to URL-safe underscore-separated slug.
… create

createPostAction now opens an interactive tx to write the initial
PostVote record (upvotes:1). votePostAction handles toggle-off,
direction-change, and new votes; updates postKarma on the author for
non-self-votes only (AC #58).
…reate

createCommentAction now uses an interactive tx to write the initial
CommentVote record (upvotes:1). voteCommentAction updates commentKarma
on the author for non-self-votes, mirroring the posts karma logic.
Adds votes sub-select to post query and postKarma+commentKarma to user
selects for both the post author and every comment author. Serializes
both to the client component.
Post vote column now wires to votePostAction with optimistic UI and
revert-on-error. Comment and post author names become Links to /u/
with a title tooltip showing formatted karma. Imports formatKarma.
Server component now passes currentUserId and per-post myVote from the
DB. CommunityPostCard gains local vote state wired to votePostAction.
AuthModal intercepts guest clicks.
Server component fetches user by username and passes postKarma /
commentKarma to UserProfileClient. Client shows total karma (formatted)
with a collapsible breakdown of Post Karma vs Comment Karma.
@sametekinpolat sametekinpolat merged commit 8e98007 into main May 3, 2026
2 checks passed
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