CS-725 [Bug] - Validate comment length against visible text, not raw Tiptap JSON - #3409
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Confidence score: 5/5
- Safe to merge after the addressed issues were fixed.
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
|
@cubic-dev-ai please review it. |
@chasprowebdev I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Confidence score: 5/5
- Safe to merge after the addressed issues were fixed.
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@cubic-dev-ai please review it. |
@chasprowebdev I have started the AI code review. It will take a few minutes to complete. |
|
🎉 This PR is included in version 3.110.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to merge chas/comment-length-validator into dev.
It was created by the [Auto Pull Request] action.
Summary by cubic
Validate comment length against visible text, not raw Tiptap JSON, so formatted comments aren’t rejected. Caps raw content at 50k and counts Unicode code points for accurate limits. Addresses CS-725.
MaxCommentTextLengthusingextractCommentPlainTextto count visible characters; supports paragraphs, headings, hard breaks, mentions, and lists; avoids double-counting line breaks in blockquotes.CreateCommentDtoandUpdateCommentDtoto use the validator, setRAW_CONTENT_MAX_LENGTHto 50,000, and documented the raw payload limit in OpenAPI.{ type: 'doc' }shape and reject empty Tiptap documents; added unit tests for these cases and the original regression.Written for commit fdd6cf3. Summary will update on new commits.