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(pipes): replace anchor navigation with client-side tab switching (#3179)

Harsh Kumar674333df9a36
diff --git a/apps/screenpipe-app-tauri/components/pipe-store.tsx b/apps/screenpipe-app-tauri/components/pipe-store.tsx
index e6b947339..41dca9f05 100644
--- a/apps/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/apps/screenpipe-app-tauri/components/pipe-store.tsx
@@ -335,6 +335,15 @@ export function PipeStoreView() {
const [activeTab, setActiveTab] = useState<"discover" | "my-pipes">("my-pipes");
+ // listen for tab switch events from empty state button
+ useEffect(() => {
+ const handler = ((e: CustomEvent<{ tab: "discover" | "my-pipes" }>) => {
+ setActiveTab(e.detail.tab);
+ }) as EventListener;
+ window.addEventListener('switch-pipes-tab', handler);
+ return () => window.removeEventListener('switch-pipes-tab', handler);
+ }, []);
+
// Read ?tab= from URL after mount, then strip it so it doesn't persist
useEffect(() => {
const params = new URLSearchParams(window.location.search);
diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
index 4597872d5..7960ab3b5 100644
--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
@@ -1642,12 +1642,16 @@ export function PipesSection() {
<span><strong>focus assistant</strong> — notifies you when you get distracted</span>
</div>
</div>
- <a
- href="?section=pipes&tab=discover"
+ <button
+ onClick={() => {
+ window.dispatchEvent(new CustomEvent('switch-pipes-tab', {
+ detail: { tab: 'discover' }
+ }));
+ }}
className="inline-flex items-center gap-2 px-4 py-2 rounded-md bg-foreground text-background text-sm font-medium hover:bg-foreground/90 transition-colors"
>
browse the pipe store →
- </a>
+ </button>
</div>
) : pipeFilter === "team" ? (
<p>no pipes shared with team yet</p>