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(windows): open settings in separate window instead of navigating in overlay

louis0301952d70e95d70e0
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsx
index 7013f9108..3600cf11f 100644
--- a/screenpipe-app-tauri/components/global-chat.tsx
+++ b/screenpipe-app-tauri/components/global-chat.tsx
@@ -21,6 +21,7 @@ import { ChatCompletionTool } from "openai/resources/chat/completions";
import { open as openUrl } from "@tauri-apps/plugin-shell";
import { usePlatform } from "@/lib/hooks/use-platform";
import { useTimelineSelection } from "@/lib/hooks/use-timeline-selection";
+import { commands } from "@/lib/utils/tauri";
const SCREENPIPE_API = "http://localhost:3030";
@@ -646,9 +647,9 @@ Always use these exact start_time and end_time values when searching, unless the
{!hasPresets && (
<Button
variant="outline"
- onClick={() => {
+ onClick={async () => {
setOpen(false);
- window.location.href = "/settings";
+ await commands.showWindow({ Settings: { page: null } });
}}
className="gap-2"
>
diff --git a/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx b/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx
index cbb8199c6..1be8271c2 100644
--- a/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx
+++ b/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx
@@ -53,7 +53,7 @@ import {
} from "./ui/select";
import { Textarea } from "./ui/textarea";
import { Slider } from "./ui/slider";
-import { AIPreset } from "@/lib/utils/tauri";
+import { AIPreset, commands } from "@/lib/utils/tauri";
// Helper to detect UUID-like strings and format preset names nicely
const formatPresetName = (name: string): string => {
@@ -291,9 +291,9 @@ export function AIProviderConfig({
</p>
</div>
<Button
- onClick={() => {
- // Navigate to account settings
- window.location.href = "/settings?section=account";
+ onClick={async () => {
+ // Open settings window at account section
+ await commands.showWindow({ Settings: { page: "account" } });
}}
className="gap-2"
>
@@ -1039,8 +1039,8 @@ export const AIPresetsSelector = ({
variant="outline"
size="sm"
className="shrink-0 h-7 text-xs border-amber-500/30 hover:bg-amber-500/10"
- onClick={() => {
- window.location.href = "/settings?section=account";
+ onClick={async () => {
+ await commands.showWindow({ Settings: { page: "account" } });
}}
>
<LogIn className="h-3 w-3 mr-1" />