fix(threads): viewing a room no longer reads threads you don't follow (#314) #423

Merged
jared merged 1 commits from fix/threads-stay-unread into lotus 2026-10-19 02:33:26 -04:00
Owner

Fixes #314 (decision 2026-10-19: keep them unread, don't count them in the room dot).

markAsRead with passive (simply looking at the room) sent a threaded receipt for every unread thread you don't follow. So the Threads panel's Unread filter, the "unread replies" label and Mark all read only ever worked for followed threads.

Change

  • A passive read now leaves every thread's unread state alone. Its main-timeline receipt is scoped to "main" whenever any thread has an unread reply, so it can't read thread replies either. Explicit "mark as read" still clears everything.
  • getUnreadInfo no longer counts unfollowed threads toward the room's unread dot or badge. They're subtracted like muted threads (P4-1). A mention makes a thread followed (isThreadFollowed), so highlights are never hidden. The unfollowed threads still show as unread in the Threads panel until opened or Mark all read.
  • isThreadFollowed moves to utils/room (re-exported from utils/notifications), so room.ts doesn't import the settings store.

Verified

  • New Playwright test in e2e/local-homeserver.spec.ts: Bob's thread gets a reply plus a newer main message while the room is open. It asserts the thread is still in the server's unread_thread_notifications. It fails on lotus and passes here. The #217 test still passes.
  • Unit tests: the passive cases are updated to the new rule; a new getUnreadInfo case covers followed (counted), unfollowed (not counted) and mentioned (counted plus highlight).

tsc clean · unit tests pass · ESLint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #314 (decision 2026-10-19: keep them unread, don't count them in the room dot). `markAsRead` with `passive` (simply looking at the room) sent a threaded receipt for **every unread thread you don't follow**. So the Threads panel's **Unread** filter, the "unread replies" label and **Mark all read** only ever worked for followed threads. **Change** - A passive read now leaves **every** thread's unread state alone. Its main-timeline receipt is scoped to "main" whenever any thread has an unread reply, so it can't read thread replies either. Explicit "mark as read" still clears everything. - **`getUnreadInfo` no longer counts unfollowed threads toward the room's unread dot or badge.** They're subtracted like muted threads (P4-1). A mention makes a thread followed (`isThreadFollowed`), so **highlights are never hidden**. The unfollowed threads still show as unread in the Threads panel until opened or Mark all read. - `isThreadFollowed` moves to `utils/room` (re-exported from `utils/notifications`), so `room.ts` doesn't import the settings store. **Verified** - New Playwright test in `e2e/local-homeserver.spec.ts`: Bob's thread gets a reply plus a newer main message while the room is open. It asserts the thread is still in the server's `unread_thread_notifications`. It **fails on `lotus`** and **passes here**. The #217 test still passes. - Unit tests: the passive cases are updated to the new rule; a new `getUnreadInfo` case covers followed (counted), unfollowed (not counted) and mentioned (counted plus highlight). `tsc` clean · unit tests pass · ESLint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-19 00:52:09 -04:00
fix(threads): viewing a room no longer reads threads you don't follow (#314)
CI / Build & Quality Checks (pull_request) Successful in 1m49s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 7s
CI / Playwright smoke (e2e) (pull_request) Successful in 13m31s
fee3fbb7fc
A passive read (just looking at the room) sent a threaded receipt for
every unread thread you don't follow, so the Threads panel's Unread
filter and Mark all read only ever worked for followed threads.
Decision (2026-10-19): leave them unread until opened, but stop
counting unfollowed threads toward the room's unread dot
(getUnreadInfo subtracts them like muted threads; a mention makes a
thread followed, so highlights are never hidden). isThreadFollowed
moves to utils/room. Adds a Playwright regression.

Fixes #314

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared merged commit 029550c855 into lotus 2026-10-19 02:33:26 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#423