Privacy-first AI meeting note taker for Windows, macOS and Linux. Free, open source (MIT). On-device Whisper/Parakeet transcription and speaker diarization, no meeting bot. Open-source alternative to Granola, Otter and Fireflies. https://meetily.ai
Rust aiai-meeting-assistantllmlocal-aimacmeeting-minutesmeeting-notesoffline-firstollamaparakeetprivacy-focusedprivacy-toolsrustself-hostedsortformerspeech-to-texttranscriptionwhisperwhisper-cppwindows
feat: add seasonal sidebar doodles
Mohammed Safvancf9193d9624d
diff --git a/.github/workflows/WORKFLOWS_OVERVIEW.md b/.github/workflows/WORKFLOWS_OVERVIEW.mdindex c8a86f3d..0c1e03aa 100644--- a/.github/workflows/WORKFLOWS_OVERVIEW.md+++ b/.github/workflows/WORKFLOWS_OVERVIEW.md@@ -298,6 +298,7 @@ All workflows require these secrets to be configured:### Application Configuration- `MEETILY_RSA_PUBLIC_KEY` - License validation public key+- `MEETILY_DOODLE_URL` - Seasonal sidebar icon URL (repository variable, not a secret; unset = feature off)- `SUPABASE_URL` - Online license verification- `SUPABASE_ANON_KEY` - Supabase anonymous keydiff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.ymlindex a3098d56..e71d52a3 100644--- a/.github/workflows/build-linux.yml+++ b/.github/workflows/build-linux.yml@@ -228,6 +228,7 @@ jobs:TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}# License validation RSA public key (embedded at build time)MEETILY_RSA_PUBLIC_KEY: ${{ secrets.MEETILY_RSA_PUBLIC_KEY }}+ MEETILY_DOODLE_URL: ${{ vars.MEETILY_DOODLE_URL }}# Supabase configuration (for online license verification)SUPABASE_URL: ${{ secrets.SUPABASE_URL }}SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.ymlindex 6bd60d89..ba94b4ae 100644--- a/.github/workflows/build-macos.yml+++ b/.github/workflows/build-macos.yml@@ -171,6 +171,7 @@ jobs:TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}# License validation RSA public key (embedded at build time)MEETILY_RSA_PUBLIC_KEY: ${{ secrets.MEETILY_RSA_PUBLIC_KEY }}+ MEETILY_DOODLE_URL: ${{ vars.MEETILY_DOODLE_URL }}# Supabase configuration (for online license verification)SUPABASE_URL: ${{ secrets.SUPABASE_URL }}SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}@@ -188,6 +189,7 @@ jobs:TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}# License validation RSA public key (embedded at build time)MEETILY_RSA_PUBLIC_KEY: ${{ secrets.MEETILY_RSA_PUBLIC_KEY }}+ MEETILY_DOODLE_URL: ${{ vars.MEETILY_DOODLE_URL }}# Supabase configuration (for online license verification)SUPABASE_URL: ${{ secrets.SUPABASE_URL }}SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.ymlindex 1bcbf609..b99f8085 100644--- a/.github/workflows/build-windows.yml+++ b/.github/workflows/build-windows.yml@@ -704,6 +704,7 @@ jobs:TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}# License validation RSA public key (embedded at build time)MEETILY_RSA_PUBLIC_KEY: ${{ secrets.MEETILY_RSA_PUBLIC_KEY }}+ MEETILY_DOODLE_URL: ${{ vars.MEETILY_DOODLE_URL }}# Supabase configuration (for online license verification)SUPABASE_URL: ${{ secrets.SUPABASE_URL }}SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 39ec7246..af4e4537 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -643,6 +643,7 @@ jobs:TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}# License validation RSA public key (embedded at build time)MEETILY_RSA_PUBLIC_KEY: ${{ secrets.MEETILY_RSA_PUBLIC_KEY }}+ MEETILY_DOODLE_URL: ${{ vars.MEETILY_DOODLE_URL }}# Supabase configuration (for online license verification)SUPABASE_URL: ${{ secrets.SUPABASE_URL }}SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}diff --git a/PRIVACY_POLICY.md b/PRIVACY_POLICY.mdindex 9db8bdff..492f9038 100644--- a/PRIVACY_POLICY.md+++ b/PRIVACY_POLICY.md@@ -14,6 +14,8 @@ Meetily is built on the principle that your meeting data should remain private a- **Meeting content**: Remains on your infrastructure- **AI summaries**: Generated locally or through your chosen LLM provider+Official builds may fetch seasonal assets from meetily.ai.+### Your Data Ownership- You own all meeting data, transcripts, and recordings- Data is stored locally on your device@@ -75,6 +77,8 @@ If you choose to use external LLM providers:- **Data**: Only anonymized usage patterns, no meeting content- **Control**: Completely optional, off by default, and user-controlled++## Your Privacy Rights### Data Controldiff --git a/frontend/src-tauri/src/doodle.rs b/frontend/src-tauri/src/doodle.rsnew file mode 100644index 00000000..93046baa--- /dev/null+++ b/frontend/src-tauri/src/doodle.rs@@ -0,0 +1,500 @@+//! Seasonal sidebar icon (official builds only).+//! When MEETILY_DOODLE_URL is set at compile time, the app sends at most one HTTPS GET per UTC day+//! to that URL. The request carries nothing about the user: no ID, version, license, platform,+//! settings, cookies, User-Agent or custom headers. Disclosed in PRIVACY_POLICY.md ("Seasonal icon").+//! Forks and local builds without the variable make no request.++use chrono::NaiveDate;+use reqwest::{StatusCode, Url};+use std::io::ErrorKind;+use std::path::{Path, PathBuf};+use std::sync::OnceLock;+use std::time::Duration;+use tauri::Manager;+use tokio::fs;++const DOODLE_URL: Option<&str> = option_env!("MEETILY_DOODLE_URL");+const PNG_SIGNATURE: [u8; 8] = [0x89, b'P', b'N', b'G', 0x0D, 0x0A, 0x1A, 0x0A];+const MAX_BYTES: usize = 256 * 1024;+const MAX_PIXELS: u32 = 512;+const MAX_REDIRECTS: usize = 2;+const TIMEOUT: Duration = Duration::from_secs(10);+const ICON_FILE: &str = "doodle.png";+const TMP_FILE: &str = "doodle.png.tmp";+const LAST_CHECK_FILE: &str = "last-check";++fn configured_url(raw: Option<&'static str>) -> Option<&'static str> {+ raw.filter(|url| url.starts_with("https://"))+}++fn redirect_allowed(origin: &Url, next: &Url, previous: usize) -> bool {+ previous <= MAX_REDIRECTS+ && next.scheme() == origin.scheme()+ && next.host_str() == origin.host_str()+ && next.port_or_known_default() == origin.port_or_known_default()+ && next.path().starts_with("/doodle/")+}++fn build_client(origin: Url, https_only: bool) -> reqwest::Result<reqwest::Client> {+ reqwest::Client::builder()+ .https_only(https_only)+ .timeout(TIMEOUT)+ .referer(false)+ .redirect(reqwest::redirect::Policy::custom(move |attempt| {+ if redirect_allowed(&origin, attempt.url(), attempt.previous().len()) {+ attempt.follow()+ } else {+ attempt.stop()+ }+ }))+ .build()+}++fn is_valid_png(bytes: &[u8]) -> bool {+ if bytes.len() < 24 || bytes[..8] != PNG_SIGNATURE || &bytes[12..16] != b"IHDR" {+ return false;+ }+ let width = u32::from_be_bytes(bytes[16..20].try_into().unwrap());+ let height = u32::from_be_bytes(bytes[20..24].try_into().unwrap());+ (1..=MAX_PIXELS).contains(&width) && (1..=MAX_PIXELS).contains(&height)+}++async fn fetch(client: &reqwest::Client, url: &str) -> reqwest::Result<Option<Vec<u8>>> {+ let mut response = client.get(url).send().await?;+ if response.status() != StatusCode::OK {+ return Ok(None);+ }+ let mut buf = Vec::new();+ while let Some(chunk) = response.chunk().await? {+ if buf.len() + chunk.len() > MAX_BYTES {+ return Ok(None);+ }+ buf.extend_from_slice(&chunk);+ }+ Ok(is_valid_png(&buf).then_some(buf))+}++fn sync_lock() -> &'static tokio::sync::Mutex<()> {+ static LOCK: OnceLock<tokio::sync::Mutex<()>> = OnceLock::new();+ LOCK.get_or_init(|| tokio::sync::Mutex::new(()))+}++async fn sync(+ client: &reqwest::Client,+ url: &str,+ dir: &Path,+ today: NaiveDate,+) -> Result<Option<PathBuf>, String> {+ let _guard = sync_lock().lock().await;+ let icon = dir.join(ICON_FILE);+ let last_check = dir.join(LAST_CHECK_FILE);+ let today = today.to_string();+ if let Ok(saved_date) = fs::read_to_string(&last_check).await {+ if saved_date.trim() == today {+ return Ok(fs::try_exists(&icon)+ .await+ .map_err(|e| e.to_string())?+ .then_some(icon));+ }+ }+ fs::create_dir_all(dir).await.map_err(|e| e.to_string())?;+ let temporary = dir.join(TMP_FILE);+ let outcome = fetch(client, url).await;+ let result: std::io::Result<Option<PathBuf>> = async {+ match outcome {+ Ok(Some(bytes)) => {+ fs::write(&temporary, bytes).await?;+ fs::rename(&temporary, &icon).await?;+ fs::write(&last_check, &today).await?;+ Ok(Some(icon))+ }+ response => {+ if let Err(e) = fs::remove_file(&icon).await {+ if e.kind() != ErrorKind::NotFound {+ return Err(e);+ }+ }+ if let Err(e) = response {+ log::warn!("doodle: request failed: {e}");+ } else {+ fs::write(&last_check, &today).await?;+ }+ Ok(None)+ }+ }+ }+ .await;+ if matches!(&result, Ok(Some(_))) {+ log::info!("doodle: saved icon");+ } else {+ log::info!("doodle: no icon");+ }+ if result.is_err() {+ let _ = fs::remove_file(&temporary).await;+ }+ result.map_err(|e| e.to_string())+}++#[tauri::command]+pub async fn doodle_sync(app: tauri::AppHandle) -> Result<Option<String>, String> {+ let Some(url) = configured_url(DOODLE_URL) else {+ return Ok(None);+ };+ let origin = Url::parse(url).map_err(|e| e.to_string())?;+ let client = build_client(origin, true).map_err(|e| e.to_string())?;+ let dir = app+ .path()+ .app_data_dir()+ .map_err(|e| e.to_string())?+ .join("doodle");+ Ok(sync(&client, url, &dir, chrono::Utc::now().date_naive())+ .await?+ .map(|path| path.to_string_lossy().into_owned()))+}++#[cfg(test)]+mod tests {+ use super::*;+ use std::sync::atomic::{AtomicUsize, Ordering};+ use std::sync::Arc;+ use tokio::io::{AsyncReadExt, AsyncWriteExt};+ use tokio::net::{TcpListener, TcpStream};++ fn png(w: u32, h: u32) -> Vec<u8> {+ let mut bytes = PNG_SIGNATURE.to_vec();+ bytes.extend_from_slice(&[0, 0, 0, 13]);+ bytes.extend_from_slice(b"IHDR");+ bytes.extend_from_slice(&w.to_be_bytes());+ bytes.extend_from_slice(&h.to_be_bytes());+ bytes.extend_from_slice(&[8, 6, 0, 0, 0]);+ bytes.extend_from_slice(&[0; 4]);+ bytes+ }++ fn response(status: &str, body: &[u8]) -> Vec<u8> {+ let mut bytes = format!(+ "HTTP/1.1 {status}\r\nContent-Length: {}\r\nConnection: close\r\n\r\n",+ body.len()+ )+ .into_bytes();+ bytes.extend_from_slice(body);+ bytes+ }++ fn redirect(location: &str) -> Vec<u8> {+ format!(+ "HTTP/1.1 302 Found\r\nLocation: {location}\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"+ )+ .into_bytes()+ }++ async fn read_request(socket: &mut TcpStream) -> String {+ let mut request = Vec::new();+ let mut buffer = [0_u8; 1024];+ loop {+ let count = socket.read(&mut buffer).await.unwrap();+ assert_ne!(count, 0, "connection closed before request headers");+ request.extend_from_slice(&buffer[..count]);+ if request.windows(4).any(|window| window == b"\r\n\r\n") {+ return String::from_utf8(request).unwrap();+ }+ }+ }++ async fn server(+ handler: impl Fn(&str) -> Vec<u8> + Send + Sync + 'static,+ ) -> (Url, Arc<AtomicUsize>) {+ let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();+ let addr = listener.local_addr().unwrap();+ let origin = Url::parse(&format!("http://{addr}/doodle?app=oss")).unwrap();+ let counter = Arc::new(AtomicUsize::new(0));+ let requests = counter.clone();+ let handler = Arc::new(handler);+ tokio::spawn(async move {+ loop {+ let (mut socket, _) = listener.accept().await.unwrap();+ let requests = requests.clone();+ let handler = handler.clone();+ tokio::spawn(async move {+ let request = read_request(&mut socket).await;+ requests.fetch_add(1, Ordering::SeqCst);+ let headers = request.to_ascii_lowercase();+ for header in ["user-agent:", "cookie:", "referer:", "authorization:"] {+ assert!(!headers.contains(header), "unexpected {header} header");+ }+ let path = request.lines().next().unwrap().split_whitespace().nth(1).unwrap();+ // Oversized responses may be dropped before the server finishes writing.+ let _ = socket.write_all(&handler(path)).await;+ let _ = socket.shutdown().await;+ });+ }+ });+ (origin, counter)+ }++ fn client(origin: &Url) -> reqwest::Client {+ build_client(origin.clone(), false).unwrap()+ }++ fn today() -> NaiveDate {+ NaiveDate::from_ymd_opt(2026, 11, 9).unwrap()+ }++ async fn assert_date_saved(dir: &Path) {+ assert_eq!(+ tokio::fs::read_to_string(dir.join(LAST_CHECK_FILE)).await.unwrap(),+ today().to_string()+ );+ }++ #[test]+ fn configuration_requires_explicit_https_url() {+ assert_eq!(configured_url(None), None);+ assert_eq!(configured_url(Some("")), None);+ assert_eq!(configured_url(Some("http://example.invalid/doodle")), None);+ assert_eq!(+ configured_url(Some("https://example.invalid/doodle")),+ Some("https://example.invalid/doodle")+ );+ }++ #[test]+ fn png_header_requires_signature_ihdr_and_bounded_nonzero_dimensions() {+ assert!(is_valid_png(&png(1, 1)));+ assert!(is_valid_png(&png(512, 512)));+ for (width, height) in [(0, 1), (1, 0), (513, 10), (10, 513)] {+ assert!(!is_valid_png(&png(width, height)));+ }+ assert!(!is_valid_png(&png(1, 1)[..23]));+ let mut bytes = png(1, 1);+ bytes[0] = 0;+ assert!(!is_valid_png(&bytes));+ let mut bytes = png(1, 1);+ bytes[12..16].copy_from_slice(b"IDAT");+ assert!(!is_valid_png(&bytes));+ }++ #[test]+ fn redirect_policy_restricts_origin_path_and_hop_count() {+ let origin = Url::parse("https://example.invalid/doodle").unwrap();+ let next = origin.join("/doodle/a.png").unwrap();+ assert!(redirect_allowed(&origin, &next, 1));+ assert!(redirect_allowed(&origin, &next, 2));+ assert!(!redirect_allowed(&origin, &next, 3));+ let downgrade = Url::parse("http://example.invalid/doodle/a.png").unwrap();+ assert!(!redirect_allowed(&origin, &downgrade, 1));+ let mut other_port = next.clone();+ other_port.set_port(Some(8443)).unwrap();+ assert!(!redirect_allowed(&origin, &other_port, 1));+ assert!(!redirect_allowed(&origin, &origin.join("/other/a.png").unwrap(), 1));+ }++ #[tokio::test]+ async fn same_day_cache_does_not_request_with_or_without_icon() {+ let dir = tempfile::tempdir().unwrap();+ let (origin, count) = server(|_| response("200 OK", &png(1, 1))).await;+ let client = client(&origin);+ let icon = dir.path().join(ICON_FILE);+ tokio::fs::write(&icon, png(1, 1)).await.unwrap();+ tokio::fs::write(dir.path().join(LAST_CHECK_FILE), format!("{}\n", today()))+ .await+ .unwrap();+ assert_eq!(sync(&client, origin.as_str(), dir.path(), today()).await.unwrap(), Some(icon.clone()));+ tokio::fs::remove_file(&icon).await.unwrap();+ assert_eq!(sync(&client, origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert_eq!(count.load(Ordering::SeqCst), 0);+ }++ #[tokio::test]+ async fn allowed_redirect_saves_png_and_date() {+ let dir = tempfile::tempdir().unwrap();+ let (origin, count) = server(|path| match path {+ "/doodle?app=oss" => redirect("/doodle/a.png?app=oss"),+ "/doodle/a.png?app=oss" => response("200 OK", &png(512, 512)),+ _ => panic!("unexpected path: {path}"),+ }).await;+ let icon = dir.path().join(ICON_FILE);+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), Some(icon.clone()));+ assert_eq!(tokio::fs::read(icon).await.unwrap(), png(512, 512));+ assert_date_saved(dir.path()).await;+ assert_eq!(count.load(Ordering::SeqCst), 2);+ }++ #[tokio::test]+ async fn invalid_png_and_excessive_dimensions_save_date_without_icon() {+ for body in [b"<svg/>".to_vec(), png(513, 10)] {+ let dir = tempfile::tempdir().unwrap();+ let (origin, count) = server(move |_| response("200 OK", &body)).await;+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert!(!tokio::fs::try_exists(dir.path().join(ICON_FILE)).await.unwrap());+ assert_date_saved(dir.path()).await;+ assert_eq!(count.load(Ordering::SeqCst), 1);+ }+ }++ #[tokio::test]+ async fn oversized_body_without_content_length_is_rejected() {+ let dir = tempfile::tempdir().unwrap();+ let (origin, _) = server(|_| {+ let mut bytes = b"HTTP/1.1 200 OK\r\nConnection: close\r\n\r\n".to_vec();+ let mut body = png(1, 1);+ body.resize(300 * 1024, 0);+ bytes.extend_from_slice(&body);+ bytes+ }).await;+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert!(!tokio::fs::try_exists(dir.path().join(ICON_FILE)).await.unwrap());+ assert_date_saved(dir.path()).await;+ }++ #[tokio::test]+ async fn oversized_stream_is_rejected_without_waiting_for_body_end() {+ let dir = tempfile::tempdir().unwrap();+ let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();+ let addr = listener.local_addr().unwrap();+ let origin = Url::parse(&format!("http://{addr}/doodle?app=oss")).unwrap();+ let (_hold_open, released) = tokio::sync::oneshot::channel::<()>();+ let task = tokio::spawn(async move {+ let (mut socket, _) = listener.accept().await.unwrap();+ read_request(&mut socket).await;+ socket.write_all(b"HTTP/1.1 200 OK\r\nContent-Length: 10000000\r\nConnection: close\r\n\r\n").await.unwrap();+ let mut body = png(1, 1);+ body.resize(300 * 1024, 0);+ let _ = socket.write_all(&body).await;+ let _ = released.await;+ let _ = socket.shutdown().await;+ });+ let client = client(&origin);+ let result = tokio::time::timeout(+ Duration::from_secs(5),+ sync(&client, origin.as_str(), dir.path(), today()),+ ).await;+ task.abort();+ assert_eq!(result.expect("must stop reading at the byte limit").unwrap(), None);+ assert!(!tokio::fs::try_exists(dir.path().join(ICON_FILE)).await.unwrap());+ assert_date_saved(dir.path()).await;+ }++ #[tokio::test]+ async fn non_ok_responses_remove_stale_icon_and_save_date() {+ for status in ["204 No Content", "500 Internal Server Error"] {+ let dir = tempfile::tempdir().unwrap();+ let icon = dir.path().join(ICON_FILE);+ tokio::fs::write(&icon, png(1, 1)).await.unwrap();+ tokio::fs::write(dir.path().join(LAST_CHECK_FILE), "2026-11-08").await.unwrap();+ let (origin, count) = server(move |_| response(status, b"")).await;+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert!(!tokio::fs::try_exists(icon).await.unwrap());+ assert_date_saved(dir.path()).await;+ assert_eq!(count.load(Ordering::SeqCst), 1);+ }+ }++ #[tokio::test]+ async fn connection_failure_removes_stale_icon_without_saving_date() {+ let dir = tempfile::tempdir().unwrap();+ let icon = dir.path().join(ICON_FILE);+ tokio::fs::write(&icon, png(1, 1)).await.unwrap();+ let listener = TcpListener::bind("127.0.0.1:0").await.unwrap();+ let addr = listener.local_addr().unwrap();+ let origin = Url::parse(&format!("http://{addr}/doodle?app=oss")).unwrap();+ drop(listener);+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert!(!tokio::fs::try_exists(icon).await.unwrap());+ assert!(!tokio::fs::try_exists(dir.path().join(LAST_CHECK_FILE)).await.unwrap());+ }++ #[tokio::test]+ async fn redirects_to_different_host_or_path_are_not_requested() {+ for different_host in [true, false] {+ let dir = tempfile::tempdir().unwrap();+ let location = Arc::new(OnceLock::<String>::new());+ let target = location.clone();+ let image_requests = Arc::new(AtomicUsize::new(0));+ let images = image_requests.clone();+ let (origin, count) = server(move |path| {+ if path == "/doodle?app=oss" {+ redirect(target.get().unwrap())+ } else {+ images.fetch_add(1, Ordering::SeqCst);+ response("200 OK", &png(1, 1))+ }+ }).await;+ let mut next = origin.clone();+ if different_host {+ next.set_host(Some("localhost")).unwrap();+ next.set_path("/doodle/a.png");+ } else {+ next.set_path("/other/a.png");+ }+ location.set(next.to_string()).unwrap();+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert_date_saved(dir.path()).await;+ assert_eq!(count.load(Ordering::SeqCst), 1);+ assert_eq!(image_requests.load(Ordering::SeqCst), 0);+ }+ }++ #[tokio::test]+ async fn third_redirect_is_stopped_and_date_is_saved() {+ let dir = tempfile::tempdir().unwrap();+ let image_requests = Arc::new(AtomicUsize::new(0));+ let images = image_requests.clone();+ let (origin, count) = server(move |path| match path {+ "/doodle?app=oss" => redirect("/doodle/a"),+ "/doodle/a" => redirect("/doodle/b"),+ "/doodle/b" => redirect("/doodle/c.png"),+ "/doodle/c.png" => {+ images.fetch_add(1, Ordering::SeqCst);+ response("200 OK", &png(1, 1))+ }+ _ => panic!("unexpected path: {path}"),+ }).await;+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), None);+ assert_date_saved(dir.path()).await;+ assert_eq!(count.load(Ordering::SeqCst), 3);+ assert_eq!(image_requests.load(Ordering::SeqCst), 0);+ }++ #[tokio::test]+ async fn two_redirects_are_allowed() {+ let dir = tempfile::tempdir().unwrap();+ let (origin, count) = server(|path| match path {+ "/doodle?app=oss" => redirect("/doodle/a?app=oss"),+ "/doodle/a?app=oss" => redirect("/doodle/b.png?app=oss"),+ "/doodle/b.png?app=oss" => response("200 OK", &png(1, 1)),+ _ => panic!("unexpected path: {path}"),+ }).await;+ let icon = dir.path().join(ICON_FILE);+ assert_eq!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.unwrap(), Some(icon.clone()));+ assert_eq!(tokio::fs::read(icon).await.unwrap(), png(1, 1));+ assert_date_saved(dir.path()).await;+ assert_eq!(count.load(Ordering::SeqCst), 3);+ }++ #[tokio::test]+ async fn concurrent_syncs_share_one_request() {+ let dir = tempfile::tempdir().unwrap();+ let (origin, count) = server(|_| response("200 OK", &png(1, 1))).await;+ let client = client(&origin);+ let (first, second) = tokio::join!(+ sync(&client, origin.as_str(), dir.path(), today()),+ sync(&client, origin.as_str(), dir.path(), today()),+ );+ let expected = Some(dir.path().join(ICON_FILE));+ assert_eq!(first.unwrap(), expected);+ assert_eq!(second.unwrap(), expected);+ assert_eq!(count.load(Ordering::SeqCst), 1);+ assert_date_saved(dir.path()).await;+ }++ #[tokio::test]+ async fn rename_failure_cleans_temporary_file_and_does_not_save_date() {+ let dir = tempfile::tempdir().unwrap();+ tokio::fs::create_dir(dir.path().join(ICON_FILE)).await.unwrap();+ let (origin, _) = server(|_| response("200 OK", &png(1, 1))).await;+ assert!(sync(&client(&origin), origin.as_str(), dir.path(), today()).await.is_err());+ assert!(!tokio::fs::try_exists(dir.path().join(TMP_FILE)).await.unwrap());+ assert!(!tokio::fs::try_exists(dir.path().join(LAST_CHECK_FILE)).await.unwrap());+ }+}diff --git a/frontend/src-tauri/src/lib.rs b/frontend/src-tauri/src/lib.rsindex f2e6c737..43df0ef9 100644--- a/frontend/src-tauri/src/lib.rs+++ b/frontend/src-tauri/src/lib.rs@@ -42,6 +42,7 @@ pub mod audio;pub mod config;pub mod console_utils;pub mod database;+pub mod doodle;pub mod notifications;pub mod ollama;pub mod onboarding;@@ -735,6 +736,7 @@ pub fn run() {get_transcription_status,read_audio_file,save_transcript,+ doodle::doodle_sync,analytics::commands::init_analytics,analytics::commands::disable_analytics,analytics::commands::track_event,diff --git a/frontend/src-tauri/tauri.conf.json b/frontend/src-tauri/tauri.conf.jsonindex 372bd322..81acfdb2 100644--- a/frontend/src-tauri/tauri.conf.json+++ b/frontend/src-tauri/tauri.conf.json@@ -28,7 +28,7 @@"csp": {"default-src": "'self'","style-src": "'self' 'unsafe-inline'",- "img-src": "'self' asset: https://asset.localhost data:",+ "img-src": "'self' asset: http://asset.localhost https://asset.localhost data:","connect-src": "'self' http://localhost:11434 http://localhost:5167 http://localhost:8178 https://api.ollama.ai"},"assetProtocol": {diff --git a/frontend/src/components/Logo.tsx b/frontend/src/components/Logo.tsxindex e0fdb97d..48472fdb 100644--- a/frontend/src/components/Logo.tsx+++ b/frontend/src/components/Logo.tsx@@ -1,15 +1,22 @@import React from "react";import Image from "next/image";+import { convertFileSrc } from "@tauri-apps/api/core";import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "./ui/dialog";import { VisuallyHidden } from "./ui/visually-hidden";import { About } from "./About";interface LogoProps {isCollapsed: boolean;+ doodlePath?: string | null;+ doodleDate?: string | null;}const Logo = React.forwardRef<HTMLButtonElement, LogoProps>(- ({ isCollapsed }, ref) => {+ ({ isCollapsed, doodlePath, doodleDate }, ref) => {+ const [failedSrc, setFailedSrc] = React.useState<string | null>(null);+ const doodleSrc = doodlePath && doodleDate+ ? `${convertFileSrc(doodlePath)}?d=${doodleDate}`+ : null;return (<Dialog aria-describedby={undefined}>{isCollapsed ? (@@ -20,14 +27,26 @@ const Logo = React.forwardRef<HTMLButtonElement, LogoProps>(className="flex items-center justify-center mb-2 cursor-pointer bg-transparent border-none p-0 hover:opacity-80 transition-opacity"aria-label="About Meetily">- <Image- src="/logo-collapsed.png"- alt="Meetily"- width={40}- height={40}- className="object-contain"- priority- />+ {doodleSrc && doodleSrc !== failedSrc ? (+ // eslint-disable-next-line @next/next/no-img-element+ <img+ src={doodleSrc}+ alt="Meetily"+ width={40}+ height={40}+ className="w-10 h-10 object-contain"+ onError={() => setFailedSrc(doodleSrc)}+ />+ ) : (+ <Image+ src="/logo-collapsed.png"+ alt="Meetily"+ width={40}+ height={40}+ className="object-contain"+ priority+ />+ )}</button></DialogTrigger>) : (diff --git a/frontend/src/components/Sidebar/SidebarProvider.tsx b/frontend/src/components/Sidebar/SidebarProvider.tsxindex c50015e4..250765cc 100644--- a/frontend/src/components/Sidebar/SidebarProvider.tsx+++ b/frontend/src/components/Sidebar/SidebarProvider.tsx@@ -40,6 +40,8 @@ interface SidebarContextType {setCurrentMeeting: (meeting: CurrentMeeting | null) => void;sidebarItems: SidebarItem[];isCollapsed: boolean;+ doodlePath: string | null;+ doodleDate: string | null;toggleCollapse: () => void;meetings: CurrentMeeting[];setMeetings: (meetings: CurrentMeeting[]) => void;@@ -78,6 +80,8 @@ export const useSidebar = () => {export function SidebarProvider({ children }: { children: React.ReactNode }) {const [currentMeeting, setCurrentMeeting] = useState<CurrentMeeting | null>({ id: 'intro-call', title: '+ New Call' });const [isCollapsed, setIsCollapsed] = useState(true);+ const [doodlePath, setDoodlePath] = useState<string | null>(null);+ const [doodleDate, setDoodleDate] = useState<string | null>(null);const [meetings, setMeetings] = useState<CurrentMeeting[]>([]);const [sidebarItems, setSidebarItems] = useState<SidebarItem[]>([]);const [isMeetingActive, setIsMeetingActive] = useState(false);@@ -93,6 +97,19 @@ export function SidebarProvider({ children }: { children: React.ReactNode }) {const pathname = usePathname();const router = useRouter();+ useEffect(() => {+ const sync = () => {+ invoke<string | null>('doodle_sync').then(path => {+ setDoodlePath(path);+ setDoodleDate(new Date().toISOString().slice(0, 10));+ }).catch(() => setDoodlePath(null));+ };+ const onVisibility = () => { if (document.visibilityState === 'visible') sync(); };+ sync();+ document.addEventListener('visibilitychange', onVisibility);+ return () => document.removeEventListener('visibilitychange', onVisibility);+ }, []);+// Extract fetchMeetings as a reusable functionconst fetchMeetings = React.useCallback(async () => {if (serverAddress) {@@ -300,6 +317,8 @@ export function SidebarProvider({ children }: { children: React.ReactNode }) {setCurrentMeeting,sidebarItems,isCollapsed,+ doodlePath,+ doodleDate,toggleCollapse,meetings,setMeetings,diff --git a/frontend/src/components/Sidebar/index.tsx b/frontend/src/components/Sidebar/index.tsxindex d0ca5007..bdecb216 100644--- a/frontend/src/components/Sidebar/index.tsx+++ b/frontend/src/components/Sidebar/index.tsx@@ -47,6 +47,8 @@ const Sidebar: React.FC = () => {setCurrentMeeting,sidebarItems,isCollapsed,+ doodlePath,+ doodleDate,toggleCollapse,handleRecordingToggle,searchTranscripts,@@ -454,7 +456,7 @@ const Sidebar: React.FC = () => {return (<TooltipProvider><div className="flex flex-col items-center space-y-4 mt-4">- <Logo isCollapsed={isCollapsed} />+ <Logo isCollapsed={isCollapsed} doodlePath={doodlePath} doodleDate={doodleDate} /><Tooltip><TooltipTrigger asChild>diff --git a/frontend/tests/components/logo-doodle.test.tsx b/frontend/tests/components/logo-doodle.test.tsxnew file mode 100644index 00000000..3c9a08d8--- /dev/null+++ b/frontend/tests/components/logo-doodle.test.tsx@@ -0,0 +1,117 @@+import React from 'react';+import { afterAll, afterEach, expect, mock, setSystemTime, test } from 'bun:test';+import { act, create, type ReactTestRenderer } from 'react-test-renderer';++// Load originals before mocking, then load consumers after their native/UI boundaries are mocked.+const originals = await Promise.all([+ '@tauri-apps/api/core',+ '../../src/components/ui/dialog',+ '../../src/components/About',+ 'next/image',+ 'next/navigation',+ '../../src/contexts/RecordingStateContext',+ '../../src/lib/analytics',+].map(async path => [path, { ...await import(path) }] as const));+afterAll(() => { for (const [path, exports] of originals) mock.module(path, () => exports); });++let readDoodle = async (): Promise<string | null> => '/tmp/doodle.png';+const invoke = mock(async (command: string) => {+ if (command === 'doodle_sync') return readDoodle();+ if (command === 'api_get_meetings') return [];+ throw new Error(`Unexpected command: ${command}`);+});+mock.module('@tauri-apps/api/core', () => ({+ convertFileSrc: (path: string) => `asset://localhost${path}`,+ invoke,+}));+const Container = ({ children }: { children?: React.ReactNode }) => <div>{children}</div>;+mock.module('../../src/components/ui/dialog', () => ({+ Dialog: Container, DialogContent: Container, DialogTitle: Container, DialogTrigger: Container,+}));+mock.module('../../src/components/About', () => ({ About: () => null }));+mock.module('next/image', () => ({+ default: ({ priority, ...props }: React.ImgHTMLAttributes<HTMLImageElement> & { priority?: boolean }) => <img {...props} />,+}));+mock.module('next/navigation', () => ({ usePathname: () => '/', useRouter: () => ({}) }));+mock.module('../../src/contexts/RecordingStateContext', () => ({+ useRecordingState: () => ({ isRecording: false }),+}));+mock.module('../../src/lib/analytics', () => ({ default: { trackBackendConnection() {} } }));+const { default: Logo } = await import('../../src/components/Logo');+const { SidebarProvider, useSidebar } = await import('../../src/components/Sidebar/SidebarProvider');++function SidebarLogo() {+ const { doodlePath, doodleDate } = useSidebar();+ return <Logo isCollapsed doodlePath={doodlePath} doodleDate={doodleDate} />;+}++let renderer: ReactTestRenderer | undefined;+const originalDocument = Object.getOwnPropertyDescriptor(globalThis, 'document');+afterEach(async () => {+ if (renderer) await act(async () => renderer!.unmount());+ renderer = undefined;+ setSystemTime();+ if (originalDocument) Object.defineProperty(globalThis, 'document', originalDocument);+ else Reflect.deleteProperty(globalThis, 'document');+});++test('collapsed logo uses the bundled pencil without a doodle', async () => {+ await act(async () => { renderer = create(<Logo isCollapsed doodlePath={null} />); });+ expect(renderer!.root.findByType('img').props.src).toBe('/logo-collapsed.png');+ expect(JSON.stringify(renderer!.toJSON())).not.toContain('asset://');+});++test('collapsed logo shows the local doodle and falls back on image failure', async () => {+ await act(async () => { renderer = create(<Logo isCollapsed doodlePath="/tmp/doodle.png" doodleDate="2026-11-09" />); });+ const image = renderer!.root.findByType('img');+ expect(image.props.src).toMatch(/^asset:\/\/localhost\/tmp\/doodle\.png\?d=\d{4}-\d{2}-\d{2}$/);+ expect(image.props.alt).toBe('Meetily');+ await act(async () => image.props.onError());+ expect(renderer!.root.findByType('img').props.src).toBe('/logo-collapsed.png');+});++test('a new doodle path retries after an image failure', async () => {+ await act(async () => { renderer = create(<Logo isCollapsed doodlePath="/tmp/old-doodle.png" doodleDate="2026-11-09" />); });+ await act(async () => renderer!.root.findByType('img').props.onError());+ await act(async () => { renderer!.update(<Logo isCollapsed doodlePath="/tmp/new-doodle.png" doodleDate="2026-11-09" />); });+ expect(renderer!.root.findByType('img').props.src).toStartWith('asset://localhost/tmp/new-doodle.png?d=');+});++test('expanded logo keeps its text even when a doodle is available', async () => {+ await act(async () => { renderer = create(<Logo isCollapsed={false} doodlePath="/tmp/doodle.png" doodleDate="2026-11-09" />); });+ expect(renderer!.root.findAllByType('img')).toHaveLength(0);+ expect(renderer!.root.findByType('button').props['aria-label']).toBe('About Meetily');+ expect(renderer!.root.findByType('button').findByType('span').children).toEqual(['Meetily']);+});++for (const failedYesterday of [false, true]) {+ test(`next-day visibility refreshes the same path after sync completes (previous failure: ${failedYesterday})`, async () => {+ const page = Object.assign(new EventTarget(), { visibilityState: 'visible' });+ Object.defineProperty(globalThis, 'document', { configurable: true, value: page });+ setSystemTime(new Date('2026-11-09T12:00:00Z'));+ readDoodle = async () => '/tmp/doodle.png';+ invoke.mockClear();+ await act(async () => { renderer = create(<SidebarProvider><SidebarLogo /></SidebarProvider>); });+ expect(renderer!.root.findByType('img').props.src).toBe('asset://localhost/tmp/doodle.png?d=2026-11-09');+ if (failedYesterday) await act(async () => renderer!.root.findByType('img').props.onError());+ const previousSrc = renderer!.root.findByType('img').props.src;++ setSystemTime(new Date('2026-11-10T12:00:00Z'));+ page.visibilityState = 'hidden';+ await act(async () => { page.dispatchEvent(new Event('visibilitychange')); });+ expect(invoke.mock.calls.filter(([command]) => command === 'doodle_sync')).toHaveLength(1);+ const { promise, resolve: finishSync } = Promise.withResolvers<string | null>();+ readDoodle = () => promise;+ page.visibilityState = 'visible';+ await act(async () => { page.dispatchEvent(new Event('visibilitychange')); });+ expect(invoke.mock.calls.filter(([command]) => command === 'doodle_sync')).toHaveLength(2);+ expect(renderer!.root.findByType('img').props.src).toBe(previousSrc);+ await act(async () => { finishSync('/tmp/doodle.png'); });+ expect(renderer!.root.findByType('img').props.src).toBe('asset://localhost/tmp/doodle.png?d=2026-11-10');++ await act(async () => renderer!.unmount());+ renderer = undefined;+ page.dispatchEvent(new Event('visibilitychange'));+ expect(invoke.mock.calls.filter(([command]) => command === 'doodle_sync')).toHaveLength(2);+ });+}diff --git a/frontend/tests/hooks/meeting-details-refresh.test.tsx b/frontend/tests/hooks/meeting-details-refresh.test.tsxindex 7d31cc22..c5619f86 100644--- a/frontend/tests/hooks/meeting-details-refresh.test.tsx+++ b/frontend/tests/hooks/meeting-details-refresh.test.tsx@@ -45,6 +45,7 @@ const transcriptPage = {let savedSummary: SummaryProcessResponse;const invoke = mock(async (command: string, args?: Record<string, unknown>): Promise<unknown> => {if (command === 'api_get_meetings') return [];+ if (command === 'doodle_sync') return null;if (command === 'api_get_summary') return { ...savedSummary, meeting_id: args!.meetingId };if (command === 'api_get_meeting_metadata') return readMetadata(args!.meetingId as string);if (command === 'api_get_meeting_transcripts') return readTranscripts(args!.meetingId as string);@@ -80,7 +81,12 @@ const timers = new Map<number, () => Promise<void>>();let nextTimer = 0;const realSetInterval = globalThis.setInterval;const realClearInterval = globalThis.clearInterval;+const originalDocument = Object.getOwnPropertyDescriptor(globalThis, 'document');beforeEach(() => {+ Object.defineProperty(globalThis, 'document', {+ configurable: true,+ value: Object.assign(new EventTarget(), { visibilityState: 'visible' }),+ });selectedMeeting = 'meeting-a';readMetadata = async id => metadata(id);readTranscripts = async () => transcriptPage;@@ -96,6 +102,8 @@ afterEach(async () => {renderer = undefined;globalThis.setInterval = realSetInterval;globalThis.clearInterval = realClearInterval;+ if (originalDocument) Object.defineProperty(globalThis, 'document', originalDocument);+ else Reflect.deleteProperty(globalThis, 'document');});async function show() {await act(async () => {diff --git a/frontend/tests/hooks/summary-generation.test.tsx b/frontend/tests/hooks/summary-generation.test.tsxindex dd8c553f..24d9a64f 100644--- a/frontend/tests/hooks/summary-generation.test.tsx+++ b/frontend/tests/hooks/summary-generation.test.tsx@@ -27,6 +27,7 @@ let startProcess: () => Promise<{ process_id: string }>;let getSummary: (meetingId: string) => Promise<SummaryProcessResponse>;const invoke = mock(async (command: string, args?: Record<string, unknown>): Promise<unknown> => {if (command === 'api_get_meetings') return [];+ if (command === 'doodle_sync') return null;if (command === 'api_get_summary') return getSummary(args!.meetingId as string);if (command === 'api_get_meeting_transcripts') return { transcripts: [{ text: 'Meeting transcript', timestamp: '00:00' }], total_count: 1 };if (command === 'get_ollama_models') return [{ name: 'test' }];@@ -68,7 +69,12 @@ const timers = new Map<number, () => Promise<void>>();let nextTimer = 0;const realSetInterval = globalThis.setInterval;const realClearInterval = globalThis.clearInterval;+const originalDocument = Object.getOwnPropertyDescriptor(globalThis, 'document');beforeEach(() => {+ Object.defineProperty(globalThis, 'document', {+ configurable: true,+ value: Object.assign(new EventTarget(), { visibilityState: 'visible' }),+ });renderer = undefined as unknown as ReactTestRenderer;configuredModel = 'test';timers.clear(); notify.mockClear(); trackCompletion.mockClear(); invoke.mockClear();@@ -83,6 +89,8 @@ afterEach(async () => {if (renderer) await act(async () => renderer.unmount());globalThis.setInterval = realSetInterval;globalThis.clearInterval = realClearInterval;+ if (originalDocument) Object.defineProperty(globalThis, 'document', originalDocument);+ else Reflect.deleteProperty(globalThis, 'document');});async function show(initialSummary: SummaryProcessResponse | null, meetingId = 'meeting-a') {await act(async () => {