CS-725 [Bug] - Validate comment length against visible text, not raw Tiptap JSON#3409
CS-725 [Bug] - Validate comment length against visible text, not raw Tiptap JSON#3409github-actions[bot] wants to merge 6 commits into
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 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 instead of raw Tiptap JSON to stop valid formatted comments from being rejected. Also caps raw content at 50k and counts Unicode code points for accurate limits. Addresses CS-725.
MaxCommentTextLengthusingextractCommentPlainTextto count visible characters (Unicode code points). Supports paragraphs, headings, hard breaks, mentions, lists, and 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 covering these cases and the original regression.Written for commit cb69fca. Summary will update on new commits.