Skip to content

fix: inconsistent loading of discussion thread response#37

Open
naincy128 wants to merge 1 commit into
masterfrom
naincy128/LP-529
Open

fix: inconsistent loading of discussion thread response#37
naincy128 wants to merge 1 commit into
masterfrom
naincy128/LP-529

Conversation

@naincy128

@naincy128 naincy128 commented Jun 29, 2026

Copy link
Copy Markdown

Description

Fixes an issue where inline replies within discussion threads could load inconsistently, causing some replies to appear or disappear between page refreshes.

Root Cause

Response comments were not being retrieved using backend-level pagination. Combined with frontend request race conditions and stale state handling, this could result in inconsistent loading of inline replies, especially in threads with many responses.

As a result, users could see different combinations of replies on successive page refreshes, even though the underlying discussion data was unchanged.

Changes

Backend (edx-platform)

  • Updated response comment retrieval to use forum backend pagination APIs (get_comments and get_comments_count).
  • Moved response-comment pagination to the forum backend for more reliable and efficient loading.
  • Removed unused code related to the previous pagination approach.

Frontend (frontend-app-discussions)

  • Added request cancellation using AbortController to prevent stale requests from overwriting newer data.
  • Cleared stale child-comment state when reloading response comments.

Linked PR

edx-platform

Ticket

LP-529

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