Skip to content

Conversation

@tyreseluo
Copy link
Contributor

PR content

  1. Add support for clicking matrix.to links in room messages to navigate to rooms and resolve room aliases.
  2. Implement async room alias resolution with proper error handling and user feedback through popup notifications.

Related PR

@tyreseluo tyreseluo force-pushed the feature/handle_matrix_io_links_for_rooms branch from 4675675 to 24d8652 Compare June 28, 2025 06:23
@tyreseluo tyreseluo self-assigned this Jun 28, 2025
@tyreseluo tyreseluo added waiting-on-review This issue is waiting to be reviewed 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 waiting-on-author This issue is waiting on the original author for a response labels Jun 28, 2025
Copy link
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 for the PR.

I'm a bit confused about the title of this PR. When you "handle" room aliases and links, what do you mean by "handle"? I would expect the UI to open a new tab (in Desktop mode) and show that room's content if it's joined, or if it hasn't been joined yet, then show a new view with a preview of that room and a prompt asking the user to join it.

And then in Mobile mode, the same thing would happen, but you'd just show the new room in a view that replaces the existing RoomScreen, instead of opening a new tab (since there are no tabs). I was under the impression that we'd need Julian's new stack navigation PR in order to handle this properly, in which we're able to "push" the new room view onto the stack of existing views (such that you can navigate backwards to the rooms you viewed previously). Without that functionality, we can't really offer a good user experience of navigating between multiple rooms.

This PR doesn't really seem to do any of that, so I'm a bit confused about what you intended the scope of this to be.

@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 Jul 1, 2025
@tyreseluo tyreseluo added the blocked-on-makepad Blocked on a Makepad bug or missing Makepad feature label Jul 8, 2025
@tyreseluo
Copy link
Contributor Author

Blocked on Makepad PR see: makepad/makepad#766

@tyreseluo tyreseluo removed the blocked-on-makepad Blocked on a Makepad bug or missing Makepad feature label Jul 16, 2025
@tyreseluo
Copy link
Contributor Author

tyreseluo commented Jul 16, 2025

@kevinaboos Need to update latest Makepad version, because Julian's PR about StackNavigation has been merged makepad/makepad#766, need to use something about that PR. Thanks. now i use my local latest makepad repo.

@kevinaboos
Copy link
Member

@kevinaboos Need to update latest Makepad version, because Julian's PR about StackNavigation has been merged makepad/makepad#766, need to use something about that PR. Thanks. now i use my local latest makepad repo.

Indeed, thanks for mentioning that. We have a PR already in progress that updates to the latest version of Makepad, which is #521. Once that is merged, you can proceed here.

@kevinaboos kevinaboos added the blocked Blocked on another issue or missing feature label Jul 18, 2025
@kevinaboos
Copy link
Member

Blocked on #521

@tyreseluo tyreseluo removed the blocked Blocked on another issue or missing feature label Aug 21, 2025
…edRoom in Dock

- Add src/room/can_not_preview_screen.rs: a UI for rooms that cannot be previewed or joined, with a Join button / messaging.
- Introduce PreviewedRoom variant in SelectedRoom and propagate through persistence and UI:
  - src/app.rs: import reordering and PreviewedRoom handling for room_id/room_name getters.
  - src/persistence/app_state.rs: include PreviewedRoom when saving dock state.
- Desktop & mobile UI updates for room previews:
  - src/home/main_desktop_ui.rs: register CanNotPreviewScreen, implement focus_or_crate_preview_screen_tab to create/select preview tabs, and handle room preview fetch results (show preview or can't-preview screen).
  - src/home/main_mobile_ui.rs: small logic fix (handle None | _ case).
- Improved matrix link handling in room UI:
  - src/home/room_screen.rs: enhanced handling of Matrix links (user, room id/alias, event links) — jump to known rooms (handling different RoomState cases) or request room preview for unknown rooms.
- Serialization / utils:
  - src/utils.rs: add OwnedServerNameRon wrapper to support RON (de)serialization of OwnedServerName and adjust imports.
- Misc:
  - Register new can_not_preview_screen module in src/room/mod.rs.
  - Tidy imports and adapt code to new flow.

Rationale:
Improve UX when clicking room links by showing a room preview or a clear message when the room cannot be previewed or joined. Treat previewed rooms as first-class tabs in the Dock and persist them in app state for consistent restore behaviour.
Copilot AI review requested due to automatic review settings October 31, 2025 12:52
@tyreseluo tyreseluo force-pushed the feature/handle_matrix_io_links_for_rooms branch from 4017881 to bd14ffa Compare October 31, 2025 12:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for displaying room previews when users click on Matrix room links. The implementation handles both world-readable rooms and non-world-readable rooms with different UI screens.

Key changes:

  • Added a new PreviewedRoom variant to the SelectedRoom enum to track previewed rooms in the application state
  • Implemented a new CanNotPreviewScreen UI component for rooms that cannot be previewed
  • Enhanced Matrix link handling to fetch and display room previews instead of just logging TODO messages

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils.rs Added OwnedServerNameRon wrapper for RON serialization of server names
src/room/mod.rs Registered the new can_not_preview_screen module
src/room/can_not_preview_screen.rs New UI component for displaying non-previewable rooms with join options
src/persistence/app_state.rs Extended pattern matching to include PreviewedRoom variant
src/home/room_screen.rs Enhanced Matrix link handling to fetch room previews and navigate to rooms based on their state
src/home/main_mobile_ui.rs Added catch-all pattern for unhandled room types
src/home/main_desktop_ui.rs Added focus_or_crate_preview_screen_tab method to create tabs for room previews
src/app.rs Added PreviewedRoom variant to SelectedRoom enum with supporting methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-author This issue is waiting on the original author for a response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants