Skip to content

fix(thread): render blocked-note placeholder and continue subtree walk#388

Merged
barrydeen merged 1 commit into
mainfrom
fix/blocked-reply-subtree-drop
Jun 26, 2026
Merged

fix(thread): render blocked-note placeholder and continue subtree walk#388
barrydeen merged 1 commit into
mainfrom
fix/blocked-reply-subtree-drop

Conversation

@dmnyc

@dmnyc dmnyc commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • In `buildNestedReplies`, a blocked note was silently dropped via `continue` with no further walk into its children
  • This caused any replies nested under a blocked note — including the user's own — to disappear from the thread entirely
  • Fix: mirrors the existing WoT-hidden behaviour — append the blocked placeholder row and `walk()` into children, so the subtree is preserved

Root cause

```swift
// Before — entire subtree silently dropped
if blockedEventIds.contains(kid.id) { continue }

// After — placeholder rendered, walk continues
if blockedEventIds.contains(kid.id) {
result.append(NestedReplyRow(row: makeRow(kid), depth: depth))
walk(parentId: kid.id, depth: depth + 1)
continue
}
```

The direct-reply list already kept blocked rows (`if row.isBlocked { visible.append(row) }`); nested replies now follow the same rule.

Before / After

Before After
image image

Test

Open a thread where a blocked user has a reply and you have a reply to that blocked note — your reply should now appear beneath the "Post from blocked user" placeholder instead of being hidden.

A blocked note in the nested-reply tree was silently dropped along with
its entire subtree, hiding the user's own replies if they were parented
to the blocked note. Mirrors the WoT-hidden behaviour: render the blocked
placeholder row and continue the DFS walk into children.
@dmnyc

dmnyc commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-on to #380 — that PR introduced the WoT-hidden placeholder pattern; this applies the same walk-and-continue logic to blocked notes, which were previously dropped silently along with their subtrees.

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