fix: collapse reply form after submit; auto-close empty comment forms#366
Merged
tomasz-tomczyk merged 1 commit intomainfrom Apr 26, 2026
Merged
fix: collapse reply form after submit; auto-close empty comment forms#366tomasz-tomczyk merged 1 commit intomainfrom
tomasz-tomczyk merged 1 commit intomainfrom
Conversation
Reply form now collapses on successful submit instead of restoring with the just-sent text on re-render. Opening a new comment form closes other empty open forms (forms with text or in-edit are kept). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #366 +/- ##
==========================================
+ Coverage 66.86% 66.92% +0.06%
==========================================
Files 18 18
Lines 7807 7807
==========================================
+ Hits 5220 5225 +5
+ Misses 2194 2191 -3
+ Partials 393 391 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
saveOpenFormContentre-saved the still-expanded form's text intoactiveReplyFormsafter the submit handler deleted it; the new render then restored from that saved state.Review
Test plan
e2e/tests/threading.spec.ts— new "collapses and clears after successful submit" test, plus reply auto-close-empty / keep-with-texte2e/tests/multi-form.spec.ts— new "closes existing empty form" testSee also: tomasz-tomczyk/crit-web#124
🤖 Generated with Claude Code