BlueGit

ict rusty-teams

Files

rusty-teams / crates / app / src / views / shell.rs

shell.rs

shell.rs 26.2 KiB Download Raw
1use gpui_kit::component::{h_flex, v_flex};
2use gpui_kit::*;
3
4use super::activity_panel::{ActivityPanel, ActivityPanelEvent};
5use super::call_mini::render_call_mini;
6use super::call_stage::render_stage_overlay;
7use super::call_view::render_call_view;
8use super::conversation::{ConversationView, ReplyToHovered};
9use super::dialog_overlay::render_task_dialog;
10use super::forward_dialog::{ForwardDialog, ForwardDialogEvent};
11use super::profile_card::{ProfileCard, ProfileCardEvent};
12use super::saved_panel::{SavedPanel, SavedPanelEvent};
13use super::shortcuts::{
14 AcceptCall, DeclineCall, HangUpCall, NextConversation, OpenActivity, OpenChannelsTab,
15 OpenCallsTab, OpenChatsTab, OpenSaved, PreviousConversation, Scope, ShowShortcuts, ToggleCallCamera,
16 ToggleCallShare,
17};
18use super::shortcuts_dialog::{ShortcutsDialog, ShortcutsDialogEvent};
19use super::sidebar::{SIDEBAR_WIDTH, SidebarView};
20use super::status_bar::render_status_bar;
21use super::status_menu::own_status_button;
22use super::status_message_dialog::{StatusMessageDialog, StatusMessageDialogEvent};
23use super::switcher::{Switcher, SwitcherEvent, candidates_from};
24use super::title_bar::render_title_bar;
25use crate::activity::ActivityCenter;
26use crate::app_state::{AppEvent, AppState, Selection};
27use crate::call::{CallMedia, CallWindows};
28use crate::embedded_web::{Overlays, RootFocus};
29use crate::notice::NoticeAction;
30use crate::notify::{NotificationCenter, selection_for};
31use crate::sidebar_model::Step;
32use crate::theme;
33use crate::updater::{self, IdleInputs, UpdateStatus};
34
35actions!(teams, [OpenSwitcher, NewChat, ToggleCallMute]);
36
37pub fn bind_keys(cx: &mut App) {
38 super::composer::bind_keys(cx);
39 super::shortcuts::bind_scopes(cx, &[Scope::Global, Scope::OutsideComposer, Scope::GlobalOverTextFields]);
40}
41
42#[derive(Debug, Clone, Copy)]
43pub enum OpenTarget {
44 Chat(usize),
45 Channel(usize),
46}
47
48#[derive(Default)]
49pub struct Startup {
50 pub switcher_query: Option<String>,
51 pub composer_text: Option<String>,
52 pub reply_to_last: bool,
53}
54
55pub struct AppShell {
56 state: Entity<AppState>,
57 sidebar: Entity<SidebarView>,
58 conversation: Entity<ConversationView>,
59 call_chat: Option<(String, Entity<ConversationView>)>,
60 switcher: Option<Entity<Switcher>>,
61 notifications: Entity<NotificationCenter>,
62 _call_windows: Entity<CallWindows>,
63 activity: Entity<ActivityCenter>,
64 activity_panel: Option<Entity<ActivityPanel>>,
65 saved_panel: Option<Entity<SavedPanel>>,
66 forward_dialog: Option<Entity<ForwardDialog>>,
67 status_dialog: Option<Entity<StatusMessageDialog>>,
68 shortcuts_dialog: Option<Entity<ShortcutsDialog>>,
69 profile_card: Option<Entity<ProfileCard>>,
70 focus_handle: FocusHandle,
71 open_target: Option<OpenTarget>,
72 update: UpdateStatus,
73 _subscription: Subscription,
74 _call_media_observation: Subscription,
75 _activity_observation: Subscription,
76 _escape_observation: Subscription,
77}
78
79impl AppShell {
80 fn sync_call_chat(&mut self, thread: Option<String>, window: &mut Window, cx: &mut Context<Self>) {
81 match (thread, &self.call_chat) {
82 (Some(wanted), Some((open, _))) if &wanted == open => {}
83 (Some(wanted), _) => {
84 let app = self.state.clone();
85 let selection = Selection::Chat(wanted.clone());
86 let view = cx.new(|cx| ConversationView::pinned_to(app, selection, window, cx));
87 self.call_chat = Some((wanted, view));
88 }
89 (None, _) => self.call_chat = None,
90 }
91 }
92
93 pub fn new(
94 state: Entity<AppState>,
95 open_target: Option<OpenTarget>,
96 startup: Startup,
97 window: &mut Window,
98 cx: &mut Context<Self>,
99 ) -> Self {
100 let call_media = cx.new(|_| CallMedia);
101 state.update(cx, |state, _| state.call_media = Some(call_media.clone()));
102 let call_media_observation = cx.observe(&call_media, |_, _, cx| cx.notify());
103 let sidebar = cx.new(|cx| SidebarView::new(state.clone(), cx));
104 let conversation = cx.new(|cx| ConversationView::new(state.clone(), window, cx));
105 let subscription =
106 cx.subscribe_in(&state, window, |this, _, event: &AppEvent, window, cx| {
107 if matches!(event, AppEvent::Sidebar | AppEvent::Status) {
108 this.apply_open_target(cx);
109 }
110 if matches!(event, AppEvent::Forward) {
111 this.open_forward_dialog(window, cx);
112 }
113 if matches!(event, AppEvent::StatusMessage) {
114 this.open_status_dialog(window, cx);
115 }
116 if matches!(event, AppEvent::NotificationSettings) {
117 this.notifications
118 .update(cx, |center, cx| center.open_settings(cx));
119 }
120 if matches!(event, AppEvent::Profile) {
121 this.open_profile_card(window, cx);
122 }
123 cx.notify();
124 });
125 let focus_handle = cx.focus_handle();
126 window.focus(&focus_handle, cx);
127 cx.set_global(RootFocus(focus_handle.clone()));
128 let notifications = cx.new(|cx| NotificationCenter::new(state.clone(), window, cx));
129 let call_windows = cx.new(|cx| CallWindows::new(state.clone(), window, cx));
130 let activity = cx.new(|cx| ActivityCenter::new(state.clone(), window, cx));
131 let activity_observation = cx.observe(&activity, |_, _, cx| cx.notify());
132 let escape_observation = cx.observe_keystrokes(|this, event, _, cx| {
133 if event.keystroke.key == "escape" {
134 this.state.update(cx, |state, cx| state.leave_stage_fullscreen(cx));
135 }
136 });
137 let closing = notifications.clone();
138 window.on_window_should_close(cx, move |_, cx| !closing.read(cx).intercept_close(cx));
139 let mut shell = AppShell {
140 state,
141 sidebar,
142 conversation,
143 call_chat: None,
144 switcher: None,
145 notifications,
146 _call_windows: call_windows,
147 activity,
148 activity_panel: None,
149 saved_panel: None,
150 forward_dialog: None,
151 status_dialog: None,
152 shortcuts_dialog: None,
153 profile_card: None,
154 focus_handle,
155 open_target,
156 update: UpdateStatus::UpToDate,
157 _subscription: subscription,
158 _call_media_observation: call_media_observation,
159 _activity_observation: activity_observation,
160 _escape_observation: escape_observation,
161 };
162 shell.apply_open_target(cx);
163 let Startup {
164 switcher_query,
165 composer_text,
166 reply_to_last,
167 } = startup;
168 if let Some(query) = switcher_query {
169 shell.toggle_switcher(&query, window, cx);
170 }
171 if composer_text.is_some() || reply_to_last {
172 cx.defer_in(window, move |this, window, cx| {
173 this.conversation.update(cx, |conversation, cx| {
174 if reply_to_last {
175 conversation.reply_to_latest_from_others(window, cx);
176 }
177 if let Some(text) = composer_text {
178 conversation.set_composer_text(&text, window, cx);
179 }
180 });
181 });
182 }
183 #[cfg(windows)]
184 cx.spawn_in(window, async move |this, cx| {
185 loop {
186 cx.background_executor().timer(updater::POLL_INTERVAL).await;
187 if this
188 .update_in(cx, |this, window, cx| this.poll_update(window, cx))
189 .is_err()
190 {
191 break;
192 }
193 }
194 })
195 .detach();
196 shell
197 }
198
199 #[cfg_attr(not(windows), allow(dead_code))]
200 fn poll_update(&mut self, window: &mut Window, cx: &mut Context<Self>) {
201 if matches!(self.update, UpdateStatus::Failed(_) | UpdateStatus::Installing) {
202 return;
203 }
204 let Some(paths) = updater::current_paths() else {
205 return;
206 };
207 if self.update == UpdateStatus::UpToDate {
208 if !updater::check(&paths) {
209 return;
210 }
211 self.update = UpdateStatus::Ready;
212 let update_exe = paths.update_exe.clone();
213 cx.background_spawn(async move { updater::prescan(&update_exe) })
214 .detach();
215 }
216 let conversation = self.conversation.read(cx);
217 let idle = updater::is_idle(IdleInputs {
218 window_active: window.is_window_active(),
219 composer_empty: conversation.composer_is_empty(cx),
220 send_in_flight: conversation.send_in_flight(),
221 });
222 if idle {
223 self.restart_into_update(cx);
224 }
225 cx.notify();
226 }
227
228 fn restart_into_update(&mut self, cx: &mut Context<Self>) {
229 if self.update == UpdateStatus::Installing {
230 return;
231 }
232 let Some(paths) = updater::current_paths() else {
233 return;
234 };
235 self.update = UpdateStatus::Installing;
236 cx.notify();
237 cx.spawn(async move |this, cx| {
238 let result = cx
239 .background_spawn(async move { updater::install_and_relaunch(&paths) })
240 .await;
241 let _ = this.update(cx, |this, cx| {
242 match result {
243 Ok(()) => cx.quit(),
244 Err(message) => this.update = UpdateStatus::Failed(message),
245 }
246 cx.notify();
247 });
248 })
249 .detach();
250 }
251
252 fn apply_open_target(&mut self, cx: &mut Context<Self>) {
253 let Some(target) = self.open_target else {
254 return;
255 };
256 let sidebar = &self.state.read(cx).sidebar;
257 let selection = match target {
258 OpenTarget::Chat(index) => sidebar
259 .chats
260 .get(index)
261 .map(|chat| Selection::Chat(chat.id.clone())),
262 OpenTarget::Channel(index) => sidebar
263 .teams
264 .iter()
265 .flat_map(|team| team.channels.iter())
266 .nth(index)
267 .map(|channel| Selection::Channel(channel.id.clone())),
268 };
269 if let Some(selection) = selection {
270 self.open_target = None;
271 self.state
272 .update(cx, |state, cx| state.select(selection, cx));
273 }
274 }
275
276 fn toggle_switcher(
277 &mut self,
278 initial_query: &str,
279 window: &mut Window,
280 cx: &mut Context<Self>,
281 ) {
282 if self.switcher.take().is_some() {
283 window.focus(&self.focus_handle, cx);
284 cx.notify();
285 return;
286 }
287 self.activity_panel = None;
288 self.saved_panel = None;
289 let candidates = candidates_from(self.state.read(cx));
290 let app = self.state.clone();
291 let switcher = cx.new(|cx| Switcher::new(app, candidates, initial_query, window, cx));
292 cx.subscribe_in(
293 &switcher,
294 window,
295 |this, _, event: &SwitcherEvent, window, cx| {
296 match event {
297 SwitcherEvent::Pick(selection) => {
298 let selection = selection.clone();
299 this.state
300 .update(cx, |state, cx| state.select(selection, cx));
301 }
302 SwitcherEvent::PickMessage {
303 selection,
304 message_id,
305 } => {
306 let (selection, message_id) = (selection.clone(), message_id.clone());
307 this.state.update(cx, |state, cx| {
308 state.jump_to_message(selection, message_id, cx)
309 });
310 }
311 SwitcherEvent::Close => {}
312 }
313 this.switcher = None;
314 window.focus(&this.focus_handle, cx);
315 cx.notify();
316 },
317 )
318 .detach();
319 self.switcher = Some(switcher);
320 cx.notify();
321 }
322
323 fn toggle_activity_panel(&mut self, window: &mut Window, cx: &mut Context<Self>) {
324 if self.activity_panel.take().is_some() {
325 window.focus(&self.focus_handle, cx);
326 cx.notify();
327 return;
328 }
329 self.switcher = None;
330 self.saved_panel = None;
331 let (app, activity) = (self.state.clone(), self.activity.clone());
332 let panel = cx.new(|cx| ActivityPanel::new(app, activity, window, cx));
333 cx.subscribe_in(
334 &panel,
335 window,
336 |this, _, event: &ActivityPanelEvent, window, cx| {
337 this.activity_panel = None;
338 window.focus(&this.focus_handle, cx);
339 match event {
340 ActivityPanelEvent::Close => {}
341 ActivityPanelEvent::OpenSettings => this
342 .notifications
343 .update(cx, |center, cx| center.open_settings(cx)),
344 ActivityPanelEvent::Open {
345 conversation_id,
346 message_id,
347 } => {
348 let selection =
349 selection_for(&this.state.read(cx).sidebar, conversation_id);
350 if let Some(selection) = selection {
351 let message_id = message_id.clone();
352 this.state.update(cx, |state, cx| {
353 if message_id.is_empty() {
354 state.select(selection, cx)
355 } else {
356 state.jump_to_message(selection, message_id, cx)
357 }
358 });
359 }
360 }
361 }
362 cx.notify();
363 },
364 )
365 .detach();
366 self.activity_panel = Some(panel);
367 cx.notify();
368 }
369 fn toggle_saved_panel(&mut self, window: &mut Window, cx: &mut Context<Self>) {
370 if self.saved_panel.take().is_some() {
371 window.focus(&self.focus_handle, cx);
372 cx.notify();
373 return;
374 }
375 self.switcher = None;
376 self.activity_panel = None;
377 let app = self.state.clone();
378 let panel = cx.new(|cx| SavedPanel::new(app, window, cx));
379 cx.subscribe_in(
380 &panel,
381 window,
382 |this, _, event: &SavedPanelEvent, window, cx| {
383 this.saved_panel = None;
384 window.focus(&this.focus_handle, cx);
385 if let SavedPanelEvent::Open {
386 conversation_id,
387 message_id,
388 } = event
389 {
390 let selection = selection_for(&this.state.read(cx).sidebar, conversation_id);
391 if let Some(selection) = selection {
392 let message_id = message_id.clone();
393 this.state.update(cx, |state, cx| {
394 state.jump_to_message(selection, message_id, cx)
395 });
396 }
397 }
398 cx.notify();
399 },
400 )
401 .detach();
402 self.saved_panel = Some(panel);
403 cx.notify();
404 }
405
406 fn open_status_dialog(&mut self, window: &mut Window, cx: &mut Context<Self>) {
407 if !self
408 .state
409 .update(cx, |state, _| state.take_status_message_request())
410 {
411 return;
412 }
413 self.switcher = None;
414 self.activity_panel = None;
415 self.saved_panel = None;
416 let app = self.state.clone();
417 let dialog = cx.new(|cx| StatusMessageDialog::new(app, window, cx));
418 cx.subscribe_in(
419 &dialog,
420 window,
421 |this, _, _: &StatusMessageDialogEvent, window, cx| {
422 this.status_dialog = None;
423 window.focus(&this.focus_handle, cx);
424 cx.notify();
425 },
426 )
427 .detach();
428 self.status_dialog = Some(dialog);
429 cx.notify();
430 }
431
432 fn toggle_shortcuts_dialog(&mut self, window: &mut Window, cx: &mut Context<Self>) {
433 if self.shortcuts_dialog.take().is_some() {
434 window.focus(&self.focus_handle, cx);
435 cx.notify();
436 return;
437 }
438 self.switcher = None;
439 self.activity_panel = None;
440 self.saved_panel = None;
441 let dialog = cx.new(|cx| ShortcutsDialog::new(window, cx));
442 cx.subscribe_in(
443 &dialog,
444 window,
445 |this, _, _: &ShortcutsDialogEvent, window, cx| {
446 this.shortcuts_dialog = None;
447 window.focus(&this.focus_handle, cx);
448 cx.notify();
449 },
450 )
451 .detach();
452 self.shortcuts_dialog = Some(dialog);
453 cx.notify();
454 }
455
456 fn open_profile_card(&mut self, window: &mut Window, cx: &mut Context<Self>) {
457 let Some(request) = self
458 .state
459 .update(cx, |state, _| state.take_profile_request())
460 else {
461 return;
462 };
463 if let Some(card) = &self.profile_card {
464 card.update(cx, |card, cx| {
465 card.move_to(request.user_id, request.anchor, cx)
466 });
467 return;
468 }
469 let app = self.state.clone();
470 let card = cx.new(|cx| ProfileCard::new(app, request.user_id, request.anchor, window, cx));
471 cx.subscribe_in(
472 &card,
473 window,
474 |this, _, _: &ProfileCardEvent, window, cx| {
475 this.profile_card = None;
476 window.focus(&this.focus_handle, cx);
477 cx.notify();
478 },
479 )
480 .detach();
481 self.profile_card = Some(card);
482 cx.notify();
483 }
484
485 fn open_forward_dialog(&mut self, window: &mut Window, cx: &mut Context<Self>) {
486 let Some(source) = self
487 .state
488 .update(cx, |state, _| state.take_forward_request())
489 else {
490 return;
491 };
492 self.switcher = None;
493 self.activity_panel = None;
494 self.saved_panel = None;
495 let candidates = candidates_from(self.state.read(cx));
496 let app = self.state.clone();
497 let dialog = cx.new(|cx| ForwardDialog::new(app, source, candidates, window, cx));
498 cx.subscribe_in(
499 &dialog,
500 window,
501 |this, _, event: &ForwardDialogEvent, window, cx| {
502 this.forward_dialog = None;
503 window.focus(&this.focus_handle, cx);
504 if let ForwardDialogEvent::Sent { target, title } = event {
505 let target = target.clone();
506 let open = NoticeAction::new("Open", move |state, cx| {
507 state.select(target.clone(), cx)
508 });
509 this.state.update(cx, |state, cx| {
510 state.raise_notice(format!("Forwarded to {title}"), Some(open), cx)
511 });
512 }
513 cx.notify();
514 },
515 )
516 .detach();
517 self.forward_dialog = Some(dialog);
518 cx.notify();
519 }
520}
521
522impl Render for AppShell {
523 fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
524 if let Some(dialog) = self
525 .state
526 .read(cx)
527 .task_dialog
528 .as_ref()
529 .map(|dialog| (dialog.scope.clone(), dialog.card.clone()))
530 {
531 self.state.update(cx, |state, cx| {
532 state.ensure_card_inputs(&dialog.0, &dialog.1, window, cx)
533 });
534 }
535 if let Some(me) = self.state.read(cx).directory.me.clone() {
536 let app = self.state.clone();
537 cx.defer(move |cx| {
538 app.update(cx, |state, cx| {
539 state.request_avatars(vec![me.user_id.clone()], cx);
540 state.request_presence(vec![me.user_id], cx);
541 });
542 });
543 }
544 let panels = self.switcher.is_some()
545 || self.activity_panel.is_some()
546 || self.saved_panel.is_some()
547 || self.forward_dialog.is_some()
548 || self.status_dialog.is_some()
549 || self.shortcuts_dialog.is_some()
550 || self.profile_card.is_some()
551 || {
552 let state = self.state.read(cx);
553 state.task_dialog.is_some() || state.status_menu_open
554 };
555 Overlays::update(cx, |overlays| overlays.panels = panels);
556 let chat_thread = self.state.read(cx).call_chat_thread();
557 self.sync_call_chat(chat_thread, window, cx);
558 let chat_panel = self.call_chat.as_ref().map(|(_, view)| view.clone());
559 let state = self.state.read(cx);
560 let call_view = render_call_view(&self.state, state, chat_panel).filter(|_| state.viewing_call());
561 let call_mini = render_call_mini(&self.state, state);
562 let stage_overlay = render_stage_overlay(&self.state, state);
563 let status = render_status_bar(
564 state,
565 &self.update,
566 cx.listener(|this, _, _, cx| this.restart_into_update(cx)),
567 cx.listener(|this, _, _, cx| {
568 this.state
569 .update(cx, |state, cx| state.run_notice_action(cx))
570 }),
571 );
572 let title_bar = render_title_bar(
573 own_status_button(&self.state, state),
574 self.activity.read(cx).feed().unread_count(),
575 cx.listener(|this, _, window, cx| this.toggle_switcher("", window, cx)),
576 cx.listener(|this, _, window, cx| this.toggle_saved_panel(window, cx)),
577 cx.listener(|this, _, window, cx| this.toggle_activity_panel(window, cx)),
578 );
579 div()
580 .id("app-shell")
581 .key_context("AppShell")
582 .track_focus(&self.focus_handle)
583 .on_action(cx.listener(|this, _: &OpenSwitcher, window, cx| {
584 this.toggle_switcher("", window, cx);
585 }))
586 .on_action(cx.listener(|this, _: &NewChat, _, cx| {
587 this.state.update(cx, |state, cx| state.start_new_chat(cx));
588 }))
589 .on_action(cx.listener(|this, _: &ToggleCallMute, _, cx| {
590 this.state.update(cx, |state, cx| state.toggle_call_mute(cx));
591 }))
592 .on_action(cx.listener(|this, _: &ShowShortcuts, window, cx| {
593 this.toggle_shortcuts_dialog(window, cx);
594 }))
595 .on_action(cx.listener(|this, _: &OpenActivity, window, cx| {
596 this.toggle_activity_panel(window, cx);
597 }))
598 .on_action(cx.listener(|this, _: &OpenSaved, window, cx| {
599 this.toggle_saved_panel(window, cx);
600 }))
601 .on_action(cx.listener(|this, _: &OpenChatsTab, _, cx| {
602 this.sidebar.update(cx, |sidebar, cx| sidebar.show_chats(cx));
603 }))
604 .on_action(cx.listener(|this, _: &OpenChannelsTab, _, cx| {
605 this.sidebar.update(cx, |sidebar, cx| sidebar.show_channels(cx));
606 }))
607 .on_action(cx.listener(|this, _: &OpenCallsTab, _, cx| {
608 this.sidebar.update(cx, |sidebar, cx| sidebar.show_calls(cx));
609 }))
610 .on_action(cx.listener(|this, _: &PreviousConversation, _, cx| {
611 this.sidebar
612 .update(cx, |sidebar, cx| sidebar.select_adjacent(Step::Previous, cx));
613 }))
614 .on_action(cx.listener(|this, _: &NextConversation, _, cx| {
615 this.sidebar
616 .update(cx, |sidebar, cx| sidebar.select_adjacent(Step::Next, cx));
617 }))
618 .on_action(cx.listener(|this, _: &AcceptCall, _, cx| {
619 this.state.update(cx, |state, cx| state.accept_ringing_call(cx));
620 }))
621 .on_action(cx.listener(|this, _: &DeclineCall, _, cx| {
622 this.state.update(cx, |state, cx| state.decline_ringing_call(cx));
623 }))
624 .on_action(cx.listener(|this, _: &HangUpCall, _, cx| {
625 this.state.update(cx, |state, cx| state.leave_call(cx));
626 }))
627 .on_action(cx.listener(|this, _: &ToggleCallCamera, _, cx| {
628 this.state.update(cx, |state, cx| state.toggle_call_camera(cx));
629 }))
630 .on_action(cx.listener(|this, _: &ToggleCallShare, _, cx| {
631 this.state.update(cx, |state, cx| state.toggle_call_share(cx));
632 }))
633 .on_action(cx.listener(|this, _: &ReplyToHovered, window, cx| {
634 this.conversation.update(cx, |conversation, cx| {
635 conversation.reply_to_hovered(window, cx)
636 });
637 }))
638 .relative()
639 .size_full()
640 .bg(theme::background())
641 .text_color(theme::text())
642 .text_size(px(14.))
643 .child(crate::frame_log::probe("first"))
644 .child(
645 v_flex()
646 .size_full()
647 .child(title_bar)
648 .child(
649 h_flex()
650 .flex_1()
651 .min_h_0()
652 .w_full()
653 .child(self.sidebar.clone().cached(StyleRefinement::default().w(px(SIDEBAR_WIDTH)).h_full().flex_none()))
654 .child(match call_view {
655 Some(call_view) => call_view,
656 None => self
657 .conversation
658 .clone()
659 .cached(StyleRefinement::default().flex_1().min_w_0().h_full())
660 .into_any_element(),
661 }),
662 )
663 .child(status),
664 )
665 .children(call_mini)
666 .children(stage_overlay)
667 .children(self.activity_panel.clone())
668 .children(self.saved_panel.clone())
669 .children(self.switcher.clone())
670 .children(render_task_dialog(self.state.read(cx), cx))
671 .children(self.forward_dialog.clone())
672 .children(self.status_dialog.clone())
673 .children(self.shortcuts_dialog.clone())
674 .children(self.profile_card.clone())
675 .child(crate::frame_log::probe("last"))
676 }
677}