Repository navigation
fix: update comments in place, and keep the overlay's list after deleting a post - #1777
Merged
Merged
Conversation
Posting, editing, deleting, approving or declining a comment called navigator.reload(). That remounted the page and scrolled to the top. When the post was open as an overlay from Home or the Roadmap, it also replaced the list with the full post page, so "Back to all suggestions" disappeared. PostDetails now refetches the comments and notifies the parent list. CommentInput clears its editor by remounting it and shows the moderation toast directly. Approving a post refreshes in place too. DiscussionPanel was unused and is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or decline Deleting or declining a post always called goHome(). With the post open as an overlay from the Roadmap, that left the Roadmap for Home. PostDetails takes an onPostRemoved callback. Home and Roadmap use it to close the overlay and drop the post from their list. The standalone post page still goes home. The decline path no longer waits 1.5s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattwoberts
enabled auto-merge
November 18, 2026 14:38
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.
Problem
Since the SPA navigation change (#1773), posting a comment calls
navigator.reload(). Editing, deleting, approving and declining a comment do the same.navigator.reload()refetches the page payload and remounts the page, so:Fix
Comment mutations now update in place:
PostDetailsgets arefreshComments()that refetches the comments and callsonDataChangedso the list behind the overlay stays current. It is passed toCommentInput(onCommentAdded) andShowComment(onChanged).CommentInputclears its editor by remounting it with a new key, and shows the "awaiting moderation" toast directly. TheCOMMENT_CREATED_MODERATIONsession flag only existed to survive the reload, so it is removed.DiscussionPanel.tsxwas not imported anywhere and is deleted.PostDetailstakes anonPostRemovedcallback for this. The standalone post page still goes home. Declining no longer waits 1.5s first.Testing
make lintandmake testpass./roadmapand the post left the list. Same from the Home overlay on/. Deleting from a directly opened/posts/Npage still goes home.🤖 Generated with Claude Code