YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
chore(a11y): remove diagnostic logs now that line capture works
Louis Beaumont2d30f68a728c
diff --git a/crates/screenpipe-a11y/src/tree/macos.rs b/crates/screenpipe-a11y/src/tree/macos.rsindex c8ac44530..9d597a51a 100644--- a/crates/screenpipe-a11y/src/tree/macos.rs+++ b/crates/screenpipe-a11y/src/tree/macos.rs@@ -924,20 +924,10 @@ fn capture_lines_for_node(// Only spend IPC on visually-present text — off-screen scroll-buffer// content can't be highlighted by the user anyway (issue #2436's premise).if on_screen != Some(true) {- debug!(- "lines: skip (off-screen) text_chars={} on_screen={:?}",- text.chars().count(),- on_screen- );return None;}let bounds_ref = bounds.as_ref()?;if !super::node_looks_multiline(text, bounds_ref, state.line_min_height_ratio) {- debug!(- "lines: skip (single-line) text_chars={} aspect={:.2}",- text.chars().count(),- bounds_ref.width / bounds_ref.height.max(1e-6),- );return None;}@@ -947,19 +937,7 @@ fn capture_lines_for_node(let max_per_node = state.line_max_calls_per_node;let budget = state.line_budget.as_mut()?;- let calls_before = budget.calls_used();- let result = macos_lines::capture_line_spans(elem, text, &refs, budget, max_per_node);- let calls_after = budget.calls_used();- debug!(- "lines: capture text_chars={} calls={} result={}",- text.chars().count(),- calls_after - calls_before,- match &result {- Some(v) => format!("Some({} lines)", v.len()),- None => "None".to_string(),- }- );- result+ macos_lines::capture_line_spans(elem, text, &refs, budget, max_per_node)}/// Fill automation properties on an AccessibilityTreeNode from an AX element.diff --git a/crates/screenpipe-a11y/src/tree/macos_lines.rs b/crates/screenpipe-a11y/src/tree/macos_lines.rsindex e8dcabf6e..33be6478c 100644--- a/crates/screenpipe-a11y/src/tree/macos_lines.rs+++ b/crates/screenpipe-a11y/src/tree/macos_lines.rs@@ -308,22 +308,7 @@ pub(crate) fn capture_line_spans(if !budget.try_consume(1) {return None;}- let last_line_opt = line_for_index(elem, total_utf16 - 1);- {- // DIAGNOSTIC: log the first few AXLineForIndex results per process so- // we can see what browsers are actually returning. Once-only to avoid- // log spam on busy pages.- static LOGGED: AtomicBool = AtomicBool::new(false);- if !LOGGED.swap(true, Ordering::Relaxed) {- warn!(- "lines: probe — total_chars={} total_utf16={} AXLineForIndex(last)={:?}",- text.chars().count(),- total_utf16,- last_line_opt,- );- }- }- let last_line = last_line_opt?;+ let last_line = line_for_index(elem, total_utf16 - 1)?;if last_line <= 0 {return None;}