Skip to content

Conversation

@SandipBajracharya
Copy link
Collaborator

@SandipBajracharya SandipBajracharya commented Jan 14, 2026

Changes

  • public api route that gets list of comments for a task
  • accept params: parentCommentId, createdBy
  • include attachment in reponse with presigned download url

Testing Criteria

Loom

@linear
Copy link

linear bot commented Jan 14, 2026

@vercel
Copy link
Contributor

vercel bot commented Jan 14, 2026

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

Project Deployment Review Updated (UTC)
tasks-app Ready Ready Preview, Comment Jan 15, 2026 11:26am

@SandipBajracharya SandipBajracharya changed the title feat(OUT-2917): public api to list comments of a task OUT-2917: public api to list comments of a task Jan 14, 2026
- [x] public api route that gets list of comments for a task
- [x] taskId required validation
- [x] accept params: taskId, parentCommentId, createdBy
- [x] include attachment in reponse with presigned download url
uploadedByUserType,
uploadedDate: RFC3339DateSchema.parse(toRFC3339(attachment.createdAt)),
}))
return await Promise.all(promises)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a chance that we will hit supabase api per sec ratelimits if there are 50+ attachments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used supabase storage's createSignedUrls() to resolve this.

Comment on lines +285 to +291
return await this.db.comment.findMany({
where,
...pagination,
include: { attachments: true },
orderBy: { createdAt: 'desc' },
})
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the comments table properly indexed here, can you please check

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created composite index with taskId, workspaceId, createdAt DESC.

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.

3 participants