Skip to content

Innitial implementation of nested comments/replies - #125

Open
RomanKholod wants to merge 1 commit into
devfrom
Task/ssad-0124/Create-reply-to-comments
Open

Innitial implementation of nested comments/replies#125
RomanKholod wants to merge 1 commit into
devfrom
Task/ssad-0124/Create-reply-to-comments

Conversation

@RomanKholod

Copy link
Copy Markdown
Contributor

No description provided.

@RomanKholod RomanKholod self-assigned this Mar 3, 2026
@RomanKholod RomanKholod linked an issue Mar 3, 2026 that may be closed by this pull request
@Serpantyn

Copy link
Copy Markdown
Contributor

Closing this PR. This feature has been actively in progress under task #109 and assigned to me for the entire week. The complete implementation is already submitted in PR #121
You should have verified the board statuses and synced with the team before starting new work.

@Serpantyn Serpantyn closed this Mar 4, 2026
@RomanKholod RomanKholod reopened this Mar 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Mar 6, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@DrFaust555 DrFaust555 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In practice, this PR should be closed as an outdated duplicate, and not refined.

Notes

  1. The functionality is already implemented in merged PR #121.
    PR #121 contains replies, moderation, migration, full tree construction and broader tests. In the comment to #125, it was already requested to be closed due to duplication. Now the PR conflicts with dev.
  2. There is no migration for ParentCommentId.
    The field is added to Comment, but the migration and model snapshot are not updated. The column and self-FK will not appear in the existing DB. The corresponding migration is present in #121.
  3. Reply can be tied to a comment of another Streetcode.
    The Handler only checks the existence of parent, but not parentComment.StreetcodeId == command.Comment.StreetcodeId (code). As a result, the reply will be displayed in the wrong thread or will be lost altogether.
  4. GET actually supports only one level of nesting.
    The request uses only .Include(c => c.Replies) and does not load the next levels (handler). At the same time, the API allows you to respond to a reply, so the third and subsequent levels are created, but not returned.
  5. The author of the reply can be returned as Unknown User.
    There is no ThenInclude(r => r.User) for Replies, and the mapper substitutes Unknown User if User is missing. Since the repository uses AsNoTracking, automatic relationship fix-up will not fix this.
  6. The tests do not pass.
    Result: 318 passed, 1 failed. A new Handle_ReturnsSuccess_WhenReplyIsValid is thrown: ParentCommentId == 1 is expected, actually null (assert).

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.

[Task][User/Replying to Comments] Create reply

3 participants