fix(comments): unify create + edit limit at 2000 chars (#1535)#1543
Closed
mattwoberts wants to merge 1 commit into
Closed
fix(comments): unify create + edit limit at 2000 chars (#1535)#1543mattwoberts wants to merge 1 commit into
mattwoberts wants to merge 1 commit into
Conversation
The prior commit landed a 4000-char cap on new comments and a 2000-char cap on edited comments, which would block users from editing comments they were allowed to create. Align both create and edit to 2000 chars, update the matching frontend constants, and adjust tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
Closing — wrong direction. Will open a new PR that aligns edit limit up to 4000 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AddNewCommentto 4000 andEditCommentto 2000, which would silently block users from editing comments they were allowed to post.DEFAULT_MAX_LENGTHinCommentEditor,COMMENT_MAX_LENGTHinCommentInput, the explicit2000passed inShowComment) so the live counter, disabled-submit gating, and backend rejection all agree.Addresses GitHub issue #1535 (no character limit on comments enables spam).
Test plan
make lintcleangodotenv -f .test.env go test ./app/actionspasses (incl.TestAddNewComment_TooLongContent,TestAddNewComment_AtMaxLength,TestEditComment_TooLongContent)make watch: open a post, paste 2001 chars into the comment editor — counter goes red at the limit, Post button disablescontent🤖 Generated with Claude Code