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
ui(browser-sidebar): clamp width + let chat shrink so panel can't overflow
Louis Beaumont35b89d07288f
diff --git a/apps/screenpipe-app-tauri/components/browser-sidebar.tsx b/apps/screenpipe-app-tauri/components/browser-sidebar.tsxindex 2e2e00e0e..228c441b7 100644--- a/apps/screenpipe-app-tauri/components/browser-sidebar.tsx+++ b/apps/screenpipe-app-tauri/components/browser-sidebar.tsx@@ -187,7 +187,10 @@ export function BrowserSidebar({ conversationId }: BrowserSidebarProps) {animate={{ width: 480, opacity: 1 }}exit={{ width: 0, opacity: 0 }}transition={{ duration: 0.2 }}- className="border-l border-border/50 bg-muted/30 flex flex-col overflow-hidden"+ // max-w-[40vw] clamps the panel on narrow windows so it can't push+ // the chat content off-screen. The placeholder's getBoundingClientRect+ // reflects the clamped width, so the native webview follows.+ className="border-l border-border/50 bg-muted/30 flex flex-col overflow-hidden shrink-0 max-w-[40vw]"><div className="flex items-center gap-2 px-3 h-10 border-b border-border/50 bg-background/60"><div className="flex-1 min-w-0 text-xs text-muted-foreground truncate">diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsxindex cd328e863..c5ced958e 100644--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx@@ -4400,7 +4400,12 @@ export function StandaloneChat({<divref={scrollContainerRef}onScroll={handleMessagesScroll}- className="relative flex-1 overflow-y-auto overflow-x-hidden"+ // min-w-0 lets this flex child shrink when the BrowserSidebar+ // opens. Without it, flex's default `min-width: auto` keeps the+ // chat content at content-width and the sidebar overflows past+ // the right edge of the window — the native webview faithfully+ // follows the placeholder rect off-screen.+ className="relative flex-1 min-w-0 overflow-y-auto overflow-x-hidden"onContextMenu={(e) => {if (messages.length === 0) return;e.preventDefault();diff --git a/apps/screenpipe-app-tauri/lib/utils/tauri.ts b/apps/screenpipe-app-tauri/lib/utils/tauri.tsindex e8cce5053..1303f3b07 100644--- a/apps/screenpipe-app-tauri/lib/utils/tauri.ts+++ b/apps/screenpipe-app-tauri/lib/utils/tauri.ts@@ -498,6 +498,14 @@ async enableKeychainEncryption() : Promise<Result<KeychainStatus, string>> {else return { status: "error", error: e as any };}},+async disableKeychainEncryption() : Promise<Result<KeychainStatus, string>> {+ try {+ return { status: "ok", data: await TAURI_INVOKE("disable_keychain_encryption") };+} catch (e) {+ if(e instanceof Error) throw e;+ else return { status: "error", error: e as any };+}+},async openSearchWindow(query: string | null) : Promise<Result<null, string>> {try {return { status: "ok", data: await TAURI_INVOKE("open_search_window", { query }) };@@ -538,6 +546,43 @@ async hideNotificationPanel() : Promise<Result<null, string>> {else return { status: "error", error: e as any };}},+/**+ * Open the viewer window for `path`. Reuses an existing window if one+ * for the same path is already open.+ */+async openViewerWindow(path: string) : Promise<Result<null, string>> {+ try {+ return { status: "ok", data: await TAURI_INVOKE("open_viewer_window", { path }) };+} catch (e) {+ if(e instanceof Error) throw e;+ else return { status: "error", error: e as any };+}+},+/**+ * Read a file for the viewer. Returns text for text-like files, a+ * base64 data URL for images. Files larger than `MAX_VIEWER_FILE_BYTES`+ * are truncated for text or refused for images, since both would blow+ * up the renderer.+ */+async readViewerFile(path: string) : Promise<Result<ViewerContent, string>> {+ try {+ return { status: "ok", data: await TAURI_INVOKE("read_viewer_file", { path }) };+} catch (e) {+ if(e instanceof Error) throw e;+ else return { status: "error", error: e as any };+}+},+/**+ * Reveal a file in the OS file browser (Finder / Explorer / etc).+ */+async revealInDefaultBrowser(path: string) : Promise<Result<null, string>> {+ try {+ return { status: "ok", data: await TAURI_INVOKE("reveal_in_default_browser", { path }) };+} catch (e) {+ if(e instanceof Error) throw e;+ else return { status: "error", error: e as any };+}+},/*** Register window-specific shortcuts (Escape, search shortcut) when main window is visible* These should only be active when the overlay is open to avoid blocking other apps@@ -1305,7 +1350,6 @@ export type PiCheckResult = { available: boolean; path: string | null }*/export type PiImageContent = { type: string; mimeType: string; data: string }export type PiInfo = { running: boolean; projectDir: string | null; pid: number | null; sessionId: string | null }-export type PiQueuedPrompt = { id: string; preview: string; queuedAtMs: number }/*** Configuration for which AI provider Pi should use*/@@ -1334,6 +1378,28 @@ maxTokens?: number;* Optional system prompt from AI preset (appended to Pi's built-in system prompt)*/systemPrompt?: string | null }+/**+ * A user prompt that's been enqueued but not yet written to Pi's stdin.+ * Surfaced to the UI so the chat can render "queued" cards while a prior+ * prompt is still streaming. Once the queue's drain loop pulls a prompt and+ * writes it to stdin, the entry is removed (it's now in-flight, not queued).+ */+export type PiQueuedPrompt = {+/**+ * Stable id assigned at enqueue time. Used to remove the entry on+ * dequeue / abort / write-failure.+ */+id: string;+/**+ * First ~200 chars of the user message — enough for the UI to show a+ * readable preview without round-tripping the full prompt over IPC.+ */+preview: string;+/**+ * Unix epoch milliseconds for "queued at" — drives the relative-time+ * label in the UI ("queued 4s ago").+ */+queuedAtMs: bigint }export type PipeSuggestionsSettings = { enabled: boolean; frequencyHours: number }/*** A single schedule rule: a day-of-week + time range + what to record.@@ -1680,6 +1746,13 @@ export type SyncDeviceInfo = { id: string; deviceId: string; deviceName: string*/export type SyncStatusResponse = { enabled: boolean; isSyncing: boolean; lastSync: string | null; lastError: string | null; storageUsed: bigint | null; storageLimit: bigint | null; deviceCount: number | null; deviceLimit: number | null; syncTier: string | null; machineId: string }export type User = { id: string | null; name: string | null; email: string | null; image: string | null; token: string | null; clerk_id: string | null; api_key: string | null; credits: Credits | null; stripe_connected: boolean | null; stripe_account_status: string | null; github_username: string | null; bio: string | null; website: string | null; contact: string | null; cloud_subscribed: boolean | null; credits_balance: number | null }+export type ViewerContent = { kind: "text"; text: string; name: string; path: string; truncated: boolean; total_bytes: bigint } | { kind: "image"; data_url: string; name: string; path: string } |+/**+ * Non-text, non-image file (random binary). The UI surfaces a+ * polite "open in default app" prompt instead of rendering bytes+ * as garbled text.+ */+{ kind: "binary"; name: string; path: string; total_bytes: bigint } | { kind: "error"; message: string; path: string }/*** Custom vocabulary entry for transcription biasing and word replacement.*/diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lockindex 641b95c78..911342584 100644--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock@@ -9726,7 +9726,7 @@ dependencies = [[[package]]name = "screenpipe-app"-version = "2.4.118"+version = "2.4.119"dependencies = ["anyhow","arboard",@@ -9879,7 +9879,6 @@ dependencies = ["symphonia","sysinfo","tokio",- "toml 0.8.2","tracing","vad-rs","webrtc-vad",