Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

refactor(desktop): downgrade routine auth and exclusion logs

Richie McIlroya0efb30b7dd4
diff --git a/apps/desktop/src-tauri/src/web_api.rs b/apps/desktop/src-tauri/src/web_api.rs
index e0e4ec6d2..a1bf685c4 100644
--- a/apps/desktop/src-tauri/src/web_api.rs
+++ b/apps/desktop/src-tauri/src/web_api.rs
@@ -1,7 +1,7 @@
use reqwest::StatusCode;
use tauri::{Emitter, Manager, Runtime};
use thiserror::Error;
-use tracing::{error, warn};
+use tracing::{debug, error, warn};
use crate::{
ArcLock,
@@ -127,7 +127,7 @@ impl<T: Manager<R> + Emitter<R>, R: Runtime> ManagerExt<R> for T {
) -> Result<reqwest::Response, AuthedApiError> {
let Some(auth) = AuthStore::get(self.app_handle()).map_err(AuthedApiError::AuthStore)?
else {
- warn!("Not logged in");
+ debug!("Skipping authenticated API request because user is not logged in");
return Err(AuthedApiError::InvalidAuthentication);
};
diff --git a/apps/desktop/src-tauri/src/window_exclusion.rs b/apps/desktop/src-tauri/src/window_exclusion.rs
index 73aeaf370..23ef1e373 100644
--- a/apps/desktop/src-tauri/src/window_exclusion.rs
+++ b/apps/desktop/src-tauri/src/window_exclusion.rs
@@ -144,12 +144,21 @@ pub fn append_matching_webview_window_ids(
continue;
};
if Window::from_id(&native_id).is_none() {
- warn!(
- window_id = %native_id,
- label = %label,
- title = %title,
- "Excluded Tauri webview window id is not visible to CGWindowList"
- );
+ if window.is_visible().unwrap_or(false) {
+ warn!(
+ window_id = %native_id,
+ label = %label,
+ title = %title,
+ "Excluded Tauri webview window id is not visible to CGWindowList"
+ );
+ } else {
+ debug!(
+ window_id = %native_id,
+ label = %label,
+ title = %title,
+ "Skipping hidden excluded Tauri webview window"
+ );
+ }
continue;
}
if ids.contains(&native_id) {