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(ui): platform-aware shortcuts and direct login from AI chat

louis030195082762ccf724
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsx
index 4f23126e4..0ef82afa2 100644
--- a/screenpipe-app-tauri/components/global-chat.tsx
+++ b/screenpipe-app-tauri/components/global-chat.tsx
@@ -10,7 +10,7 @@ import { Button } from "@/components/ui/button";
import { CustomDialogContent } from "@/components/rewind/custom-dialog-content";
import { useSettings } from "@/lib/hooks/use-settings";
import { cn } from "@/lib/utils";
-import { Loader2, Send, Square, Bot, User, X, Sparkles, Settings } from "lucide-react";
+import { Loader2, Send, Square, Bot, User, X, Sparkles, Settings, ExternalLink } from "lucide-react";
import { MemoizedReactMarkdown } from "@/components/markdown";
import { VideoComponent } from "@/components/rewind/video";
import { AIPresetsSelector } from "@/components/rewind/ai-presets-selector";
@@ -18,6 +18,8 @@ import { AIPreset } from "@/lib/utils/tauri";
import remarkGfm from "remark-gfm";
import OpenAI from "openai";
import { ChatCompletionTool } from "openai/resources/chat/completions";
+import { open as openUrl } from "@tauri-apps/plugin-shell";
+import { usePlatform } from "@/lib/hooks/use-platform";
const SCREENPIPE_API = "http://localhost:3030";
@@ -131,6 +133,7 @@ export function GlobalChat() {
const [open, setOpen] = useState(false);
const { settings } = useSettings();
const pathname = usePathname();
+ const { isMac } = usePlatform();
// Only show floating button on timeline page, but keep dialog available everywhere
// pathname can be null during initial hydration
@@ -569,7 +572,7 @@ export function GlobalChat() {
className="fixed bottom-4 right-4 z-50 flex items-center gap-1.5 px-2.5 py-1.5 rounded-full bg-background/80 backdrop-blur-sm border border-border/50 text-xs text-muted-foreground hover:text-foreground hover:bg-background transition-colors shadow-sm"
>
<Sparkles className="h-3 w-3" />
- <span>⌘L</span>
+ <span>{isMac ? "⌘L" : "Ctrl+L"}</span>
</button>
)}
<Dialog open={open} onOpenChange={setOpen}>
@@ -582,7 +585,7 @@ export function GlobalChat() {
<div className="flex items-center gap-2 p-3 pr-10 border-b">
<Sparkles className="h-5 w-5 text-primary" />
<span className="font-medium">Ask about your screen activity</span>
- <span className="text-xs text-muted-foreground ml-auto">⌘L to toggle</span>
+ <span className="text-xs text-muted-foreground ml-auto">{isMac ? "⌘L" : "Ctrl+L"} to toggle</span>
</div>
{/* Messages */}
@@ -591,10 +594,10 @@ export function GlobalChat() {
<div className="flex flex-col items-center justify-center py-12 space-y-4">
<div className={cn(
"p-4 rounded-full",
- needsLogin ? "bg-amber-500/10" : "bg-destructive/10"
+ needsLogin ? "bg-muted" : "bg-destructive/10"
)}>
{needsLogin ? (
- <Sparkles className="h-8 w-8 text-amber-500" />
+ <Sparkles className="h-8 w-8 text-muted-foreground" />
) : (
<Settings className="h-8 w-8 text-destructive" />
)}
@@ -607,6 +610,16 @@ export function GlobalChat() {
{disabledReason}
</p>
</div>
+ {needsLogin && (
+ <Button
+ variant="default"
+ onClick={() => openUrl("https://screenpi.pe/login")}
+ className="gap-2"
+ >
+ <ExternalLink className="h-4 w-4" />
+ Login
+ </Button>
+ )}
{!hasPresets && (
<Button
variant="outline"
diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsx
index d838e3697..404c20381 100644
--- a/screenpipe-app-tauri/components/onboarding/status.tsx
+++ b/screenpipe-app-tauri/components/onboarding/status.tsx
@@ -358,11 +358,11 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
{isStuck && (
<motion.div
- className="flex flex-col items-center space-y-4 mt-4 p-4 border border-yellow-500/30 bg-yellow-500/5 rounded-lg max-w-md"
+ className="flex flex-col items-center space-y-4 mt-4 p-4 border border-border bg-muted/50 rounded-lg max-w-md"
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
>
- <div className="flex items-center space-x-2 text-yellow-600 dark:text-yellow-500">
+ <div className="flex items-center space-x-2 text-muted-foreground">
<AlertTriangle className="w-4 h-4" />
<span className="font-mono text-sm">taking longer than expected</span>
</div>
@@ -486,11 +486,11 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({
{isStuck && (
<motion.div
- className="flex flex-col items-center space-y-4 mt-4 p-4 border border-yellow-500/30 bg-yellow-500/5 rounded-lg max-w-md"
+ className="flex flex-col items-center space-y-4 mt-4 p-4 border border-border bg-muted/50 rounded-lg max-w-md"
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
>
- <div className="flex items-center space-x-2 text-yellow-600 dark:text-yellow-500">
+ <div className="flex items-center space-x-2 text-muted-foreground">
<AlertTriangle className="w-4 h-4" />
<span className="font-mono text-sm">taking longer than expected</span>
</div>
diff --git a/screenpipe-app-tauri/components/rewind/search-command.tsx b/screenpipe-app-tauri/components/rewind/search-command.tsx
index 571f859f8..ec8fd846c 100644
--- a/screenpipe-app-tauri/components/rewind/search-command.tsx
+++ b/screenpipe-app-tauri/components/rewind/search-command.tsx
@@ -20,6 +20,7 @@ import { ArrowRight, XIcon, Search, Loader2 } from "lucide-react";
import { useQueryStates } from "nuqs";
import { commands } from "@/lib/utils/tauri";
import { Badge } from "./ui/badge";
+import { usePlatform } from "@/lib/hooks/use-platform";
const SCREENPIPE_API = "http://localhost:3030";
@@ -37,6 +38,7 @@ interface SearchResult {
export function SearchCommand() {
const [open, setOpen] = React.useState(false);
+ const { isMac } = usePlatform();
const [state] = useQueryStates(queryParser);
const [options, setOptions] = useState<QueryParser>(
@@ -234,7 +236,7 @@ export function SearchCommand() {
{/* Hint for AI chat */}
<div className="px-3 py-2 border-t text-xs text-muted-foreground flex items-center justify-between">
<span>Press Enter to search</span>
- <span>⌘L for AI chat</span>
+ <span>{isMac ? "⌘L" : "Ctrl+L"} for AI chat</span>
</div>
</CustomDialogContent>
</Dialog>
diff --git a/screenpipe-app-tauri/components/settings/account-section.tsx b/screenpipe-app-tauri/components/settings/account-section.tsx
index 6916f580b..ad7430f4c 100644
--- a/screenpipe-app-tauri/components/settings/account-section.tsx
+++ b/screenpipe-app-tauri/components/settings/account-section.tsx
@@ -216,12 +216,12 @@ export function AccountSection() {
<div className="space-y-2">
{settings.user?.token ? (
<p className="text-sm text-muted-foreground flex items-center gap-2">
- <span className="inline-flex h-2 w-2 rounded-full bg-green-500" />
+ <span className="inline-flex h-2 w-2 rounded-full bg-foreground" />
logged in as {settings.user.email}
</p>
) : (
<p className="text-sm text-muted-foreground flex items-center gap-2">
- <span className="inline-flex h-2 w-2 rounded-full bg-yellow-500" />
+ <span className="inline-flex h-2 w-2 rounded-full bg-muted-foreground" />
not logged in - some features will be limited
</p>
)}