Skip to content

fix: inconsistent loading of discussion thread response#356

Open
naincy128 wants to merge 1 commit into
release-ulmofrom
LP-529
Open

fix: inconsistent loading of discussion thread response#356
naincy128 wants to merge 1 commit into
release-ulmofrom
LP-529

Conversation

@naincy128

@naincy128 naincy128 commented Jun 17, 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

frontend-app-discussions

Ticket

LP-529

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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