matrix-org / matrix-org/matrix-viewer

Prevent date headers from appearing for rogue events that appear in the future

Open
#198 0 comments 0 reactions 0 assignees View on GitHub
A-archive-room-view hydrogen T-Enhancement
Dominant language
JavaScript
Stars
84
Forks
10
PR merge metrics
No merged PRs in 30d

Description

*Follow-up to https://github.com/matrix-org/matrix-public-archive/issues/182 -> https://github.com/matrix-org/matrix-public-archive/pull/196*

Since we updated Hydrogen in https://github.com/matrix-org/matrix-public-archive/pull/189, there are date headers throughout the timeline. But in cases like Gitter historical rooms where we imported a bunch of history, we have a lot of timestamp massaged messages with sprinkled in membership from a future date since we couldn't timestamp massage those.

We could prevent date headers from appearing for these rogue events that appear in the future.

Example where we are viewing messages from 2015-11-15 with a bunch of join events from 2023-01-30: `.../roomid/PXiGeGziDhOzVYIsAc:gitter.im/date/2015/11/15`

![](https://user-images.githubusercontent.com/558581/234805359-b139537f-c392-42cd-bba5-b865d284dd92.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the example room URL and inspect the timeline date-header rendering for events whose timestamps are in the future relative to the viewed history. Done means rogue future events no longer create date headers, while headers for events in the relevant historical range still appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.