Skip to content

Tombstone Room Screen and tombstone indicator#536

Merged
kevinaboos merged 49 commits into
project-robius:mainfrom
alanpoon:tombstone_indicator#178
Sep 23, 2025
Merged

Tombstone Room Screen and tombstone indicator#536
kevinaboos merged 49 commits into
project-robius:mainfrom
alanpoon:tombstone_indicator#178

Conversation

@alanpoon
Copy link
Copy Markdown
Contributor

@alanpoon alanpoon commented Jul 3, 2025

Screen.Recording.2025-07-09.at.9.52.16.AM.mov
  • Add Tombstone badge in room preview, in replacement of unread messages count
  • Add Successor room redirection if room is tombstones
  • Test on Desktop
  • Test on Mobile
  • m.room.tombstone event, replacement_room: A room_id that user has joined -> Click join_successor button redirect to successor room.
  • m.room.tombstone event, replacement_room: A room_id that user has not joined. -> Shows "You are not invited to this room" error. Currently shows "Client unable to find the room".
  • Display m.room.tombstone's body message
    How to tombstone a room?
  • Successor Room has been loaded when set_displayed_tombstone.
  • Successor Room has not been loaded when set_displayed_tombstone.
  1. Go to Element's Developer tool, send custom event (m.room.tombstone)
    `{ "body" : "The room has been replaced", "replacement_room": "[Some room_id]"}

@alanpoon alanpoon force-pushed the tombstone_indicator#178 branch from 72d036f to a4e48fa Compare July 8, 2025 07:19
@alanpoon alanpoon marked this pull request as ready for review July 9, 2025 02:06
@alanpoon alanpoon force-pushed the tombstone_indicator#178 branch from 3de3fa1 to 8945968 Compare July 9, 2025 02:11
@alanpoon alanpoon self-assigned this Jul 9, 2025
@alanpoon alanpoon added the waiting-on-review This issue is waiting to be reviewed label Jul 15, 2025
@kevinaboos
Copy link
Copy Markdown
Member

Is this ready for review? Seems like there are still a few remaining to-do items, or do you have specific questions? If so, let me know what you're having problems with.

@kevinaboos kevinaboos removed the waiting-on-review This issue is waiting to be reviewed label Jul 18, 2025
@alanpoon
Copy link
Copy Markdown
Contributor Author

Is this ready for review? Seems like there are still a few remaining to-do items, or do you have specific questions? If so, let me know what you're having problems with.

A room is tombstoned if it has received a m.room.tombstone state event; see Room::tombstone_content.

Currently, my solution decides if a room is tombstoned when adding the new room instead of actually waiting for room state event m.room.tombstone.

  1. I am wondering if I should extend RoomScreen.rs instead of a new tombstone screen.
  2. Should I have that many mutex lock when displaying the tombstone screen?

@kevinaboos
Copy link
Copy Markdown
Member

  1. I am wondering if I should extend RoomScreen.rs instead of a new tombstone screen.

Certainly yes, this should be part of RoomScreen. Note that users may still want to view and interact with events in a tombstoned room; they just won't be able to send messages to it.

  1. Should I have that many mutex lock when displaying the tombstone screen?

Hm? Not sure what you're referring to.

@alanpoon alanpoon force-pushed the tombstone_indicator#178 branch from e77f14d to 3461d94 Compare July 31, 2025 10:35
@alanpoon alanpoon added the waiting-on-review This issue is waiting to be reviewed label Jul 31, 2025
Copy link
Copy Markdown
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a great start. I left some comments about the structure of the code and how tombstoned info is sent throughout the app.

In general, when we discover a new room from the homeserver, don't we already know whether it has been tombstoned? And when we know whether a room is_tombstoned, we should be able to immediately retrieve the tombstoned info via successor_room(), which internally calls tombstone_content()?

I think we should be able to store the tombstoned/successor room information in the RoomScreen itself (more specifically, the TimelineUiState) once we discover it. We can do this instead of just maintaining a single is_tombstoned bool, right?

Comment thread src/home/main_mobile_ui.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/sliding_sync.rs
Comment thread src/sliding_sync.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
@kevinaboos kevinaboos removed the waiting-on-review This issue is waiting to be reviewed label Aug 5, 2025
@alanpoon alanpoon added waiting-on-author This issue is waiting on the original author for a response waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Aug 20, 2025
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
Comment thread src/sliding_sync.rs Outdated
Comment thread src/app.rs Outdated
@kevinaboos kevinaboos added waiting-on-author This issue is waiting on the original author for a response and removed waiting-on-review This issue is waiting to be reviewed labels Aug 21, 2025
alanpoon and others added 3 commits August 21, 2025 10:37
Co-authored-by: Kevin Boos <1139460+kevinaboos@users.noreply.github.com>
@alanpoon alanpoon added waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Aug 21, 2025
Copy link
Copy Markdown
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things look generally good! Just a few small comments.

Apologies for the delay, I was working on a conference talk and traveling to said conference, as you likely already know.

Comment thread src/app.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/room_screen.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/home/rooms_list.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
Comment thread src/home/tombstone_footer.rs Outdated
@kevinaboos kevinaboos added waiting-on-author This issue is waiting on the original author for a response and removed waiting-on-review This issue is waiting to be reviewed labels Sep 23, 2025
@alanpoon alanpoon added waiting-on-review This issue is waiting to be reviewed and removed waiting-on-author This issue is waiting on the original author for a response labels Sep 23, 2025
Copy link
Copy Markdown
Member

@kevinaboos kevinaboos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, great work!

@kevinaboos
Copy link
Copy Markdown
Member

I thought we had a "join room" icon already, but apparently not. I'll add one and use it for both the successor room button the join room modal as well.

@kevinaboos kevinaboos removed the waiting-on-review This issue is waiting to be reviewed label Sep 23, 2025
@kevinaboos kevinaboos merged commit bd07f72 into project-robius:main Sep 23, 2025
11 checks passed
kevinaboos added a commit to kevinaboos/robrix that referenced this pull request Sep 25, 2025
Previously, PR project-robius#536 added support for showing a tombstoned room
and information about its successor/replacement room,
but did not fully handle the case where a new room is unknown.
We now handle that properly, and also support deferred navigation
to the newly-joined room that waits for it to actually joined and
fully loaded/received by our client from the homeserver,
at which point it can actually jump to that new room.
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