Skip to content

fix(comments): raise edit limit to 4000 to match create (#1535)#1544

Merged
mattwoberts merged 1 commit into
mainfrom
fix/1535-comment-limit-4000
May 18, 2026
Merged

fix(comments): raise edit limit to 4000 to match create (#1535)#1544
mattwoberts merged 1 commit into
mainfrom
fix/1535-comment-limit-4000

Conversation

@mattwoberts
Copy link
Copy Markdown
Contributor

Summary

  • EditComment.Validate rejected content over 2000 chars while AddNewComment.Validate allowed up to 4000, so a user could post a comment but be blocked from editing their own. Aligns the edit cap to 4000.
  • Matches the frontend save-button gating in ShowComment (newContent.length > 4000) — maxLength={4000} was already correct.
  • Adds TestEditComment_AtMaxLength so the boundary is covered the same way TestAddNewComment_AtMaxLength covers create.

Followup to #1535 (initial 4000-char create cap landed in 8295d10).

Test plan

  • make lint clean
  • godotenv -f .test.env go test ./app/actions -run 'TestAddNewComment|TestEditComment' -v — all 4 tests pass
  • make watch: edit an existing comment, paste in 4001 chars → counter goes red, Save button disables
  • Backspace to 4000 → Save enables, submit succeeds
  • Verify create flow still accepts up to 4000 chars

🤖 Generated with Claude Code

EditComment.Validate rejected content over 2000 chars while
AddNewComment allowed up to 4000, so users could post a comment but
not edit it. Aligns the edit cap and the matching frontend save-button
gating in ShowComment to 4000, and adds a boundary test mirroring
TestAddNewComment_AtMaxLength.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@mattwoberts mattwoberts merged commit 279e9a9 into main May 18, 2026
5 checks passed
@mattwoberts mattwoberts deleted the fix/1535-comment-limit-4000 branch May 18, 2026 21:18
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.

1 participant