Skip to content

Add handling for tombstoned room#760

Open
sukso96100 wants to merge 9 commits intocommetchat:mainfrom
sukso96100:feature/tombstone
Open

Add handling for tombstoned room#760
sukso96100 wants to merge 9 commits intocommetchat:mainfrom
sukso96100:feature/tombstone

Conversation

@sukso96100
Copy link

@sukso96100 sukso96100 commented Feb 24, 2026

Hello, Thanks for this cool matrix client :)

I got many tombstoned room (mostly due to room upgrades on other homeserver) and wanted feature for #482
So I have added some features for that. This PR includes 2 parts of changes.

Room tombstoned timeline event

This handles room tombstoned timeline event(m.room.tombstone) then show message "This room has been replaced" in chat timeline.

  • Defined Room tombstoned timeline event (and it's message and icon displayed on chat timeline) by adding commet/lib/client/matrix/timeline_events/matrix_timeline_event_room_tombstone.dart and commet/lib/client/timeline_events/timeline_event_room_tombstone.dart
  • Room tombstoned event mappings commet/lib/client/matrix/matrix_room.dart (Line 549-550, 738, 739)
  • Timeline view entry update for handling the tombstoned event commet/lib/ui/molecules/timeline_events/timeline_view_entry.dart

Room tombstoned message and Enter new room button on chat input area

This uses room's state to check if the room has been tombstoned, then show "This room has been replaced" message on chat input area along with a button "Enter new room". Clicking the button resolves and opens the new replacement room then if that worked, it make current user to leave the tombstoned room.

  • commet/lib/client/matrix/matrix_room.dart Line 980-111: handles room tombstoned state of the matrix room. For resolving if the room has been tombstoned and has info for new replacement room.
  • commet/lib/client/matrix_background/matrix_background_room.dart for also handling room tombstoned events of rooms in background.
  • commet/lib/client/room.dart for storing room tombstoned state.
  • commet/lib/ui/organisms/chat/chat_view.dart
    • tombstoneRoomReplacedMessage Room tombstoned message for showing on chat input area
    • tombstoneEnterNewRoom Button label text for "Enter new room" button
    • openReplacementRoomAndLeave This handles entering new replacement room then leaving the tombstoned room.
    • Line 128-163: For showing the room tombstoned message with button on the chat input area

Disclosure: I'd like to inform that I did got many help from Generative AI coding tool (OpenCode, with gpt-5.3-codex model) for understanding the codebase and working with this changes. (Sorry, I have noted about the guideline a bit late) As I do have overall understadings of changes i have made, if there is any fixes required for this PR, feel free to let me know.

Test demo

2026-02-25.01-10-12.mp4

@sukso96100 sukso96100 marked this pull request as ready for review March 1, 2026 05:15
Copy link
Contributor

@Airyzz Airyzz left a comment

Choose a reason for hiding this comment

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

Thank you for this! Looks really good, just a few small tweaks please!

@sukso96100
Copy link
Author

Thank you for this! Looks really good, just a few small tweaks please!

Thank you for the feedback :) Sure, will push additional changes!

@sukso96100 sukso96100 requested a review from Airyzz March 3, 2026 12:50
@sukso96100
Copy link
Author

@Airyzz ok, I have pushed additional changes. please have a look :)

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