Skip to content

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

fix: re-enable native Live Text interaction (textSelection + dataDetectors)

Louis Beaumonte9c76934a29b
diff --git a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
index 7291b3f18..a9e099d0f 100644
--- a/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/current-frame-timeline.tsx
@@ -1102,8 +1102,8 @@ export const CurrentFrameTimeline: FC<CurrentFrameTimelineProps> = ({
)}
{/* Selectable text layer for web-based text selection (copy, highlight).
- Always shown — native overlay is non-interactive (prevents focus stealing). */}
- {!isLoading && !hasError && renderedImageInfo && textPositions.length > 0 && (
+ Hidden when native Live Text overlay is active (macOS 13+). */}
+ {!isLoading && !hasError && !nativeLiveTextActive && renderedImageInfo && textPositions.length > 0 && (
<div className="absolute" style={{ zIndex: 7, top: 0, left: 0, right: 0, bottom: 0, pointerEvents: "none" }}>
<div style={{
position: "absolute",
diff --git a/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift b/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift
index 39a7289a1..745f25467 100644
--- a/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift
+++ b/apps/screenpipe-app-tauri/src-tauri/swift/livetext_bridge.swift
@@ -102,10 +102,11 @@ public func ltInit(_ windowPtr: UInt64) -> Int32 {
// Swift 6 strict concurrency for @MainActor-isolated properties.
MainActor.assumeIsolated {
let overlay = ImageAnalysisOverlayView()
- // No interaction types — the overlay renders analysis visually but
- // doesn't steal focus or intercept events. Text selection is handled
- // by the web-based SelectableTextLayer in the WKWebView below.
- overlay.preferredInteractionTypes = []
+ // Start with text selection enabled — this is the whole point of the
+ // native overlay (Look Up, Translate, copy, data detectors).
+ // Focus stealing is managed by mainThreadPreservingFocus() and by
+ // hiding the overlay when the search modal is open.
+ overlay.preferredInteractionTypes = [.textSelection, .dataDetectors]
overlay.isHidden = true
overlay.frame = NSRect(x: 0, y: 0, width: 100, height: 100)
overlay.autoresizingMask = [] // we manage position manually
@@ -232,6 +233,7 @@ public func ltAnalyzeImage(
MainActor.assumeIsolated {
overlay.frame = NSRect(x: x, y: appKitY, width: w, height: h)
overlay.analysis = analysis
+ overlay.preferredInteractionTypes = [.textSelection, .dataDetectors]
overlay.isHidden = false
}
}
@@ -339,6 +341,7 @@ public func ltHide() -> Int32 {
guard let overlay = mgr.overlayView else { return -1 }
mainThreadPreservingFocus(mgr.hostContentView) {
MainActor.assumeIsolated {
+ overlay.preferredInteractionTypes = []
overlay.isHidden = true
overlay.analysis = nil
}