Summary
IssueDetailPage.razor calls CommentClient.GetAllAsync() without passing the current issueId. This causes all comments for all issues to be fetched from the API and then filtered client-side with .Where(c => c.Issue.Id.ToString() == Id).
Root Cause
// IssueDetailPage.razor — LoadData()
_comments = await CommentClient.GetAllAsync();
_comments = _comments?.Where(c => c.Issue.Id.ToString() == Id).ToList();
CommentApiClient.GetAllAsync(string? issueId = null) already has the optional issueId parameter — it's just not being passed.
Fix
_comments = await CommentClient.GetAllAsync(issueId: Id);
// No client-side filter needed after this
Impact
- Every issue detail page load fetches the entire comments collection from MongoDB
- Gets progressively slower as the total comment count grows
- Unnecessary data transfer over the wire
Acceptance Criteria
Files
src/Web/Components/Features/Issues/IssueDetailPage.razor
src/Web/Components/Features/Comments/CommentApiClient.cs (verify param name)
Summary
IssueDetailPage.razorcallsCommentClient.GetAllAsync()without passing the currentissueId. This causes all comments for all issues to be fetched from the API and then filtered client-side with.Where(c => c.Issue.Id.ToString() == Id).Root Cause
CommentApiClient.GetAllAsync(string? issueId = null)already has the optionalissueIdparameter — it's just not being passed.Fix
Impact
Acceptance Criteria
CommentClient.GetAllAsync(Id)is called with the issue ID.Where()filter is removed (server does the filtering)Files
src/Web/Components/Features/Issues/IssueDetailPage.razorsrc/Web/Components/Features/Comments/CommentApiClient.cs(verify param name)