Skip to content

Conversation

@rebelchris
Copy link
Contributor

@rebelchris rebelchris commented Jan 23, 2026

Summary

  • Update UserHotTake interface to use upvotes/upvoted fields (matching API)
  • Fix UserVoteEntity.HotTake enum value to 'hot_take' (was 'userHotTake')
  • Add hot take specific mutation handlers for optimistic cache updates
  • Fix cache query key from ['userHotTakes'] to ['user_hot_takes']
  • Move upvote button after edit/delete buttons per design

Test plan

  • Test upvoting a hot take - button should turn green immediately (optimistic)
  • Test removing upvote - count should decrement immediately
  • Verify upvote button is positioned after edit/delete buttons
  • Verify upvote count displays correctly

Depends on: dailydotdev/daily-api#3487

🤖 Generated with Claude Code

Preview domain

https://claude-issue-5354-20260122-1859.preview.app.daily.dev

github-actions bot and others added 3 commits January 22, 2026 19:07
- Add numUpvotes and userState fields to UserHotTake interface
- Create useVoteHotTake hook with optimistic cache updates
- Add upvote button with count display to HotTakeItem component
- Integrate upvote functionality in ProfileUserHotTakes
- Add HotTake entity type to UserVoteEntity enum
- Add HotTakeList origin for analytics tracking

Closes #5354

Co-Authored-By: Chris Bongers <rebelchris@users.noreply.github.com>
- Update UserHotTake interface to use upvotes/upvoted fields
- Fix UserVoteEntity enum to use 'hot_take' matching API
- Add hot take specific mutation handlers for optimistic updates
- Fix cache query key to match useUserHotTakes
- Move upvote button after edit/delete buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rebelchris rebelchris requested a review from a team as a code owner January 23, 2026 09:01
@vercel
Copy link

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
daily-webapp Ready Ready Preview Jan 23, 2026 11:16am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
storybook Ignored Ignored Jan 23, 2026 11:16am

Request Review

rebelchris and others added 3 commits January 23, 2026 12:14
Rename UserHotTake to HotTake, update GraphQL queries and mutations
to use new names (hotTakes, addHotTake, etc.). Update all component
and hook imports accordingly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@rebelchris rebelchris merged commit 9f89a5a into main Jan 23, 2026
11 checks passed
@rebelchris rebelchris deleted the claude/issue-5354-20260122-1859 branch January 23, 2026 12:32
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.

2 participants