Skip to content

Comments

Defer fetching of invited room avatars just like for joined rooms#743

Merged
kevinaboos merged 2 commits intomainfrom
bolt-async-invited-room-avatars-17181599463947151992
Feb 20, 2026
Merged

Defer fetching of invited room avatars just like for joined rooms#743
kevinaboos merged 2 commits intomainfrom
bolt-async-invited-room-avatars-17181599463947151992

Conversation

@kevinaboos
Copy link
Member

💡 What: Optimized the adding of invited rooms to the room list by fetching their avatars asynchronously in the background.

🎯 Why: Previously, add_new_room would await the avatar fetch for invited rooms. If the network was slow or there were many invites, this would block the room_list_service_loop, delaying the display of the entire room list (since join_all waits for all futures). This change makes the initial display instant with a text avatar placeholder, and the image pops in when loaded.

📊 Impact: Reduces the latency of room list updates when invited rooms are present. Improves perceived performance during initial sync or batch updates.

🔬 Measurement: Verified via code logic analysis and cargo check. The change moves network I/O out of the critical path of the room list processing loop.


PR created automatically by Jules for task 17181599463947151992 started by @kevinaboos

Prevents blocking the room list processing loop when processing invited rooms by deferring avatar fetching to a background task. This mirrors the behavior of joined rooms and improves the responsiveness of the app, especially when handling multiple invites or slow network connections.

- Updates `add_new_room` in `src/sliding_sync.rs` to spawn `spawn_fetch_room_avatar` for invited rooms instead of awaiting `room_avatar`.
- Updates `handle_rooms_list_updates` in `src/home/rooms_list.rs` to handle `UpdateRoomAvatar` updates for invited rooms.

Co-authored-by: kevinaboos <1139460+kevinaboos@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@kevinaboos kevinaboos changed the title ⚡ Bolt: Async fetching of invited room avatars Defer fetching of invited room avatars just like for joined rooms Feb 20, 2026
@kevinaboos kevinaboos merged commit ae3cbc3 into main Feb 20, 2026
11 checks passed
@kevinaboos kevinaboos deleted the bolt-async-invited-room-avatars-17181599463947151992 branch February 20, 2026 21:10
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.

1 participant