BlueGit

ict rusty-teams

fix(merge): complete Joe's PR slices and keep main's share layout

- chatsvc and store export the Google Calendar modules that #16 adds
- calling portal pieces the slices missed come from Joe's main (vendor desktop capturer, notices, control commands)
- drop the share strip drag state again: no view uses it, main removed it with the new call layout
- Cargo.lock for the new dependencies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-13 · 2 weeks ago

Hash
15c73d1c2473dfaf8a0daa4f9d9d49a2ddd289a5
Parent
feafce83
7 files changed +44 −117
Cargo.lock +26 −23
@@ -111,8 +111,9 @@ dependencies = [
111 111
112 112 [[package]]
113 113 name = "agents"
114 version = "0.2.0"
114 version = "0.3.0"
115 115 dependencies = [
116 "reqwest 0.13.5",
116 117 "serde",
117 118 "serde_json",
118 119 "tempfile",
@@ -273,7 +274,7 @@ checksum = "fb5dfbc6d8d2675589ccbe4d0fd61df2419075625f8c1a62325e718e2b0049f9"
273 274
274 275 [[package]]
275 276 name = "app"
276 version = "0.2.0"
277 version = "0.3.0"
277 278 dependencies = [
278 279 "agents",
279 280 "app-base",
@@ -306,7 +307,7 @@ dependencies = [
306 307
307 308 [[package]]
308 309 name = "app-base"
309 version = "0.2.0"
310 version = "0.3.0"
310 311 dependencies = [
311 312 "agents",
312 313 "calling",
@@ -323,6 +324,7 @@ dependencies = [
323 324 "raw-window-handle",
324 325 "resvg 0.46.0",
325 326 "rodio",
327 "rust-i18n",
326 328 "serde",
327 329 "serde_json",
328 330 "session",
@@ -339,7 +341,7 @@ dependencies = [
339 341
340 342 [[package]]
341 343 name = "app-call-model"
342 version = "0.2.0"
344 version = "0.3.0"
343 345 dependencies = [
344 346 "agents",
345 347 "app-base",
@@ -365,7 +367,7 @@ dependencies = [
365 367
366 368 [[package]]
367 369 name = "app-state"
368 version = "0.2.0"
370 version = "0.3.0"
369 371 dependencies = [
370 372 "agents",
371 373 "app-base",
@@ -394,7 +396,7 @@ dependencies = [
394 396
395 397 [[package]]
396 398 name = "app-ui-kit"
397 version = "0.2.0"
399 version = "0.3.0"
398 400 dependencies = [
399 401 "app-base",
400 402 "gpui-kit",
@@ -1088,7 +1090,7 @@ dependencies = [
1088 1090
1089 1091 [[package]]
1090 1092 name = "browser"
1091 version = "0.2.0"
1093 version = "0.3.0"
1092 1094 dependencies = [
1093 1095 "directories",
1094 1096 "futures-util",
@@ -1197,7 +1199,7 @@ dependencies = [
1197 1199
1198 1200 [[package]]
1199 1201 name = "calling"
1200 version = "0.2.0"
1202 version = "0.3.0"
1201 1203 dependencies = [
1202 1204 "base64 0.22.1",
1203 1205 "chatsvc",
@@ -1223,6 +1225,8 @@ dependencies = [
1223 1225 "webview",
1224 1226 "windows 0.62.2",
1225 1227 "windows-core 0.62.2",
1228 "zune-core 0.5.3",
1229 "zune-jpeg 0.5.15",
1226 1230 ]
1227 1231
1228 1232 [[package]]
@@ -1363,19 +1367,22 @@ dependencies = [
1363 1367
1364 1368 [[package]]
1365 1369 name = "chatsvc"
1366 version = "0.2.0"
1370 version = "0.3.0"
1367 1371 dependencies = [
1368 1372 "base64 0.22.1",
1369 1373 "chrono",
1370 1374 "futures-util",
1371 1375 "percent-encoding",
1372 "reqwest 0.12.28",
1376 "rand 0.9.5",
1377 "reqwest 0.13.5",
1373 1378 "serde",
1374 1379 "serde_json",
1375 1380 "session",
1381 "sha2 0.10.9",
1376 1382 "thiserror 2.0.21",
1377 1383 "tokio",
1378 1384 "tokio-tungstenite",
1385 "url",
1379 1386 "uuid",
1380 1387 ]
1381 1388
@@ -1457,7 +1464,7 @@ checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
1457 1464
1458 1465 [[package]]
1459 1466 name = "cli"
1460 version = "0.2.0"
1467 version = "0.3.0"
1461 1468 dependencies = [
1462 1469 "chrono",
1463 1470 "clap",
@@ -4053,8 +4060,6 @@ dependencies = [
4053 4060 [[package]]
4054 4061 name = "gpui-pre-wgpu"
4055 4062 version = "0.3.8"
4056 source = "registry+https://github.com/rust-lang/crates.io-index"
4057 checksum = "439c5421cafe1a7cf68d0c0ae5cc82b26fad6b0e6345ac98d20acaf1f2463914"
4058 4063 dependencies = [
4059 4064 "anyhow",
4060 4065 "bytemuck",
@@ -4150,7 +4155,7 @@ dependencies = [
4150 4155
4151 4156 [[package]]
4152 4157 name = "graph"
4153 version = "0.2.0"
4158 version = "0.3.0"
4154 4159 dependencies = [
4155 4160 "base64 0.22.1",
4156 4161 "chrono",
@@ -4492,7 +4497,6 @@ dependencies = [
4492 4497 "tokio",
4493 4498 "tokio-rustls",
4494 4499 "tower-service",
4495 "webpki-roots",
4496 4500 ]
4497 4501
4498 4502 [[package]]
@@ -5192,8 +5196,6 @@ dependencies = [
5192 5196 [[package]]
5193 5197 name = "libwebrtc"
5194 5198 version = "0.3.51"
5195 source = "registry+https://github.com/rust-lang/crates.io-index"
5196 checksum = "14f9145a63a8439508a9b5b51dffa4b1c12f812f49fcc4310ebae3d467f639ab"
5197 5199 dependencies = [
5198 5200 "cxx",
5199 5201 "glib 0.21.5",
@@ -5497,7 +5499,7 @@ dependencies = [
5497 5499
5498 5500 [[package]]
5499 5501 name = "mcp"
5500 version = "0.2.0"
5502 version = "0.3.0"
5501 5503 dependencies = [
5502 5504 "axum",
5503 5505 "base64 0.22.1",
@@ -7678,7 +7680,6 @@ dependencies = [
7678 7680 "wasm-bindgen",
7679 7681 "wasm-bindgen-futures",
7680 7682 "web-sys",
7681 "webpki-roots",
7682 7683 ]
7683 7684
7684 7685 [[package]]
@@ -7707,6 +7708,7 @@ dependencies = [
7707 7708 "rustls-platform-verifier",
7708 7709 "serde",
7709 7710 "serde_json",
7711 "serde_urlencoded",
7710 7712 "sync_wrapper",
7711 7713 "tokio",
7712 7714 "tokio-rustls",
@@ -8479,7 +8481,7 @@ dependencies = [
8479 8481
8480 8482 [[package]]
8481 8483 name = "session"
8482 version = "0.2.0"
8484 version = "0.3.0"
8483 8485 dependencies = [
8484 8486 "base64 0.22.1",
8485 8487 "futures-util",
@@ -8749,12 +8751,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
8749 8751
8750 8752 [[package]]
8751 8753 name = "store"
8752 version = "0.2.0"
8754 version = "0.3.0"
8753 8755 dependencies = [
8754 8756 "chrono",
8755 8757 "directories",
8756 8758 "rusqlite",
8757 8759 "scraper",
8760 "serde",
8758 8761 "serde_json",
8759 8762 "tempfile",
8760 8763 "thiserror 2.0.21",
@@ -9196,7 +9199,7 @@ dependencies = [
9196 9199
9197 9200 [[package]]
9198 9201 name = "teams-core"
9199 version = "0.2.0"
9202 version = "0.3.0"
9200 9203 dependencies = [
9201 9204 "chatsvc",
9202 9205 "chrono",
@@ -10591,7 +10594,7 @@ dependencies = [
10591 10594
10592 10595 [[package]]
10593 10596 name = "webview"
10594 version = "0.2.0"
10597 version = "0.3.0"
10595 10598 dependencies = [
10596 10599 "serde_json",
10597 10600 "session",
@@ -111,8 +111,9 @@ dependencies = [
111
111
112[[package]]
112[[package]]
113name = "agents"
113name = "agents"
114version = "0.2.0"
114version = "0.3.0"
115dependencies = [
115dependencies = [
116 "reqwest 0.13.5",
116 "serde",
117 "serde",
117 "serde_json",
118 "serde_json",
118 "tempfile",
119 "tempfile",
@@ -273,7 +274,7 @@ checksum = "fb5dfbc6d8d2675589ccbe4d0fd61df2419075625f8c1a62325e718e2b0049f9"
273
274
274[[package]]
275[[package]]
275name = "app"
276name = "app"
276version = "0.2.0"
277version = "0.3.0"
277dependencies = [
278dependencies = [
278 "agents",
279 "agents",
279 "app-base",
280 "app-base",
@@ -306,7 +307,7 @@ dependencies = [
306
307
307[[package]]
308[[package]]
308name = "app-base"
309name = "app-base"
309version = "0.2.0"
310version = "0.3.0"
310dependencies = [
311dependencies = [
311 "agents",
312 "agents",
312 "calling",
313 "calling",
@@ -323,6 +324,7 @@ dependencies = [
323 "raw-window-handle",
324 "raw-window-handle",
324 "resvg 0.46.0",
325 "resvg 0.46.0",
325 "rodio",
326 "rodio",
327 "rust-i18n",
326 "serde",
328 "serde",
327 "serde_json",
329 "serde_json",
328 "session",
330 "session",
@@ -339,7 +341,7 @@ dependencies = [
339
341
340[[package]]
342[[package]]
341name = "app-call-model"
343name = "app-call-model"
342version = "0.2.0"
344version = "0.3.0"
343dependencies = [
345dependencies = [
344 "agents",
346 "agents",
345 "app-base",
347 "app-base",
@@ -365,7 +367,7 @@ dependencies = [
365
367
366[[package]]
368[[package]]
367name = "app-state"
369name = "app-state"
368version = "0.2.0"
370version = "0.3.0"
369dependencies = [
371dependencies = [
370 "agents",
372 "agents",
371 "app-base",
373 "app-base",
@@ -394,7 +396,7 @@ dependencies = [
394
396
395[[package]]
397[[package]]
396name = "app-ui-kit"
398name = "app-ui-kit"
397version = "0.2.0"
399version = "0.3.0"
398dependencies = [
400dependencies = [
399 "app-base",
401 "app-base",
400 "gpui-kit",
402 "gpui-kit",
@@ -1088,7 +1090,7 @@ dependencies = [
1088
1090
1089[[package]]
1091[[package]]
1090name = "browser"
1092name = "browser"
1091version = "0.2.0"
1093version = "0.3.0"
1092dependencies = [
1094dependencies = [
1093 "directories",
1095 "directories",
1094 "futures-util",
1096 "futures-util",
@@ -1197,7 +1199,7 @@ dependencies = [
1197
1199
1198[[package]]
1200[[package]]
1199name = "calling"
1201name = "calling"
1200version = "0.2.0"
1202version = "0.3.0"
1201dependencies = [
1203dependencies = [
1202 "base64 0.22.1",
1204 "base64 0.22.1",
1203 "chatsvc",
1205 "chatsvc",
@@ -1223,6 +1225,8 @@ dependencies = [
1223 "webview",
1225 "webview",
1224 "windows 0.62.2",
1226 "windows 0.62.2",
1225 "windows-core 0.62.2",
1227 "windows-core 0.62.2",
1228 "zune-core 0.5.3",
1229 "zune-jpeg 0.5.15",
1226]
1230]
1227
1231
1228[[package]]
1232[[package]]
@@ -1363,19 +1367,22 @@ dependencies = [
1363
1367
1364[[package]]
1368[[package]]
1365name = "chatsvc"
1369name = "chatsvc"
1366version = "0.2.0"
1370version = "0.3.0"
1367dependencies = [
1371dependencies = [
1368 "base64 0.22.1",
1372 "base64 0.22.1",
1369 "chrono",
1373 "chrono",
1370 "futures-util",
1374 "futures-util",
1371 "percent-encoding",
1375 "percent-encoding",
1372 "reqwest 0.12.28",
1376 "rand 0.9.5",
1377 "reqwest 0.13.5",
1373 "serde",
1378 "serde",
1374 "serde_json",
1379 "serde_json",
1375 "session",
1380 "session",
1381 "sha2 0.10.9",
1376 "thiserror 2.0.21",
1382 "thiserror 2.0.21",
1377 "tokio",
1383 "tokio",
1378 "tokio-tungstenite",
1384 "tokio-tungstenite",
1385 "url",
1379 "uuid",
1386 "uuid",
1380]
1387]
1381
1388
@@ -1457,7 +1464,7 @@ checksum = "1c133bc6a41be0d194c306b5506d15e6feeea7b1d6604bd3f8310dfb2ca96486"
1457
1464
1458[[package]]
1465[[package]]
1459name = "cli"
1466name = "cli"
1460version = "0.2.0"
1467version = "0.3.0"
1461dependencies = [
1468dependencies = [
1462 "chrono",
1469 "chrono",
1463 "clap",
1470 "clap",
@@ -4053,8 +4060,6 @@ dependencies = [
4053[[package]]
4060[[package]]
4054name = "gpui-pre-wgpu"
4061name = "gpui-pre-wgpu"
4055version = "0.3.8"
4062version = "0.3.8"
4056source = "registry+https://github.com/rust-lang/crates.io-index"
4057checksum = "439c5421cafe1a7cf68d0c0ae5cc82b26fad6b0e6345ac98d20acaf1f2463914"
4058dependencies = [
4063dependencies = [
4059 "anyhow",
4064 "anyhow",
4060 "bytemuck",
4065 "bytemuck",
@@ -4150,7 +4155,7 @@ dependencies = [
4150
4155
4151[[package]]
4156[[package]]
4152name = "graph"
4157name = "graph"
4153version = "0.2.0"
4158version = "0.3.0"
4154dependencies = [
4159dependencies = [
4155 "base64 0.22.1",
4160 "base64 0.22.1",
4156 "chrono",
4161 "chrono",
@@ -4492,7 +4497,6 @@ dependencies = [
4492 "tokio",
4497 "tokio",
4493 "tokio-rustls",
4498 "tokio-rustls",
4494 "tower-service",
4499 "tower-service",
4495 "webpki-roots",
4496]
4500]
4497
4501
4498[[package]]
4502[[package]]
@@ -5192,8 +5196,6 @@ dependencies = [
5192[[package]]
5196[[package]]
5193name = "libwebrtc"
5197name = "libwebrtc"
5194version = "0.3.51"
5198version = "0.3.51"
5195source = "registry+https://github.com/rust-lang/crates.io-index"
5196checksum = "14f9145a63a8439508a9b5b51dffa4b1c12f812f49fcc4310ebae3d467f639ab"
5197dependencies = [
5199dependencies = [
5198 "cxx",
5200 "cxx",
5199 "glib 0.21.5",
5201 "glib 0.21.5",
@@ -5497,7 +5499,7 @@ dependencies = [
5497
5499
5498[[package]]
5500[[package]]
5499name = "mcp"
5501name = "mcp"
5500version = "0.2.0"
5502version = "0.3.0"
5501dependencies = [
5503dependencies = [
5502 "axum",
5504 "axum",
5503 "base64 0.22.1",
5505 "base64 0.22.1",
@@ -7678,7 +7680,6 @@ dependencies = [
7678 "wasm-bindgen",
7680 "wasm-bindgen",
7679 "wasm-bindgen-futures",
7681 "wasm-bindgen-futures",
7680 "web-sys",
7682 "web-sys",
7681 "webpki-roots",
7682]
7683]
7683
7684
7684[[package]]
7685[[package]]
@@ -7707,6 +7708,7 @@ dependencies = [
7707 "rustls-platform-verifier",
7708 "rustls-platform-verifier",
7708 "serde",
7709 "serde",
7709 "serde_json",
7710 "serde_json",
7711 "serde_urlencoded",
7710 "sync_wrapper",
7712 "sync_wrapper",
7711 "tokio",
7713 "tokio",
7712 "tokio-rustls",
7714 "tokio-rustls",
@@ -8479,7 +8481,7 @@ dependencies = [
8479
8481
8480[[package]]
8482[[package]]
8481name = "session"
8483name = "session"
8482version = "0.2.0"
8484version = "0.3.0"
8483dependencies = [
8485dependencies = [
8484 "base64 0.22.1",
8486 "base64 0.22.1",
8485 "futures-util",
8487 "futures-util",
@@ -8749,12 +8751,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
8749
8751
8750[[package]]
8752[[package]]
8751name = "store"
8753name = "store"
8752version = "0.2.0"
8754version = "0.3.0"
8753dependencies = [
8755dependencies = [
8754 "chrono",
8756 "chrono",
8755 "directories",
8757 "directories",
8756 "rusqlite",
8758 "rusqlite",
8757 "scraper",
8759 "scraper",
8760 "serde",
8758 "serde_json",
8761 "serde_json",
8759 "tempfile",
8762 "tempfile",
8760 "thiserror 2.0.21",
8763 "thiserror 2.0.21",
@@ -9196,7 +9199,7 @@ dependencies = [
9196
9199
9197[[package]]
9200[[package]]
9198name = "teams-core"
9201name = "teams-core"
9199version = "0.2.0"
9202version = "0.3.0"
9200dependencies = [
9203dependencies = [
9201 "chatsvc",
9204 "chatsvc",
9202 "chrono",
9205 "chrono",
@@ -10591,7 +10594,7 @@ dependencies = [
10591
10594
10592[[package]]
10595[[package]]
10593name = "webview"
10596name = "webview"
10594version = "0.2.0"
10597version = "0.3.0"
10595dependencies = [
10598dependencies = [
10596 "serde_json",
10599 "serde_json",
10597 "session",
10600 "session",
crates/app-call-model/src/share_view.rs +0 −42
@@ -5,10 +5,6 @@ pub const ZOOM_MIN: f32 = 1.;
5 5 pub const ZOOM_MAX: f32 = 4.;
6 6 const ZOOM_STEP: f32 = 1.25;
7 7 const WHEEL_ZOOM_PER_PIXEL: f32 = 0.0015;
8 pub const STRIP_MIN_WIDTH: f32 = 160.;
9 pub const STRIP_MAX_WIDTH: f32 = 400.;
10 pub const STRIP_DEFAULT_WIDTH: f32 = 232.;
11 pub const STRIP_WIDTH_META_KEY: &str = "call_strip_width";
12 8 pub const SHARE_MOTION_META_KEY: &str = "call_share_motion";
13 9 pub const SHARE_STANDOUT_META_KEY: &str = "call_share_standout";
14 10
@@ -93,40 +89,14 @@ impl ShareView {
93 89 }
94 90 }
95 91
96 pub fn clamp_strip_width(width: f32) -> f32 {
97 width.clamp(STRIP_MIN_WIDTH, STRIP_MAX_WIDTH)
98 }
99
100 pub fn load_strip_width(store: &store::Store) -> f32 {
101 store
102 .meta(STRIP_WIDTH_META_KEY)
103 .ok()
104 .flatten()
105 .and_then(|text| text.parse().ok())
106 .map_or(STRIP_DEFAULT_WIDTH, clamp_strip_width)
107 }
108
109 92 pub fn load_flag(store: &store::Store, key: &str) -> bool {
110 93 store.meta(key).ok().flatten().as_deref() == Some("1")
111 94 }
112 95
113 #[derive(Debug, Clone, Copy, PartialEq)]
114 pub struct StripDrag {
115 pub start_pointer: f32,
116 pub start_width: f32,
117 }
118
119 impl StripDrag {
120 pub fn width_at(&self, pointer: f32) -> f32 {
121 clamp_strip_width(self.start_width + self.start_pointer - pointer)
122 }
123 }
124
125 96 #[derive(Default)]
126 97 pub struct ShareStage {
127 98 pub view: ShareView,
128 99 pub pan_from: Option<(f32, f32)>,
129 pub strip_drag: Option<StripDrag>,
130 100 pub popped: bool,
131 101 pub bounds: Rc<Cell<(f32, f32, f32, f32)>>,
132 102 }
@@ -211,16 +181,4 @@ mod tests {
211 181 view.zoom_wheel(-60., (400., 225.), STAGE);
212 182 assert!(view.zoom() < zoomed);
213 183 }
214
215 #[test]
216 fn the_strip_width_stays_between_160_and_400_and_follows_the_pointer() {
217 let drag = StripDrag {
218 start_pointer: 900.,
219 start_width: 232.,
220 };
221 assert_eq!(drag.width_at(880.), 252.);
222 assert_eq!(drag.width_at(0.), STRIP_MAX_WIDTH);
223 assert_eq!(drag.width_at(2000.), STRIP_MIN_WIDTH);
224 assert_eq!(clamp_strip_width(10.), STRIP_MIN_WIDTH);
225 }
226 184 }
@@ -5,10 +5,6 @@ pub const ZOOM_MIN: f32 = 1.;
5pub const ZOOM_MAX: f32 = 4.;
5pub const ZOOM_MAX: f32 = 4.;
6const ZOOM_STEP: f32 = 1.25;
6const ZOOM_STEP: f32 = 1.25;
7const WHEEL_ZOOM_PER_PIXEL: f32 = 0.0015;
7const WHEEL_ZOOM_PER_PIXEL: f32 = 0.0015;
8pub const STRIP_MIN_WIDTH: f32 = 160.;
9pub const STRIP_MAX_WIDTH: f32 = 400.;
10pub const STRIP_DEFAULT_WIDTH: f32 = 232.;
11pub const STRIP_WIDTH_META_KEY: &str = "call_strip_width";
12pub const SHARE_MOTION_META_KEY: &str = "call_share_motion";
8pub const SHARE_MOTION_META_KEY: &str = "call_share_motion";
13pub const SHARE_STANDOUT_META_KEY: &str = "call_share_standout";
9pub const SHARE_STANDOUT_META_KEY: &str = "call_share_standout";
14
10
@@ -93,40 +89,14 @@ impl ShareView {
93 }
89 }
94}
90}
95
91
96pub fn clamp_strip_width(width: f32) -> f32 {
97 width.clamp(STRIP_MIN_WIDTH, STRIP_MAX_WIDTH)
98}
99
100pub fn load_strip_width(store: &store::Store) -> f32 {
101 store
102 .meta(STRIP_WIDTH_META_KEY)
103 .ok()
104 .flatten()
105 .and_then(|text| text.parse().ok())
106 .map_or(STRIP_DEFAULT_WIDTH, clamp_strip_width)
107}
108
109pub fn load_flag(store: &store::Store, key: &str) -> bool {
92pub fn load_flag(store: &store::Store, key: &str) -> bool {
110 store.meta(key).ok().flatten().as_deref() == Some("1")
93 store.meta(key).ok().flatten().as_deref() == Some("1")
111}
94}
112
95
113#[derive(Debug, Clone, Copy, PartialEq)]
114pub struct StripDrag {
115 pub start_pointer: f32,
116 pub start_width: f32,
117}
118
119impl StripDrag {
120 pub fn width_at(&self, pointer: f32) -> f32 {
121 clamp_strip_width(self.start_width + self.start_pointer - pointer)
122 }
123}
124
125#[derive(Default)]
96#[derive(Default)]
126pub struct ShareStage {
97pub struct ShareStage {
127 pub view: ShareView,
98 pub view: ShareView,
128 pub pan_from: Option<(f32, f32)>,
99 pub pan_from: Option<(f32, f32)>,
129 pub strip_drag: Option<StripDrag>,
130 pub popped: bool,
100 pub popped: bool,
131 pub bounds: Rc<Cell<(f32, f32, f32, f32)>>,
101 pub bounds: Rc<Cell<(f32, f32, f32, f32)>>,
132}
102}
@@ -211,16 +181,4 @@ mod tests {
211 view.zoom_wheel(-60., (400., 225.), STAGE);
181 view.zoom_wheel(-60., (400., 225.), STAGE);
212 assert!(view.zoom() < zoomed);
182 assert!(view.zoom() < zoomed);
213 }
183 }
214
215 #[test]
216 fn the_strip_width_stays_between_160_and_400_and_follows_the_pointer() {
217 let drag = StripDrag {
218 start_pointer: 900.,
219 start_width: 232.,
220 };
221 assert_eq!(drag.width_at(880.), 252.);
222 assert_eq!(drag.width_at(0.), STRIP_MAX_WIDTH);
223 assert_eq!(drag.width_at(2000.), STRIP_MIN_WIDTH);
224 assert_eq!(clamp_strip_width(10.), STRIP_MIN_WIDTH);
225 }
226}
184}
crates/app-state/src/app_state.rs +0 −3
@@ -191,7 +191,6 @@ pub struct AppState {
191 191 pub call_share_motion: bool,
192 192 pub call_share_standout: bool,
193 193 pub call_report_enabled: bool,
194 pub call_strip_width: f32,
195 194 pub call_view: crate::call::ViewSettings,
196 195 pub call_background: crate::call::BackgroundPick,
197 196 pub call_camera: calling::DeviceChoice,
@@ -355,7 +354,6 @@ impl AppState {
355 354 call_share_motion: false,
356 355 call_share_standout: false,
357 356 call_report_enabled: true,
358 call_strip_width: crate::call::STRIP_DEFAULT_WIDTH,
359 357 call_view: crate::call::ViewSettings::default(),
360 358 call_background: crate::call::BackgroundPick::None,
361 359 call_camera: calling::DeviceChoice::SystemDefault,
@@ -406,7 +404,6 @@ impl AppState {
406 404 state.call_effects = crate::call::load_camera_effects(&state.store);
407 405 state.join_options = crate::call::load_join_options(&state.store);
408 406 state.call_backgrounds.customs = crate::call::load_custom_backgrounds(&state.store);
409 state.call_strip_width = crate::call::load_strip_width(&state.store);
410 407 state.load_cached_translation_settings();
411 408 if !mode.demo {
412 409 state.directory.load_cached_presence(&state.store);
@@ -191,7 +191,6 @@ pub struct AppState {
191 pub call_share_motion: bool,
191 pub call_share_motion: bool,
192 pub call_share_standout: bool,
192 pub call_share_standout: bool,
193 pub call_report_enabled: bool,
193 pub call_report_enabled: bool,
194 pub call_strip_width: f32,
195 pub call_view: crate::call::ViewSettings,
194 pub call_view: crate::call::ViewSettings,
196 pub call_background: crate::call::BackgroundPick,
195 pub call_background: crate::call::BackgroundPick,
197 pub call_camera: calling::DeviceChoice,
196 pub call_camera: calling::DeviceChoice,
@@ -355,7 +354,6 @@ impl AppState {
355 call_share_motion: false,
354 call_share_motion: false,
356 call_share_standout: false,
355 call_share_standout: false,
357 call_report_enabled: true,
356 call_report_enabled: true,
358 call_strip_width: crate::call::STRIP_DEFAULT_WIDTH,
359 call_view: crate::call::ViewSettings::default(),
357 call_view: crate::call::ViewSettings::default(),
360 call_background: crate::call::BackgroundPick::None,
358 call_background: crate::call::BackgroundPick::None,
361 call_camera: calling::DeviceChoice::SystemDefault,
359 call_camera: calling::DeviceChoice::SystemDefault,
@@ -406,7 +404,6 @@ impl AppState {
406 state.call_effects = crate::call::load_camera_effects(&state.store);
404 state.call_effects = crate::call::load_camera_effects(&state.store);
407 state.join_options = crate::call::load_join_options(&state.store);
405 state.join_options = crate::call::load_join_options(&state.store);
408 state.call_backgrounds.customs = crate::call::load_custom_backgrounds(&state.store);
406 state.call_backgrounds.customs = crate::call::load_custom_backgrounds(&state.store);
409 state.call_strip_width = crate::call::load_strip_width(&state.store);
410 state.load_cached_translation_settings();
407 state.load_cached_translation_settings();
411 if !mode.demo {
408 if !mode.demo {
412 state.directory.load_cached_presence(&state.store);
409 state.directory.load_cached_presence(&state.store);
crates/app-state/src/call/mod.rs +1 −4
@@ -64,10 +64,7 @@ pub use report::load_enabled as load_report_enabled;
64 64 pub use ring::{MissedCall, RingEntry, Rings};
65 65 pub use schedule::{FormValues, Invitee, default_window, draft_from_form};
66 66 pub use share_actions::ZoomStep;
67 pub use share_view::{
68 SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY, STRIP_DEFAULT_WIDTH, STRIP_WIDTH_META_KEY,
69 ShareStage, StripDrag, clamp_strip_width, load_flag, load_strip_width,
70 };
67 pub use share_view::{SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY, ShareStage, load_flag};
71 68 pub use speed_dial::SpeedDialEntry;
72 69 pub use stage_layout::{contain_size, focus_stage_size, gallery_grid};
73 70 pub use stage_split::{
@@ -64,10 +64,7 @@ pub use report::load_enabled as load_report_enabled;
64pub use ring::{MissedCall, RingEntry, Rings};
64pub use ring::{MissedCall, RingEntry, Rings};
65pub use schedule::{FormValues, Invitee, default_window, draft_from_form};
65pub use schedule::{FormValues, Invitee, default_window, draft_from_form};
66pub use share_actions::ZoomStep;
66pub use share_actions::ZoomStep;
67pub use share_view::{
67pub use share_view::{SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY, ShareStage, load_flag};
68 SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY, STRIP_DEFAULT_WIDTH, STRIP_WIDTH_META_KEY,
69 ShareStage, StripDrag, clamp_strip_width, load_flag, load_strip_width,
70};
71pub use speed_dial::SpeedDialEntry;
68pub use speed_dial::SpeedDialEntry;
72pub use stage_layout::{contain_size, focus_stage_size, gallery_grid};
69pub use stage_layout::{contain_size, focus_stage_size, gallery_grid};
73pub use stage_split::{
70pub use stage_split::{
crates/app-state/src/call/share_actions.rs +1 −42
@@ -1,10 +1,7 @@
1 1 use calling::CallCommand;
2 2 use gpui_kit::*;
3 3
4 use super::share_view::{
5 SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY, STRIP_WIDTH_META_KEY, StripDrag,
6 clamp_strip_width,
7 };
4 use super::share_view::{SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY};
8 5 use crate::app_state::{AppEvent, AppState};
9 6
10 7 #[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -79,44 +76,6 @@ impl AppState {
79 76 self.change_share_stage(cx, |stage| stage.pan_from = None);
80 77 }
81 78
82 pub fn begin_strip_drag(&mut self, pointer_x: f32, cx: &mut Context<Self>) {
83 let start_width = self.call_strip_width;
84 self.change_share_stage(cx, |stage| {
85 stage.strip_drag = Some(StripDrag {
86 start_pointer: pointer_x,
87 start_width,
88 })
89 });
90 }
91
92 pub fn drag_strip_to(&mut self, pointer_x: f32, cx: &mut Context<Self>) {
93 let Some(drag) = self
94 .call
95 .as_ref()
96 .and_then(|call| call.share_stage.strip_drag)
97 else {
98 return;
99 };
100 self.call_strip_width = drag.width_at(pointer_x);
101 cx.notify();
102 }
103
104 pub fn end_strip_drag(&mut self, cx: &mut Context<Self>) {
105 if self
106 .call
107 .as_ref()
108 .is_none_or(|call| call.share_stage.strip_drag.is_none())
109 {
110 return;
111 }
112 let width = clamp_strip_width(self.call_strip_width);
113 self.call_strip_width = width;
114 let _ = self
115 .store
116 .set_meta(STRIP_WIDTH_META_KEY, &width.to_string());
117 self.change_share_stage(cx, |stage| stage.strip_drag = None);
118 }
119
120 79 pub fn pop_out_stage(&mut self, cx: &mut Context<Self>) {
121 80 self.change_share_stage(cx, |stage| stage.popped = true);
122 81 }
@@ -1,10 +1,7 @@
1use calling::CallCommand;
1use calling::CallCommand;
2use gpui_kit::*;
2use gpui_kit::*;
3
3
4use super::share_view::{
4use super::share_view::{SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY};
5 SHARE_MOTION_META_KEY, SHARE_STANDOUT_META_KEY, STRIP_WIDTH_META_KEY, StripDrag,
6 clamp_strip_width,
7};
8use crate::app_state::{AppEvent, AppState};
5use crate::app_state::{AppEvent, AppState};
9
6
10#[derive(Debug, Clone, Copy, PartialEq, Eq)]
7#[derive(Debug, Clone, Copy, PartialEq, Eq)]
@@ -79,44 +76,6 @@ impl AppState {
79 self.change_share_stage(cx, |stage| stage.pan_from = None);
76 self.change_share_stage(cx, |stage| stage.pan_from = None);
80 }
77 }
81
78
82 pub fn begin_strip_drag(&mut self, pointer_x: f32, cx: &mut Context<Self>) {
83 let start_width = self.call_strip_width;
84 self.change_share_stage(cx, |stage| {
85 stage.strip_drag = Some(StripDrag {
86 start_pointer: pointer_x,
87 start_width,
88 })
89 });
90 }
91
92 pub fn drag_strip_to(&mut self, pointer_x: f32, cx: &mut Context<Self>) {
93 let Some(drag) = self
94 .call
95 .as_ref()
96 .and_then(|call| call.share_stage.strip_drag)
97 else {
98 return;
99 };
100 self.call_strip_width = drag.width_at(pointer_x);
101 cx.notify();
102 }
103
104 pub fn end_strip_drag(&mut self, cx: &mut Context<Self>) {
105 if self
106 .call
107 .as_ref()
108 .is_none_or(|call| call.share_stage.strip_drag.is_none())
109 {
110 return;
111 }
112 let width = clamp_strip_width(self.call_strip_width);
113 self.call_strip_width = width;
114 let _ = self
115 .store
116 .set_meta(STRIP_WIDTH_META_KEY, &width.to_string());
117 self.change_share_stage(cx, |stage| stage.strip_drag = None);
118 }
119
120 pub fn pop_out_stage(&mut self, cx: &mut Context<Self>) {
79 pub fn pop_out_stage(&mut self, cx: &mut Context<Self>) {
121 self.change_share_stage(cx, |stage| stage.popped = true);
80 self.change_share_stage(cx, |stage| stage.popped = true);
122 }
81 }
crates/chatsvc/src/lib.rs +11 −3
@@ -17,6 +17,7 @@ pub mod emotions;
17 17 mod error;
18 18 pub mod forward;
19 19 pub mod gifs;
20 pub mod google_calendar;
20 21 mod json_id;
21 22 pub mod language_settings;
22 23 pub mod links;
@@ -51,9 +52,10 @@ pub use activity_feed::{
51 52 pub use activity_mentions::{MentionActivity, MentionKind, mentions_of};
52 53 pub use bot_profiles::{BotProfile, BotProfiles, parse_bot_profiles};
53 54 pub use calendar::{
54 Attendee, BusyTime, Calendar, CalendarEvent, CreatedEvent, DialIn, NewEvent, PersonSchedule,
55 Reminder, Repeat, Reply, ResponseType, ShowAs, join_info_text, meet_now_join_url,
56 new_event_body, parse_calendar_events, parse_created_event,
55 Attendee, BusyTime, Calendar, CalendarEvent, CalendarSource, CreatedEvent, DialIn, NewEvent,
56 PersonSchedule, Reminder, Repeat, Reply, ResponseType, ShowAs, join_info_text,
57 meet_now_join_url, new_event_body, new_event_body_with_join, parse_calendar_events,
58 parse_created_event,
57 59 };
58 60 pub use calllog::{CallDirection, CallLogEntry, CallOutcome};
59 61 pub use cards::{
@@ -73,6 +75,12 @@ pub use emotions::{EmotionReaction, MessageEmotions, parse_message_emotions, use
73 75 pub use error::{Error, Result};
74 76 pub use forward::{ForwardResult, MAX_FORWARD_MESSAGES};
75 77 pub use gifs::{Gif, Gifs};
78 pub use google_calendar::{
79 AuthPending, GoogleCalendar, GoogleEventDraft, GoogleOAuth, TokenBundle, allocate_redirect_uri,
80 client_id_from_env, exchange_code, google_event_body, google_rsvp_query, google_rsvp_status,
81 merge_calendar_events, normalize_join_url, parse_calendar_list, parse_google_events,
82 refresh_access_token, rrule_for_repeat, wait_for_code,
83 };
76 84 pub use language_settings::{
77 85 LanguageSettings, LanguageSettingsClient, TranslationBehavior, authoring_patch, behavior_patch,
78 86 parse_language_settings, target_patch,
@@ -17,6 +17,7 @@ pub mod emotions;
17mod error;
17mod error;
18pub mod forward;
18pub mod forward;
19pub mod gifs;
19pub mod gifs;
20pub mod google_calendar;
20mod json_id;
21mod json_id;
21pub mod language_settings;
22pub mod language_settings;
22pub mod links;
23pub mod links;
@@ -51,9 +52,10 @@ pub use activity_feed::{
51pub use activity_mentions::{MentionActivity, MentionKind, mentions_of};
52pub use activity_mentions::{MentionActivity, MentionKind, mentions_of};
52pub use bot_profiles::{BotProfile, BotProfiles, parse_bot_profiles};
53pub use bot_profiles::{BotProfile, BotProfiles, parse_bot_profiles};
53pub use calendar::{
54pub use calendar::{
54 Attendee, BusyTime, Calendar, CalendarEvent, CreatedEvent, DialIn, NewEvent, PersonSchedule,
55 Attendee, BusyTime, Calendar, CalendarEvent, CalendarSource, CreatedEvent, DialIn, NewEvent,
55 Reminder, Repeat, Reply, ResponseType, ShowAs, join_info_text, meet_now_join_url,
56 PersonSchedule, Reminder, Repeat, Reply, ResponseType, ShowAs, join_info_text,
56 new_event_body, parse_calendar_events, parse_created_event,
57 meet_now_join_url, new_event_body, new_event_body_with_join, parse_calendar_events,
58 parse_created_event,
57};
59};
58pub use calllog::{CallDirection, CallLogEntry, CallOutcome};
60pub use calllog::{CallDirection, CallLogEntry, CallOutcome};
59pub use cards::{
61pub use cards::{
@@ -73,6 +75,12 @@ pub use emotions::{EmotionReaction, MessageEmotions, parse_message_emotions, use
73pub use error::{Error, Result};
75pub use error::{Error, Result};
74pub use forward::{ForwardResult, MAX_FORWARD_MESSAGES};
76pub use forward::{ForwardResult, MAX_FORWARD_MESSAGES};
75pub use gifs::{Gif, Gifs};
77pub use gifs::{Gif, Gifs};
78pub use google_calendar::{
79 AuthPending, GoogleCalendar, GoogleEventDraft, GoogleOAuth, TokenBundle, allocate_redirect_uri,
80 client_id_from_env, exchange_code, google_event_body, google_rsvp_query, google_rsvp_status,
81 merge_calendar_events, normalize_join_url, parse_calendar_list, parse_google_events,
82 refresh_access_token, rrule_for_repeat, wait_for_code,
83};
76pub use language_settings::{
84pub use language_settings::{
77 LanguageSettings, LanguageSettingsClient, TranslationBehavior, authoring_patch, behavior_patch,
85 LanguageSettings, LanguageSettingsClient, TranslationBehavior, authoring_patch, behavior_patch,
78 parse_language_settings, target_patch,
86 parse_language_settings, target_patch,
crates/store/src/lib.rs +5 −0
@@ -1,6 +1,7 @@
1 1 mod activity;
2 2 mod attachment_images;
3 3 mod avatars;
4 mod calendar_accounts;
4 5 mod chats;
5 6 mod drafts;
6 7 mod error;
@@ -24,6 +25,10 @@ mod teams;
24 25 mod text;
25 26 mod time;
26 27
28 pub use calendar_accounts::{
29 CALENDAR_ACCOUNTS_KEY, CalendarAccounts, CalendarProvider, CalendarRef, GoogleAccount,
30 GoogleCalendarInfo, GoogleTokenSet, load_calendar_accounts, save_calendar_accounts,
31 };
27 32 pub use error::{Error, Result};
28 33 pub use image_files::ImageFileCache;
29 34 pub use migrations::latest_version;
@@ -1,6 +1,7 @@
1mod activity;
1mod activity;
2mod attachment_images;
2mod attachment_images;
3mod avatars;
3mod avatars;
4mod calendar_accounts;
4mod chats;
5mod chats;
5mod drafts;
6mod drafts;
6mod error;
7mod error;
@@ -24,6 +25,10 @@ mod teams;
24mod text;
25mod text;
25mod time;
26mod time;
26
27
28pub use calendar_accounts::{
29 CALENDAR_ACCOUNTS_KEY, CalendarAccounts, CalendarProvider, CalendarRef, GoogleAccount,
30 GoogleCalendarInfo, GoogleTokenSet, load_calendar_accounts, save_calendar_accounts,
31};
27pub use error::{Error, Result};
32pub use error::{Error, Result};
28pub use image_files::ImageFileCache;
33pub use image_files::ImageFileCache;
29pub use migrations::latest_version;
34pub use migrations::latest_version;