fix(notify): toast windows without hard outline
- Message toast, Hide all pill, incoming call and meeting reminder: no border, fill on the Teams toast level (POPUP) - @mention toast keeps its tinted fill, orange ring removed (Teams toasts have a transparent stroke) - Incoming call keeps the pulsing green ring around the caller avatar (state signal) - Outline allowlist entries for the toast windows removed, surfaces_are_soft covers them - Preview and agent body widths no longer reserve border space Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -16,16 +16,14 @@ pub const PREVIEW_MAX_LINES: usize = 2;
16
16
pub const TOAST_PADDING: f32 = 12.;
17
17
pub const AVATAR_SIZE: f32 = 40.;
18
18
pub const AVATAR_GAP: f32 = 12.;
19
pub const MENTION_BORDER: f32 = 2.;
20
pub const PREVIEW_WIDTH: f32 =
21
TOAST_WIDTH - 2. * (TOAST_PADDING + MENTION_BORDER) - AVATAR_SIZE - AVATAR_GAP;
19
pub const PREVIEW_WIDTH: f32 = TOAST_WIDTH - 2. * TOAST_PADDING - AVATAR_SIZE - AVATAR_GAP;
22
20
const ACTION_ROW_SPACING: f32 = 4.;
23
21
const REPLY_FIELD_FRAME: f32 = 14.;
24
22
const REPLY_HINT_ROW: f32 = 20.;
25
23
const REPLY_SPACING: f32 = 8.;
26
24
const CONFIRM_HEIGHT: f32 = 56.;
27
25
const AGENT_CHROME_HEIGHT: f32 = 116.;
28
pub const AGENT_BODY_WIDTH: f32 = TOAST_WIDTH - 2. * TOAST_PADDING - 2.;
26
pub const AGENT_BODY_WIDTH: f32 = TOAST_WIDTH - 2. * TOAST_PADDING;
29
27
const RING_BASE_HEIGHT: f32 = 120.;
30
28
pub const MEETING_HEIGHT: f32 = 112.;
31
29
const RING_NOTE_HEIGHT: f32 = 18.;
@@ -16,16 +16,14 @@ pub const PREVIEW_MAX_LINES: usize = 2;16
pub const TOAST_PADDING: f32 = 12.;16
pub const TOAST_PADDING: f32 = 12.;17
pub const AVATAR_SIZE: f32 = 40.;17
pub const AVATAR_SIZE: f32 = 40.;18
pub const AVATAR_GAP: f32 = 12.;18
pub const AVATAR_GAP: f32 = 12.;19
pub const MENTION_BORDER: f32 = 2.;19
pub const PREVIEW_WIDTH: f32 = TOAST_WIDTH - 2. * TOAST_PADDING - AVATAR_SIZE - AVATAR_GAP;20
pub const PREVIEW_WIDTH: f32 =21
TOAST_WIDTH - 2. * (TOAST_PADDING + MENTION_BORDER) - AVATAR_SIZE - AVATAR_GAP;22
const ACTION_ROW_SPACING: f32 = 4.;20
const ACTION_ROW_SPACING: f32 = 4.;23
const REPLY_FIELD_FRAME: f32 = 14.;21
const REPLY_FIELD_FRAME: f32 = 14.;24
const REPLY_HINT_ROW: f32 = 20.;22
const REPLY_HINT_ROW: f32 = 20.;25
const REPLY_SPACING: f32 = 8.;23
const REPLY_SPACING: f32 = 8.;26
const CONFIRM_HEIGHT: f32 = 56.;24
const CONFIRM_HEIGHT: f32 = 56.;27
const AGENT_CHROME_HEIGHT: f32 = 116.;25
const AGENT_CHROME_HEIGHT: f32 = 116.;28
pub const AGENT_BODY_WIDTH: f32 = TOAST_WIDTH - 2. * TOAST_PADDING - 2.;26
pub const AGENT_BODY_WIDTH: f32 = TOAST_WIDTH - 2. * TOAST_PADDING;29
const RING_BASE_HEIGHT: f32 = 120.;27
const RING_BASE_HEIGHT: f32 = 120.;30
pub const MEETING_HEIGHT: f32 = 112.;28
pub const MEETING_HEIGHT: f32 = 112.;31
const RING_NOTE_HEIGHT: f32 = 18.;29
const RING_NOTE_HEIGHT: f32 = 18.;@@ -176,8 +176,8 @@ mod frames {
176
176
use crate::user_activity::UserInput;
177
177
use crate::views::call_transcript::TranscriptPanel;
178
178
use crate::views::call_view::CHAT_PANEL_TAG;
179
use crate::views::conversation::MEMBERS_BUTTON;
180
179
use crate::views::composer::{COMPOSER_BOX_TAG, COMPOSER_LEADING_TAG, COMPOSER_SEND_TAG};
180
use crate::views::conversation::MEMBERS_BUTTON;
181
181
use crate::views::message_row::BUBBLE_TAGS;
182
182
use crate::views::proposal_card::{PROPOSAL_BUTTONS, PROPOSAL_CARD, PROPOSAL_THUMBNAILS};
183
183
use crate::views::reaction_proposal_pill::REACTION_PILL;
@@ -1306,28 +1306,13 @@ const OUTLINE_ALLOWLIST: &[(&str, &str, &str)] = &[
1306
1306
(
1307
1307
"notify/ring_view.rs",
1308
1308
"theme::green()",
1309
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",
1310
),
1311
(
1312
"notify/meeting_view.rs",
1313
"theme::accent()",
1314
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",
1309
"state signal (pulsing ring around the caller while it rings), not a resting outline",
1315
1310
),
1316
1311
(
1317
1312
"notify/meeting_view.rs",
1318
1313
"theme::border_strong()",
1319
1314
"outlined button, not a surface",
1320
1315
),
1321
(
1322
"notify/toast.rs",
1323
"border)",
1324
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",
1325
),
1326
(
1327
"notify/toast.rs",
1328
"theme::border_strong()",
1329
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",
1330
),
1331
1316
(
1332
1317
"settings/mcp.rs",
1333
1318
"theme::border_strong()",
@@ -176,8 +176,8 @@ mod frames {176
use crate::user_activity::UserInput;176
use crate::user_activity::UserInput;177
use crate::views::call_transcript::TranscriptPanel;177
use crate::views::call_transcript::TranscriptPanel;178
use crate::views::call_view::CHAT_PANEL_TAG;178
use crate::views::call_view::CHAT_PANEL_TAG;179
use crate::views::conversation::MEMBERS_BUTTON;180
use crate::views::composer::{COMPOSER_BOX_TAG, COMPOSER_LEADING_TAG, COMPOSER_SEND_TAG};179
use crate::views::composer::{COMPOSER_BOX_TAG, COMPOSER_LEADING_TAG, COMPOSER_SEND_TAG};180
use crate::views::conversation::MEMBERS_BUTTON;181
use crate::views::message_row::BUBBLE_TAGS;181
use crate::views::message_row::BUBBLE_TAGS;182
use crate::views::proposal_card::{PROPOSAL_BUTTONS, PROPOSAL_CARD, PROPOSAL_THUMBNAILS};182
use crate::views::proposal_card::{PROPOSAL_BUTTONS, PROPOSAL_CARD, PROPOSAL_THUMBNAILS};183
use crate::views::reaction_proposal_pill::REACTION_PILL;183
use crate::views::reaction_proposal_pill::REACTION_PILL;@@ -1306,28 +1306,13 @@ const OUTLINE_ALLOWLIST: &[(&str, &str, &str)] = &[1306
(1306
(1307
"notify/ring_view.rs",1307
"notify/ring_view.rs",1308
"theme::green()",1308
"theme::green()",1309
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",1309
"state signal (pulsing ring around the caller while it rings), not a resting outline",1310
),1311
(1312
"notify/meeting_view.rs",1313
"theme::accent()",1314
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",1315
),1310
),1316
(1311
(1317
"notify/meeting_view.rs",1312
"notify/meeting_view.rs",1318
"theme::border_strong()",1313
"theme::border_strong()",1319
"outlined button, not a surface",1314
"outlined button, not a surface",1320
),1315
),1321
(1322
"notify/toast.rs",1323
"border)",1324
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",1325
),1326
(1327
"notify/toast.rs",1328
"theme::border_strong()",1329
"OS toast window: no compositor shadow, the edge separates it from the desktop; accent = Teams state",1330
),1331
(1316
(1332
"settings/mcp.rs",1317
"settings/mcp.rs",1333
"theme::border_strong()",1318
"theme::border_strong()",@@ -6,7 +6,7 @@ use gpui_kit::*;
6
6
7
7
use super::center::NotificationCenter;
8
8
use super::layout::{AVATAR_GAP, TOAST_PADDING};
9
use super::ring_view::{RING_AVATAR, RING_BORDER, TOAST_RADIUS, answer_button};
9
use super::ring_view::{RING_AVATAR, TOAST_RADIUS, answer_button};
10
10
use crate::app_state::AppState;
11
11
use crate::call::ReminderPhase;
12
12
use crate::call::meeting_subtitle;
@@ -45,10 +45,7 @@ impl MeetingToastView {
45
45
impl Render for MeetingToastView {
46
46
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
47
47
let Some(toast) = self.app.read(cx).meeting_toasts.get(self.toast_id).cloned() else {
48
return div()
49
.size_full()
50
.bg(theme::surface_raised())
51
.into_any_element();
48
return div().size_full().bg(theme::popup()).into_any_element();
52
49
};
53
50
window.set_window_title(&toast.subject);
54
51
let subtitle = meeting_subtitle(&toast, Utc::now(), Local::now().offset().fix());
@@ -60,7 +57,7 @@ impl Render for MeetingToastView {
60
57
"meeting-snooze",
61
58
"Snooze",
62
59
IconName::AlarmClock,
63
theme::surface_raised(),
60
theme::popup(),
64
61
)
65
62
.border_1()
66
63
.border_color(theme::border_strong())
@@ -102,9 +99,7 @@ impl Render for MeetingToastView {
102
99
.id(("meeting-toast", toast_id))
103
100
.size_full()
104
101
.rounded(px(TOAST_RADIUS))
105
.bg(theme::surface_raised())
106
.border(px(RING_BORDER))
107
.border_color(theme::accent())
102
.bg(theme::popup())
108
103
.overflow_hidden()
109
104
.child(
110
105
div().size_full().p(px(TOAST_PADDING)).child(
@@ -6,7 +6,7 @@ use gpui_kit::*;6
6
7
use super::center::NotificationCenter;7
use super::center::NotificationCenter;8
use super::layout::{AVATAR_GAP, TOAST_PADDING};8
use super::layout::{AVATAR_GAP, TOAST_PADDING};9
use super::ring_view::{RING_AVATAR, RING_BORDER, TOAST_RADIUS, answer_button};9
use super::ring_view::{RING_AVATAR, TOAST_RADIUS, answer_button};10
use crate::app_state::AppState;10
use crate::app_state::AppState;11
use crate::call::ReminderPhase;11
use crate::call::ReminderPhase;12
use crate::call::meeting_subtitle;12
use crate::call::meeting_subtitle;@@ -45,10 +45,7 @@ impl MeetingToastView {45
impl Render for MeetingToastView {45
impl Render for MeetingToastView {46
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {46
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {47
let Some(toast) = self.app.read(cx).meeting_toasts.get(self.toast_id).cloned() else {47
let Some(toast) = self.app.read(cx).meeting_toasts.get(self.toast_id).cloned() else {48
return div()48
return div().size_full().bg(theme::popup()).into_any_element();49
.size_full()50
.bg(theme::surface_raised())51
.into_any_element();52
};49
};53
window.set_window_title(&toast.subject);50
window.set_window_title(&toast.subject);54
let subtitle = meeting_subtitle(&toast, Utc::now(), Local::now().offset().fix());51
let subtitle = meeting_subtitle(&toast, Utc::now(), Local::now().offset().fix());@@ -60,7 +57,7 @@ impl Render for MeetingToastView {60
"meeting-snooze",57
"meeting-snooze",61
"Snooze",58
"Snooze",62
IconName::AlarmClock,59
IconName::AlarmClock,63
theme::surface_raised(),60
theme::popup(),64
)61
)65
.border_1()62
.border_1()66
.border_color(theme::border_strong())63
.border_color(theme::border_strong())@@ -102,9 +99,7 @@ impl Render for MeetingToastView {102
.id(("meeting-toast", toast_id))99
.id(("meeting-toast", toast_id))103
.size_full()100
.size_full()104
.rounded(px(TOAST_RADIUS))101
.rounded(px(TOAST_RADIUS))105
.bg(theme::surface_raised())102
.bg(theme::popup())106
.border(px(RING_BORDER))107
.border_color(theme::accent())108
.overflow_hidden()103
.overflow_hidden()109
.child(104
.child(110
div().size_full().p(px(TOAST_PADDING)).child(105
div().size_full().p(px(TOAST_PADDING)).child(@@ -14,7 +14,6 @@ use crate::views::call_view::pulsing;
14
14
use crate::views::widgets::icon;
15
15
16
16
pub const RING_AVATAR: f32 = 56.;
17
pub(super) const RING_BORDER: f32 = 2.;
18
17
const RING_WIDTH: f32 = 3.;
19
18
const RING_GAP: f32 = 3.;
20
19
pub(super) const TOAST_RADIUS: f32 = 12.;
@@ -84,10 +83,7 @@ impl Render for RingView {
84
83
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
85
84
let state = self.app.read(cx);
86
85
let Some(entry) = state.rings.get(self.ring_id).cloned() else {
87
return div()
88
.size_full()
89
.bg(theme::surface_raised())
90
.into_any_element();
86
return div().size_full().bg(theme::popup()).into_any_element();
91
87
};
92
88
window.set_window_title(&format!("{}: {}", entry.caller_name(), entry.subtitle()));
93
89
let ends_current = state.call.is_some();
@@ -131,9 +127,7 @@ impl Render for RingView {
131
127
.id(("ring", ring_id))
132
128
.size_full()
133
129
.rounded(px(TOAST_RADIUS))
134
.bg(theme::surface_raised())
135
.border(px(RING_BORDER))
136
.border_color(theme::green())
130
.bg(theme::popup())
137
131
.overflow_hidden()
138
132
.child(
139
133
div().size_full().p(px(TOAST_PADDING)).child(
@@ -14,7 +14,6 @@ use crate::views::call_view::pulsing;14
use crate::views::widgets::icon;14
use crate::views::widgets::icon;15
15
16
pub const RING_AVATAR: f32 = 56.;16
pub const RING_AVATAR: f32 = 56.;17
pub(super) const RING_BORDER: f32 = 2.;18
const RING_WIDTH: f32 = 3.;17
const RING_WIDTH: f32 = 3.;19
const RING_GAP: f32 = 3.;18
const RING_GAP: f32 = 3.;20
pub(super) const TOAST_RADIUS: f32 = 12.;19
pub(super) const TOAST_RADIUS: f32 = 12.;@@ -84,10 +83,7 @@ impl Render for RingView {84
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {83
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {85
let state = self.app.read(cx);84
let state = self.app.read(cx);86
let Some(entry) = state.rings.get(self.ring_id).cloned() else {85
let Some(entry) = state.rings.get(self.ring_id).cloned() else {87
return div()86
return div().size_full().bg(theme::popup()).into_any_element();88
.size_full()89
.bg(theme::surface_raised())90
.into_any_element();91
};87
};92
window.set_window_title(&format!("{}: {}", entry.caller_name(), entry.subtitle()));88
window.set_window_title(&format!("{}: {}", entry.caller_name(), entry.subtitle()));93
let ends_current = state.call.is_some();89
let ends_current = state.call.is_some();@@ -131,9 +127,7 @@ impl Render for RingView {131
.id(("ring", ring_id))127
.id(("ring", ring_id))132
.size_full()128
.size_full()133
.rounded(px(TOAST_RADIUS))129
.rounded(px(TOAST_RADIUS))134
.bg(theme::surface_raised())130
.bg(theme::popup())135
.border(px(RING_BORDER))136
.border_color(theme::green())137
.overflow_hidden()131
.overflow_hidden()138
.child(132
.child(139
div().size_full().p(px(TOAST_PADDING)).child(133
div().size_full().p(px(TOAST_PADDING)).child(@@ -11,8 +11,8 @@ use gpui_kit::*;
11
11
use super::agent_toast::agent_toast_content;
12
12
use super::center::NotificationCenter;
13
13
use super::layout::{
14
ACTION_BUTTON, AVATAR_GAP, AVATAR_SIZE, MENTION_BORDER, PREVIEW_MAX_LINES, PREVIEW_SIZE,
15
SEND_BUTTON, TOAST_PADDING,
14
ACTION_BUTTON, AVATAR_GAP, AVATAR_SIZE, PREVIEW_MAX_LINES, PREVIEW_SIZE, SEND_BUTTON,
15
TOAST_PADDING,
16
16
};
17
17
use super::platform;
18
18
use super::rules::ChatKind;
@@ -488,10 +488,7 @@ impl Render for ToastView {
488
488
(center.model(id).cloned(), center.settings().preview)
489
489
};
490
490
let Some(model) = model else {
491
return div()
492
.size_full()
493
.bg(theme::surface_raised())
494
.into_any_element();
491
return div().size_full().bg(theme::popup()).into_any_element();
495
492
};
496
493
let text = describe(&model, preview_on);
497
494
let narration = model
@@ -506,14 +503,8 @@ impl Render for ToastView {
506
503
let fill = if mention {
507
504
theme::toast_mention_fill()
508
505
} else {
509
theme::surface_raised()
510
};
511
let border = if mention {
512
theme::accent()
513
} else {
514
theme::border_strong()
506
theme::popup()
515
507
};
516
let border_width = if mention { MENTION_BORDER } else { 1. };
517
508
let hovered = model.hovered;
518
509
let content = match model.reply {
519
510
_ if model.agent.is_some() => {
@@ -554,8 +545,6 @@ impl Render for ToastView {
554
545
.opacity(model.opacity(Instant::now()))
555
546
.rounded(px(TOAST_RADIUS))
556
547
.bg(fill)
557
.border(px(border_width))
558
.border_color(border)
559
548
.overflow_hidden()
560
549
.cursor_pointer()
561
550
.on_hover(move |is_hovered, _, cx| {
@@ -611,11 +600,9 @@ impl Render for PillView {
611
600
.justify_center()
612
601
.opacity(opacity)
613
602
.rounded(px(TOAST_RADIUS))
614
.bg(theme::surface_raised())
615
.border_1()
616
.border_color(theme::border_strong())
603
.bg(theme::popup())
617
604
.cursor_pointer()
618
.hover(|bar| bar.bg(theme::border_strong()))
605
.hover(|bar| bar.bg(theme::popup_hover()))
619
606
.text_size(px(12.5))
620
607
.font_weight(FontWeight::SEMIBOLD)
621
608
.text_color(theme::text_soft())
@@ -640,9 +627,9 @@ mod tests {
640
627
641
628
use gpui_kit::component::input::{Textarea, TextareaState};
642
629
use gpui_kit::{
643
AppContext as _, Context, Entity, Focusable as _, InteractiveElement as _, IntoElement, Modifiers,
644
ParentElement as _, Render, StatefulInteractiveElement as _, Styled as _, TestAppContext,
645
Window, div, point, px,
630
AppContext as _, Context, Entity, Focusable as _, InteractiveElement as _, IntoElement,
631
Modifiers, ParentElement as _, Render, StatefulInteractiveElement as _, Styled as _,
632
TestAppContext, Window, div, point, px,
646
633
};
647
634
648
635
use super::keep_clicks_in_toast;
@@ -11,8 +11,8 @@ use gpui_kit::*;11
use super::agent_toast::agent_toast_content;11
use super::agent_toast::agent_toast_content;12
use super::center::NotificationCenter;12
use super::center::NotificationCenter;13
use super::layout::{13
use super::layout::{14
ACTION_BUTTON, AVATAR_GAP, AVATAR_SIZE, MENTION_BORDER, PREVIEW_MAX_LINES, PREVIEW_SIZE,14
ACTION_BUTTON, AVATAR_GAP, AVATAR_SIZE, PREVIEW_MAX_LINES, PREVIEW_SIZE, SEND_BUTTON,15
SEND_BUTTON, TOAST_PADDING,15
TOAST_PADDING,16
};16
};17
use super::platform;17
use super::platform;18
use super::rules::ChatKind;18
use super::rules::ChatKind;@@ -488,10 +488,7 @@ impl Render for ToastView {488
(center.model(id).cloned(), center.settings().preview)488
(center.model(id).cloned(), center.settings().preview)489
};489
};490
let Some(model) = model else {490
let Some(model) = model else {491
return div()491
return div().size_full().bg(theme::popup()).into_any_element();492
.size_full()493
.bg(theme::surface_raised())494
.into_any_element();495
};492
};496
let text = describe(&model, preview_on);493
let text = describe(&model, preview_on);497
let narration = model494
let narration = model@@ -506,14 +503,8 @@ impl Render for ToastView {506
let fill = if mention {503
let fill = if mention {507
theme::toast_mention_fill()504
theme::toast_mention_fill()508
} else {505
} else {509
theme::surface_raised()506
theme::popup()510
};511
let border = if mention {512
theme::accent()513
} else {514
theme::border_strong()515
};507
};516
let border_width = if mention { MENTION_BORDER } else { 1. };517
let hovered = model.hovered;508
let hovered = model.hovered;518
let content = match model.reply {509
let content = match model.reply {519
_ if model.agent.is_some() => {510
_ if model.agent.is_some() => {@@ -554,8 +545,6 @@ impl Render for ToastView {554
.opacity(model.opacity(Instant::now()))545
.opacity(model.opacity(Instant::now()))555
.rounded(px(TOAST_RADIUS))546
.rounded(px(TOAST_RADIUS))556
.bg(fill)547
.bg(fill)557
.border(px(border_width))558
.border_color(border)559
.overflow_hidden()548
.overflow_hidden()560
.cursor_pointer()549
.cursor_pointer()561
.on_hover(move |is_hovered, _, cx| {550
.on_hover(move |is_hovered, _, cx| {@@ -611,11 +600,9 @@ impl Render for PillView {611
.justify_center()600
.justify_center()612
.opacity(opacity)601
.opacity(opacity)613
.rounded(px(TOAST_RADIUS))602
.rounded(px(TOAST_RADIUS))614
.bg(theme::surface_raised())603
.bg(theme::popup())615
.border_1()616
.border_color(theme::border_strong())617
.cursor_pointer()604
.cursor_pointer()618
.hover(|bar| bar.bg(theme::border_strong()))605
.hover(|bar| bar.bg(theme::popup_hover()))619
.text_size(px(12.5))606
.text_size(px(12.5))620
.font_weight(FontWeight::SEMIBOLD)607
.font_weight(FontWeight::SEMIBOLD)621
.text_color(theme::text_soft())608
.text_color(theme::text_soft())@@ -640,9 +627,9 @@ mod tests {640
627
641
use gpui_kit::component::input::{Textarea, TextareaState};628
use gpui_kit::component::input::{Textarea, TextareaState};642
use gpui_kit::{629
use gpui_kit::{643
AppContext as _, Context, Entity, Focusable as _, InteractiveElement as _, IntoElement, Modifiers,630
AppContext as _, Context, Entity, Focusable as _, InteractiveElement as _, IntoElement,644
ParentElement as _, Render, StatefulInteractiveElement as _, Styled as _, TestAppContext,631
Modifiers, ParentElement as _, Render, StatefulInteractiveElement as _, Styled as _,645
Window, div, point, px,632
TestAppContext, Window, div, point, px,646
};633
};647
634
648
use super::keep_clicks_in_toast;635
use super::keep_clicks_in_toast;