Development#73
Merged
sametekinpolat merged 25 commits intomainfrom May 3, 2026
Merged
Conversation
52 comments and post page closes #52
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.
57 like and dislike closes #57
…rmission checks
69 community events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.