fix(timeline): media gallery / activity log no longer make the timeline drop messages (#259) #368

Merged
jared merged 3 commits from fix/filtered-timeline-double-count into lotus 2026-10-17 21:37:09 -04:00
Owner

Fixes #259.

The media gallery and activity log register filtered timeline sets on the room (getOrCreateFilteredTimelineSet). The room re-emits their events as live RoomEvent.Timeline, so for the rest of the session every matching event reached "new event in the room" listeners twice.

  • The timeline window shifted by an extra message per event, so loaded messages vanished.
  • Notifications, unread counts, widget feeds and ring handling saw duplicates.

Change: isFromFilteredTimelineSet() (unit-tested) identifies emits from a filtered set. These listeners now ignore them:

  • the room timeline;
  • roomToUnread;
  • message notifications;
  • clock-skew sampling;
  • call ring and decline handling;
  • widget event feeds.

Verified headless: 40 messages with every 5th a file, the gallery opened, then Bob sends 3 files and 1 text.

  • Before: the first rendered message drifted from the room start to text 4 → text 9 → text 11 → text 14 → file15.
  • After: it stays put.

tsc clean · unit tests pass · ESLint/Prettier clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5

Fixes #259. The media gallery and activity log register **filtered timeline sets** on the room (`getOrCreateFilteredTimelineSet`). The room re-emits their events as live `RoomEvent.Timeline`, so for the rest of the session every matching event reached "new event in the room" listeners **twice**. - The timeline window shifted by an extra message per event, so loaded messages vanished. - Notifications, unread counts, widget feeds and ring handling saw duplicates. **Change:** `isFromFilteredTimelineSet()` (unit-tested) identifies emits from a filtered set. These listeners now ignore them: - the room timeline; - `roomToUnread`; - message notifications; - clock-skew sampling; - call ring and decline handling; - widget event feeds. **Verified** headless: 40 messages with every 5th a file, the gallery opened, then Bob sends 3 files and 1 text. - **Before:** the first rendered message drifted from the room start to `text 4 → text 9 → text 11 → text 14 → file15`. - **After:** it stays put. `tsc` clean · unit tests pass · ESLint/Prettier clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-16 21:42:56 -04:00
fix(timeline): media gallery / activity log no longer make the timeline drop messages (#259)
CI / Build & Quality Checks (pull_request) Successful in 2m22s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 12s
CI / Playwright smoke (e2e) (pull_request) Successful in 13m16s
5b5fbdb7b7
The media gallery and activity log register filtered timeline sets on the
room (getOrCreateFilteredTimelineSet); the room re-emits their events as
live RoomEvent.Timeline, so every matching event reached "new event in
the room" listeners twice for the rest of the session. The timeline
window shifted by an extra message per event (loaded messages vanished),
and notifications, unread counts, widget feeds and ring handling saw
duplicates.

isFromFilteredTimelineSet() (unit-tested) identifies emits from a filtered
set; the room timeline, roomToUnread, message notifications, clock-skew
sampling, call ring/decline handling and widget event feeds ignore them.

Verified headless (40 messages, every 5th a file; gallery opened; Bob
sends 3 files + 1 text): before, the first rendered message drifted from
the room start to "file15"; now it stays put.

Fixes #259

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
jared added 1 commit 2026-10-17 17:52:48 -04:00
Merge remote-tracking branch 'origin/lotus' into fix/filtered-timeline-double-count
CI / Secret scan (gitleaks) (pull_request) Successful in 29s
CI / Build & Quality Checks (pull_request) Failing after 11m33s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Playwright smoke (e2e) (pull_request) Skipped
d1270956ea
# Conflicts:
#	src/app/components/CallEmbedProvider.tsx
jared added 1 commit 2026-10-17 19:08:41 -04:00
Merge branch 'lotus' into fix/filtered-timeline-double-count
CI / Build & Quality Checks (pull_request) Successful in 2m44s
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 18m21s
00e27a24e6
jared merged commit e94cdfe5dc into lotus 2026-10-17 21:37:09 -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#368