Fix giscus like not persisting on pre-existing empty (ghost) discussions - #500
Merged
soyalejolopez merged 1 commit intoJul 27, 2026
Conversation
Gate remount recovery on whether the discussion has reactions instead of whether it exists. A resource whose Discussion already exists with 0 reactions (a #1312 ghost created by an earlier reverted first-reaction) now arms the remount so the first reaction sticks, matching the brand-new discussion path. Active discussions (reactionCount > 0) are left untouched. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 61593e5a-6c5f-46eb-bb43-08ee66fce301
soyalejolopez
force-pushed
the
soyalejolopez-fix-report-like-button
branch
from
July 27, 2026 14:00
bb2b122 to
fd75c5d
Compare
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
Follow-up to the earlier #1312 like-persistence fix. That fix only recovered the "no discussion yet -> first reaction creates it -> revert" path.
Some resources already have a ghost discussion: a Discussion that exists on the server with 0 reactions, created by an earlier first-reaction that reverted. Confirmed live:
purview-audit-copilot-reportmaps to Discussion #497 (exists, 0 reactions). For those,existedAtMountandhasDiscussionwere both true, so every recovery path was gated off and the first reaction still reverted. (PowerClaw worked because its discussion did not pre-exist.)Fix
Gate remount recovery on whether the discussion has reactions rather than whether it exists. An empty discussion (0 reactions) -- brand new or a pre-existing ghost -- arms the single remount so the first reaction sticks. Discussions that already have reactions are left untouched.
Validation
Ref: giscus/giscus#1312