feat(server): comment model (#12760)

close CLOUD-226

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced support for comments and replies within workspaces and
documents, enabling users to create, update, delete, and resolve
comments, as well as manage threaded replies.
- **Bug Fixes**
- Added user-friendly error messages and handling for situations where
comments or replies are not found.
- **Tests**
- Added comprehensive tests to ensure correct behavior of comment and
reply operations.
- **Localization**
  - Added English translations for new comment and reply error messages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->














#### PR Dependency Tree


* **PR #12760** 👈
  * **PR #12909**
    * **PR #12911**
      * **PR #12761**
        * **PR #12924**
          * **PR #12925**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
fengmk2
2025-06-28 16:01:53 +08:00
committed by GitHub
parent 9b881eb59a
commit e2a799c70a
13 changed files with 1049 additions and 2 deletions
@@ -907,4 +907,14 @@ export const USER_FRIENDLY_ERRORS = {
args: { reason: 'string' },
message: ({ reason }) => `Invalid indexer input: ${reason}`,
},
// comment and reply errors
comment_not_found: {
type: 'resource_not_found',
message: 'Comment not found.',
},
reply_not_found: {
type: 'resource_not_found',
message: 'Reply not found.',
},
} satisfies Record<string, UserFriendlyErrorOptions>;