Skip to content

Fix giscus like not persisting on pre-existing empty (ghost) discussions - #500

Merged
soyalejolopez merged 1 commit into
microsoft:masterfrom
soyalejolopez:soyalejolopez-fix-report-like-button
Jul 27, 2026
Merged

Fix giscus like not persisting on pre-existing empty (ghost) discussions#500
soyalejolopez merged 1 commit into
microsoft:masterfrom
soyalejolopez:soyalejolopez-fix-report-like-button

Conversation

@soyalejolopez

Copy link
Copy Markdown
Member

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-report maps to Discussion #497 (exists, 0 reactions). For those, existedAtMount and hasDiscussion were 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

  • Local Playwright load: zero console errors, giscus mounts with correct term, detail view renders.
  • Logic peer-reviewed by GPT 5.6 (PASS).

Ref: giscus/giscus#1312

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
soyalejolopez force-pushed the soyalejolopez-fix-report-like-button branch from bb2b122 to fd75c5d Compare July 27, 2026 14:00
@soyalejolopez
soyalejolopez merged commit a0f4d8a into microsoft:master Jul 27, 2026
1 check passed
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.

2 participants