Skip to content
This repository was archived by the owner on Aug 7, 2026. It is now read-only.

add vote-based interest updates and profile interest editing - #216

Open
RayanBatada wants to merge 2 commits into
DevDogsUGA:devfrom
RayanBatada:dev
Open

add vote-based interest updates and profile interest editing#216
RayanBatada wants to merge 2 commits into
DevDogsUGA:devfrom
RayanBatada:dev

Conversation

@RayanBatada

Copy link
Copy Markdown
Contributor

Updates user interest weights based on voting behavior and adds ability to edit interests in profile settings.

Changes

Vote-based Interest Updates

  • server/actions/vote.ts: Call updateInterestsFromVote() after voting on posts
  • server/actions/interests.ts: Updated updateInterestsFromVote() with simplified weight logic
  • lib/recommendations/constants.ts: Simplified to UPVOTE (+0.5) and DOWNVOTE (-0.5)

Profile Interest Editing

  • components/EditInterests.tsx: New component for adding/removing interests
  • server/actions/interests.ts: Added addInterest() and removeInterest() functions
  • app/profile/[profileId]/edit/page.tsx: Added interests section to edit page

How It Works

Voting Updates Weights

Action Weight Change
Upvote +0.5
Downvote -0.5
Upvote → Downvote -1.0
Downvote → Upvote +1.0
Remove upvote -0.5
Remove downvote +0.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant