Skip to content

fix: hide ThreadIndicator badge inside ThreadDrawer compose box#347

Merged
7w1 merged 2 commits intodevfrom
fix/thread-indicator
Mar 18, 2026
Merged

fix: hide ThreadIndicator badge inside ThreadDrawer compose box#347
7w1 merged 2 commits intodevfrom
fix/thread-indicator

Conversation

@Just-Insane
Copy link
Contributor

Problem

Inside the ThreadDrawer, the compose box was showing a redundant "Thread" badge in the reply chip — Thread ←Evie... — even though the user is already in thread context (the drawer makes it obvious they're replying to a thread).

Root cause: the reply draft always sets relation.rel_type = RelationType.Thread when threadRootId is set (correct, needed for the wire format), but the ThreadIndicator render condition had no guard for this context.

Fix

Add a !threadRootId guard to the ThreadIndicator render condition in RoomInput.tsx:

// Before
{replyDraft.relation?.rel_type === RelationType.Thread && (

// After
{replyDraft.relation?.rel_type === RelationType.Thread && !threadRootId && (

The indicator continues to show in the main timeline compose box (where the visual cue is useful).

Tests

4 unit tests added to ThreadIndicator.test.tsx covering all four branches of the condition.

Inside the ThreadDrawer the user is already in thread context, so showing
the "Thread" badge in the reply chip is redundant and visually noisy.

The compose box always sets replyDraft.relation.rel_type = RelationType.Thread
when threadRootId is set (so the message goes to the right thread), but that
should not make the ThreadIndicator visible there.

Add !threadRootId guard to the ThreadIndicator render condition.

Adds 4 unit tests covering the four branches of the condition.
@Just-Insane Just-Insane requested review from 7w1 and hazre as code owners March 17, 2026 21:58
@Just-Insane Just-Insane reopened this Mar 18, 2026
@github-actions
Copy link
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-347-sable.raspy-dream-bb1d.workers.dev e1d51ad pr-347 Wed, 18 Mar 2026 13:47:34 GMT

@7w1 7w1 added this pull request to the merge queue Mar 18, 2026
Merged via the queue into dev with commit 53a652b Mar 18, 2026
19 checks passed
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