feat(comment): add emoji reaction support for comments (#405)

* feat(comment): add emoji reaction support for comments

* fix(webui): adjust emoji picker trigger icon size to match mark-done icon

* fix(webui): prevent search icon and placeholder overlap in emoji picker

* fix(webui): use normal text color for reaction count

* feat(db): limit comment reaction code column to VarChar(32)
This commit is contained in:
Yiling-J
2026-09-14 15:01:36 +08:00
committed by GitHub
parent ede52e5009
commit def42cd000
29 changed files with 3084 additions and 41 deletions
+19
View File
@@ -218,6 +218,7 @@ model User {
teamMembers TeamMember[] @relation("UserToTeamMember")
comments AssetComment[] @relation("UserToAssetComment")
completionChangedComments AssetComment[] @relation("UserToAssetCommentCompletionChanged")
commentReactions AssetCommentReaction[] @relation("UserToAssetCommentReaction")
createdInvites Invite[] @relation("UserToInvite")
createdNotifications Notification[] @relation("UserToCreatedNotification")
notifications Notification[] @relation("UserToNotification")
@@ -656,6 +657,7 @@ model AssetComment {
replies AssetComment[] @relation("CommentReplies")
attachments AssetCommentAttachment[] @relation("CommentToAttachment")
reactions AssetCommentReaction[] @relation("CommentToReaction")
@@index([assetId])
@@map("asset_comments")
@@ -675,6 +677,23 @@ model AssetCommentAttachment {
@@map("asset_comment_attachments")
}
model AssetCommentReaction {
id String @id @default(ulid())
createdAt DateTime @default(now()) @map("created_at")
commentId String @map("comment_id")
comment AssetComment @relation("CommentToReaction", fields: [commentId], references: [id], onDelete: Cascade)
userId String @map("user_id")
user User @relation("UserToAssetCommentReaction", fields: [userId], references: [id], onDelete: Cascade)
code String @db.VarChar(32)
@@unique([commentId, userId, code])
@@index([commentId])
@@map("asset_comment_reactions")
}
model AssetEmbedding {
id String @id @default(ulid())
embedding Unsupported("vector(1536)")?