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

Bump app to v2.0.570

Louis Beaumont94cd0cdb21a3
diff --git a/apps/screenpipe-app-tauri/app/layout.tsx b/apps/screenpipe-app-tauri/app/layout.tsx
index 1c9864767..ca1c5c147 100644
--- a/apps/screenpipe-app-tauri/app/layout.tsx
+++ b/apps/screenpipe-app-tauri/app/layout.tsx
@@ -47,6 +47,33 @@ export default function RootLayout({
}
} catch {}
+ // Focus recovery for Tauri WKWebView (macOS)
+ // The webview can silently lose focus, making the entire UI unresponsive
+ // to keyboard and sometimes mouse input. Detect and recover by refocusing.
+ const handleWindowFocus = () => {
+ // When the native window regains focus, ensure the webview body is focused
+ // so keyboard events work. Small delay to let Tauri finish its focus cycle.
+ setTimeout(() => {
+ if (document.activeElement === document.body || !document.activeElement) {
+ document.body.focus();
+ }
+ }, 50);
+ };
+ window.addEventListener("focus", handleWindowFocus);
+
+ // Safety valve: triple-click on the app background to force-dismiss stuck overlays
+ // by blurring and refocusing — helps when overlays block normal interaction
+ const handlePointerRecovery = () => {
+ // If there are any fixed z-50 overlays that shouldn't be there,
+ // force focus back to body to recover keyboard input
+ if (document.activeElement === document.body || !document.activeElement) {
+ document.body.tabIndex = -1;
+ document.body.focus();
+ }
+ };
+ // Re-check focus on any click — if click reaches window, focus should work
+ window.addEventListener("mousedown", handlePointerRecovery, true);
+
// Auto-reload on IndexedDB disconnect (APP-2E, 27 users on v2.0.379)
// WKWebView's IndexedDB server can crash; the page becomes unusable.
// PostHog JS SDK uses IndexedDB for session replay — this is a known WebKit bug.
@@ -107,6 +134,8 @@ export default function RootLayout({
});
return () => {
+ window.removeEventListener("focus", handleWindowFocus);
+ window.removeEventListener("mousedown", handlePointerRecovery, true);
window.removeEventListener("unhandledrejection", handleUnhandledRejection);
};
}, []);
diff --git a/apps/screenpipe-app-tauri/app/settings/page.tsx b/apps/screenpipe-app-tauri/app/settings/page.tsx
index 1abe80fc5..e93891366 100644
--- a/apps/screenpipe-app-tauri/app/settings/page.tsx
+++ b/apps/screenpipe-app-tauri/app/settings/page.tsx
@@ -53,6 +53,7 @@ import { useSettings } from "@/lib/hooks/use-settings";
import { useTeam } from "@/lib/hooks/use-team";
import { open as openUrl } from "@tauri-apps/plugin-shell";
import { commands } from "@/lib/utils/tauri";
+import { toast } from "@/components/ui/use-toast";
import {
Tooltip,
TooltipContent,
@@ -681,6 +682,8 @@ function SettingsPageContent() {
function ReferralSection() {
const { settings } = useSettings();
const [copied, setCopied] = useState(false);
+ const [inviteEmail, setInviteEmail] = useState("");
+ const [sending, setSending] = useState(false);
const referralCode = settings.user?.id ? `REF-${settings.user.id.slice(0, 8).toUpperCase()}` : "";
const referralLink = referralCode ? `https://screenpi.pe/?ref=${referralCode}` : "";
@@ -691,6 +694,35 @@ function ReferralSection() {
setTimeout(() => setCopied(false), 2000);
};
+ const handleInvite = async () => {
+ if (!inviteEmail || !referralLink || sending) return;
+ setSending(true);
+ try {
+ const res = await fetch("https://screenpi.pe/api/referral/invite", {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${settings.user?.token}`,
+ },
+ body: JSON.stringify({
+ email: inviteEmail,
+ referralLink,
+ senderName: settings.user?.email,
+ }),
+ });
+ if (!res.ok) {
+ const data = await res.json().catch(() => ({}));
+ throw new Error(data.error || "failed to send invite");
+ }
+ setInviteEmail("");
+ toast({ title: "invite sent!" });
+ } catch (e: any) {
+ toast({ title: e.message || "failed to send invite", variant: "destructive" });
+ } finally {
+ setSending(false);
+ }
+ };
+
return (
<div className="space-y-6">
<div>
@@ -731,6 +763,27 @@ function ReferralSection() {
<p className="text-xs text-muted-foreground mt-2">
rewards auto-applied to your next subscription payment.
</p>
+
+ <div className="mt-4 pt-4 border-t border-border">
+ <h3 className="text-sm font-medium text-foreground mb-2">invite by email</h3>
+ <div className="flex gap-2">
+ <input
+ type="email"
+ placeholder="[email protected]"
+ value={inviteEmail}
+ onChange={(e) => setInviteEmail(e.target.value)}
+ onKeyDown={(e) => e.key === "Enter" && handleInvite()}
+ className="flex-1 px-3 py-2 text-xs border border-border bg-card text-foreground"
+ />
+ <button
+ onClick={handleInvite}
+ disabled={!inviteEmail || sending}
+ className="px-4 py-2 text-xs font-medium border border-border bg-background hover:bg-foreground hover:text-background transition-colors duration-150 disabled:opacity-50 disabled:pointer-events-none"
+ >
+ {sending ? "SENDING..." : "INVITE"}
+ </button>
+ </div>
+ </div>
</div>
) : (
<div className="border border-border p-4 bg-card">
diff --git a/apps/screenpipe-app-tauri/components/conversation-bubble.tsx b/apps/screenpipe-app-tauri/components/conversation-bubble.tsx
index e56ad8962..aa8cb1f11 100644
--- a/apps/screenpipe-app-tauri/components/conversation-bubble.tsx
+++ b/apps/screenpipe-app-tauri/components/conversation-bubble.tsx
@@ -21,21 +21,8 @@ function formatDuration(seconds: number): string {
return secs > 0 ? `${mins}m ${secs}s` : `${mins}m`;
}
-// Subtle left-border colors to visually distinguish speakers
-const SPEAKER_COLORS = [
- "border-l-blue-400/60",
- "border-l-emerald-400/60",
- "border-l-amber-400/60",
- "border-l-rose-400/60",
- "border-l-violet-400/60",
- "border-l-cyan-400/60",
- "border-l-orange-400/60",
- "border-l-pink-400/60",
-];
-
-function getSpeakerColorClass(speakerId?: number): string {
- if (speakerId == null) return SPEAKER_COLORS[0];
- return SPEAKER_COLORS[Math.abs(speakerId) % SPEAKER_COLORS.length];
+function getSpeakerColorClass(_speakerId?: number): string {
+ return "border-l-border";
}
export interface ConversationBubbleProps {
diff --git a/apps/screenpipe-app-tauri/components/rewind/search-modal.tsx b/apps/screenpipe-app-tauri/components/rewind/search-modal.tsx
index c55da5a18..a2bd5474b 100644
--- a/apps/screenpipe-app-tauri/components/rewind/search-modal.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/search-modal.tsx
@@ -806,7 +806,19 @@ export function SearchModal({ isOpen, onClose, onNavigateToTimestamp, embedded =
};
window.addEventListener("keydown", handleKeyDown);
- return () => window.removeEventListener("keydown", handleKeyDown);
+ // Also listen on document capture phase as safety net —
+ // if a focus trap or overlay swallows the window-level event,
+ // this still fires and prevents the modal from getting stuck
+ const captureEscape = (e: KeyboardEvent) => {
+ if (e.key === "Escape") {
+ onClose();
+ }
+ };
+ document.addEventListener("keydown", captureEscape, true);
+ return () => {
+ window.removeEventListener("keydown", handleKeyDown);
+ document.removeEventListener("keydown", captureEscape, true);
+ };
}, [isOpen, filteredResults, selectedIndex, selectedSpeaker, speakerTranscriptions, selectedTranscriptionIndex, onClose, onNavigateToTimestamp, handleSelectResult, handleSendToAI, handleBackFromSpeaker]);
// Scroll selected item into view
diff --git a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
index b311e47ab..e55bebe7f 100644
--- a/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
+++ b/apps/screenpipe-app-tauri/components/rewind/timeline/timeline.tsx
@@ -962,7 +962,7 @@ export const TimelineSlider = ({
{/* Vertical stacked icons - favicons for browser groups, app icons otherwise */}
{groupWidth > 30 && (
<motion.div
- className="absolute top-1 left-1/2 -translate-x-1/2 z-10 flex flex-col cursor-pointer p-1.5"
+ className="absolute top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center cursor-pointer p-1"
style={{
direction: 'ltr',
pointerEvents: 'auto',
@@ -984,7 +984,7 @@ export const TimelineSlider = ({
group.topDomains.slice(0, groupWidth > 60 ? 2 : 1).map((domain, idx) => (
<motion.div
key={`fav-${domain}-${idx}`}
- className="w-8 h-8 rounded flex-shrink-0 overflow-hidden flex items-center justify-center"
+ className="w-5 h-5 rounded-md flex-shrink-0 overflow-hidden flex items-center justify-center"
style={{
zIndex: 10 - idx,
position: 'relative',
@@ -992,12 +992,12 @@ export const TimelineSlider = ({
}}
variants={{
collapsed: {
- marginTop: idx === 0 ? 0 : -10,
+ marginTop: idx === 0 ? 0 : -6,
scale: 1
},
expanded: {
- marginTop: idx === 0 ? 0 : 4,
- scale: 1.1
+ marginTop: idx === 0 ? 0 : 3,
+ scale: 1.15
}
}}
transition={{ type: "spring", stiffness: 400, damping: 25 }}
@@ -1005,8 +1005,8 @@ export const TimelineSlider = ({
<FaviconImg
domain={domain}
fallbackAppName={group.appName}
- size={32}
- className="w-full h-full rounded-sm object-contain"
+ size={20}
+ className="w-full h-full rounded-sm object-cover"
/>
</motion.div>
))
@@ -1015,7 +1015,7 @@ export const TimelineSlider = ({
group.appNames.slice(0, 2).map((appName, idx) => (
<motion.div
key={`${appName}-${idx}`}
- className="w-8 h-8 rounded flex-shrink-0 overflow-hidden flex items-center justify-center"
+ className="w-5 h-5 rounded-md flex-shrink-0 overflow-hidden flex items-center justify-center"
style={{
zIndex: 10 - idx,
position: 'relative',
@@ -1023,19 +1023,19 @@ export const TimelineSlider = ({
}}
variants={{
collapsed: {
- marginTop: idx === 0 ? 0 : -10,
+ marginTop: idx === 0 ? 0 : -6,
scale: 1
},
expanded: {
- marginTop: idx === 0 ? 0 : 4,
- scale: 1.1
+ marginTop: idx === 0 ? 0 : 3,
+ scale: 1.15
}
}}
transition={{ type: "spring", stiffness: 400, damping: 25 }}
>
<CachedAppIcon appName={appName} />
<span
- className="absolute inset-0 flex items-center justify-center text-[10px] font-bold text-white/90 pointer-events-none"
+ className="absolute inset-0 flex items-center justify-center text-[8px] font-bold text-white/90 pointer-events-none"
style={{ zIndex: -1 }}
>
{appName.charAt(0).toUpperCase()}
diff --git a/apps/screenpipe-app-tauri/components/settings/billing-section.tsx b/apps/screenpipe-app-tauri/components/settings/billing-section.tsx
index 025568d7e..f79005b71 100644
--- a/apps/screenpipe-app-tauri/components/settings/billing-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/billing-section.tsx
@@ -46,14 +46,11 @@ function formatCardBrand(brand: string): string {
return brands[brand] ?? brand;
}
-function getUsageLabel(ratio: number): {
- label: string;
- color: string;
-} {
- if (ratio >= 1) return { label: "using paid overage", color: "text-red-500" };
- if (ratio >= 0.8) return { label: "heavy usage", color: "text-orange-500" };
- if (ratio >= 0.5) return { label: "moderate usage", color: "text-yellow-500" };
- return { label: "low usage", color: "text-green-500" };
+function getUsageLabel(ratio: number): string {
+ if (ratio >= 1) return "using paid overage";
+ if (ratio >= 0.8) return "heavy usage";
+ if (ratio >= 0.5) return "moderate usage";
+ return "low usage";
}
function formatResetTime(isoString: string): string {
@@ -84,9 +81,9 @@ export function BillingSection() {
[token]
);
- const fetchData = useCallback(async () => {
+ const fetchData = useCallback(async (silent = false) => {
if (!token) return;
- setLoading(true);
+ if (!silent) setLoading(true);
setError(null);
try {
const [usageRes, billingRes] = await Promise.all([
@@ -119,6 +116,9 @@ export function BillingSection() {
useEffect(() => {
fetchData();
+ // Refresh usage every 30s so the progress bar stays current
+ const interval = setInterval(() => fetchData(true), 30_000);
+ return () => clearInterval(interval);
}, [fetchData]);
const handleSaveAutoReload = async () => {
@@ -208,7 +208,7 @@ export function BillingSection() {
</div>
<Card className="p-6 text-center">
<p className="text-sm text-muted-foreground mb-4">{error}</p>
- <Button variant="outline" size="sm" onClick={fetchData}>
+ <Button variant="outline" size="sm" onClick={() => fetchData()}>
<RefreshCw className="w-3.5 h-3.5 mr-1.5" />
retry
</Button>
@@ -223,8 +223,9 @@ export function BillingSection() {
: 0
: 0;
const progressValue = Math.min(usageRatio * 100, 100);
- const { label: usageLabel, color: usageColor } = getUsageLabel(usageRatio);
- const tierLabel = usage?.tier === "pro" ? "pro" : "free";
+ const usageLabel = getUsageLabel(usageRatio);
+ const tierLabel =
+ usage?.tier === "pro" || settings.user?.cloud_subscribed ? "pro" : "free";
return (
<div className="space-y-6">
@@ -278,7 +279,7 @@ export function BillingSection() {
<h3 className="text-sm font-semibold text-foreground">
daily usage
</h3>
- <span className={`text-xs font-medium ${usageColor}`}>
+ <span className="text-xs font-medium text-muted-foreground">
{usageLabel}
</span>
</div>
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
index b886fba03..ea68b61c2 100644
--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -678,6 +678,8 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
// Ref to sendMessage so useEffect callbacks can call it without stale closures
const sendMessageRef = useRef<(msg: string) => Promise<void>>();
+ // Bypass guard for auto-send from chat-prefill (Pi confirmed running but React state stale)
+ const autoSendBypassRef = useRef(false);
// Chat history state
const [conversationId, setConversationId] = useState<string | null>(null);
@@ -1081,10 +1083,16 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
};
const ready = piInfo?.running || await waitForPi(10000);
if (ready) {
- // Give React a tick to re-render with updated piInfo so sendMessage's canChat is true
- setTimeout(() => {
- sendMessageRef.current?.(fullMessage);
- }, 300);
+ // Signal that the next sendPiMessage call should bypass the piInfo guard
+ // (we just confirmed Pi is running via waitForPi but React state may be stale)
+ autoSendBypassRef.current = true;
+ // Give React a tick to re-render with updated piInfo
+ await new Promise(r => setTimeout(r, 200));
+ if (sendMessageRef.current) {
+ await sendMessageRef.current(fullMessage);
+ setInput("");
+ }
+ autoSendBypassRef.current = false;
}
})();
return;
@@ -2062,7 +2070,7 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
// Send message using Pi agent
async function sendPiMessage(userMessage: string, displayLabel?: string) {
- if (!piInfo?.running) {
+ if (!piInfo?.running && !autoSendBypassRef.current) {
toast({ title: "Pi not running", description: "Please wait for Pi to start", variant: "destructive" });
return;
}
@@ -2312,7 +2320,7 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
}
async function sendMessage(userMessage: string, displayLabel?: string) {
- if (!canChat || !activePreset) return;
+ if ((!canChat && !autoSendBypassRef.current) || !activePreset) return;
// All providers route through Pi agent
return sendPiMessage(userMessage, displayLabel);
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index b2c7e0f0b..5d3761a4a 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8098,7 +8098,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.568"
+version = "2.0.569"
dependencies = [
"anyhow",
"arboard",
@@ -8193,7 +8193,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"anyhow",
"bytemuck",
@@ -8244,7 +8244,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -8285,7 +8285,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"anyhow",
"chrono",
@@ -8310,7 +8310,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"anyhow",
"chrono",
@@ -8326,7 +8326,7 @@ dependencies = [
[[package]]
name = "screenpipe-integrations"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"anyhow",
"chrono",
@@ -8346,7 +8346,7 @@ dependencies = [
[[package]]
name = "screenpipe-server"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"anyhow",
"async-trait",
@@ -8401,7 +8401,7 @@ dependencies = [
[[package]]
name = "screenpipe-vision"
-version = "0.3.157"
+version = "0.3.158"
dependencies = [
"accessibility-sys",
"anyhow",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
index 966ea0a19..7072fd1cd 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.0.569"
+version = "2.0.570"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs b/apps/screenpipe-app-tauri/src-tauri/src/tray.rs
index fa8479375..1b88dfc6b 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/tray.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/tray.rs
@@ -378,8 +378,13 @@ fn create_dynamic_menu(
// Help and quit
menu_builder = menu_builder
- .item(&PredefinedMenuItem::separator(app)?)
- .item(&MenuItemBuilder::with_id("check_permissions", "Check permissions").build(app)?)
+ .item(&PredefinedMenuItem::separator(app)?);
+ #[cfg(target_os = "macos")]
+ {
+ menu_builder = menu_builder
+ .item(&MenuItemBuilder::with_id("check_permissions", "Check permissions").build(app)?);
+ }
+ menu_builder = menu_builder
.item(&MenuItemBuilder::with_id("feedback", "Send feedback").build(app)?)
.item(&MenuItemBuilder::with_id("book_call", "Book a call with founder").build(app)?)
.item(&MenuItemBuilder::with_id("onboarding", "Onboarding").build(app)?)