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

refactor(settings): remove team config-sharing UI

Louis Beaumontb786e20e3340
diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
index 2b5008ae9..d29ebc904 100644
--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx
@@ -20,7 +20,6 @@ import {
Loader2,
ExternalLink,
Check,
- Users,
MoreHorizontal,
Plus,
Search,
@@ -74,7 +73,6 @@ import {
} from "@/components/ui/dropdown-menu";
import { useSettings } from "@/lib/hooks/use-settings";
import { AIPresetsSelector } from "@/components/rewind/ai-presets-selector";
-import { useTeam } from "@/lib/hooks/use-team";
import { useToast } from "@/components/ui/use-toast";
import { useQueryState } from "nuqs";
import { HelpTooltip } from "@/components/ui/help-tooltip";
@@ -747,19 +745,10 @@ export function PipesSection() {
// Track in-flight config saves so runPipe can await them
const pendingConfigSaves = useRef<Record<string, Promise<void>>>({});
const { settings, updateSettings } = useSettings();
- const team = useTeam();
const { toast } = useToast();
const [, setSection] = useQueryState("section");
- const isTeamAdmin = !!team.team && team.role === "admin";
- const [sharingPipe, setSharingPipe] = useState<string | null>(null);
const [sharingPublic, setSharingPublic] = useState<string | null>(null);
const [publishPipeName, setPublishPipeName] = useState<string | null>(null);
- const [pipeFilter, setPipeFilter] = useState<"all" | "personal" | "team">(() => {
- if (typeof window !== "undefined") {
- return (localStorage.getItem("pipes-pipe-filter") as "all" | "personal" | "team") || "all";
- }
- return "all";
- });
const [searchQuery, setSearchQuery] = useState("");
const [pipeTypeFilter, setPipeTypeFilter] = useState<"scheduled" | "triggered" | "manual">("scheduled");
// Favorites — per-machine preference persisted via /pipes/favorites.
@@ -778,16 +767,6 @@ export function PipesSection() {
// Live streaming output for running executions: key = "pipeName:executionId"
const [liveOutput, setLiveOutput] = useState<Record<string, string[]>>({});
const liveOutputRef = useRef<Record<string, string[]>>({});
- const sharedPipeNames = React.useMemo(
- () =>
- new Set(
- team.configs
- .filter((c) => c.config_type === "pipe" && c.scope === "team")
- .map((c) => c.key)
- ),
- [team.configs]
- );
-
const isTriggeredPipe = (p: PipeStatus) =>
!!(p.config.trigger?.events?.length) ||
!!(p.config.trigger?.custom?.length);
@@ -800,9 +779,6 @@ export function PipesSection() {
() =>
pipes
.filter((p) => {
- if (pipeFilter === "team" && !sharedPipeNames.has(p.config.name)) return false;
- if (pipeFilter === "personal" && sharedPipeNames.has(p.config.name)) return false;
-
if (searchQuery) {
const q = searchQuery.toLowerCase();
if (!p.config.name.toLowerCase().includes(q)) return false;
@@ -835,44 +811,18 @@ export function PipesSection() {
return 0;
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
- [pipes, pipeFilter, searchQuery, pipeTypeFilter, pipeFavorites.showOnly, pipeFavorites.isFavorite, pipeExecutions, sharedPipeNames]
+ [pipes, searchQuery, pipeTypeFilter, pipeFavorites.showOnly, pipeFavorites.isFavorite, pipeExecutions]
);
// Counts for sub-tab badges — memoized so the filter doesn't re-run on every render
const tabCounts = React.useMemo(() => {
- const base = pipes.filter((p) => {
- if (pipeFilter === "team" && !sharedPipeNames.has(p.config.name)) return false;
- if (pipeFilter === "personal" && sharedPipeNames.has(p.config.name)) return false;
- return true;
- });
return {
- scheduled: base.filter(isScheduledPipe).length,
- triggered: base.filter(isTriggeredPipe).length,
- manual: base.filter(isManualPipe).length,
+ scheduled: pipes.filter(isScheduledPipe).length,
+ triggered: pipes.filter(isTriggeredPipe).length,
+ manual: pipes.filter(isManualPipe).length,
};
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, [pipes, pipeFilter, sharedPipeNames]);
-
- // Counts for filter chips
-
- const sharePipeToTeam = async (pipe: PipeStatus) => {
- setSharingPipe(pipe.config.name);
- try {
- await team.pushConfig("pipe", pipe.config.name, {
- name: pipe.config.name,
- raw_content: pipe.raw_content,
- config: pipe.config,
- });
- posthog.capture("team_config_pushed", { config_type: "pipe", pipe_name: pipe.config.name });
- toast({
- title: sharedPipeNames.has(pipe.config.name) ? "updated team pipe" : "shared to team",
- });
- } catch (err: any) {
- toast({ title: "failed to share to team", description: err.message, variant: "destructive" });
- } finally {
- setSharingPipe(null);
- }
- };
+ }, [pipes]);
const sharePipePublic = async (pipe: PipeStatus) => {
setSharingPublic(pipe.config.name);
@@ -1498,32 +1448,6 @@ export function PipesSection() {
</Button>
</div>
- {/* Team filter — only when there are actually team-shared pipes */}
- {team.team && sharedPipeNames.size > 0 && (
- <div className="flex items-center gap-4 border-b border-border">
- {(["all", "personal", "team"] as const).map((tab) => {
- const label = tab === "all" ? "all" : tab === "personal" ? "personal" : "shared with team";
- const count = tab === "all" ? pipes.length : tab === "team"
- ? pipes.filter((p) => sharedPipeNames.has(p.config.name)).length
- : pipes.filter((p) => !sharedPipeNames.has(p.config.name)).length;
- return (
- <button
- key={tab}
- onClick={() => { setPipeFilter(tab); localStorage.setItem("pipes-pipe-filter", tab); }}
- className={cn(
- "pb-2 text-sm transition-colors duration-150 border-b-2 -mb-px",
- pipeFilter === tab
- ? "border-foreground text-foreground font-medium"
- : "border-transparent text-muted-foreground hover:text-foreground"
- )}
- >
- {label} ({count})
- </button>
- );
- })}
- </div>
- )}
-
{loading ? (
<div className="space-y-2">
{[1, 2, 3].map((i) => (
@@ -1578,7 +1502,7 @@ export function PipesSection() {
{" "}in their frontmatter
</p>
</>
- ) : pipeFilter === "all" ? (
+ ) : (
<div className="space-y-4">
<div>
<p className="text-foreground font-medium text-base">no pipes installed yet</p>
@@ -1611,10 +1535,6 @@ export function PipesSection() {
browse the pipe store →
</button>
</div>
- ) : pipeFilter === "team" ? (
- <p>no pipes shared with team yet</p>
- ) : (
- <p>no personal-only pipes</p>
)}
</CardContent>
</Card>
@@ -1861,21 +1781,6 @@ export function PipesSection() {
)}
copy share link
</DropdownMenuItem>
- {isTeamAdmin && (
- <>
- <DropdownMenuItem
- disabled={sharingPipe === pipe.config.name}
- onClick={() => sharePipeToTeam(pipe)}
- >
- {sharedPipeNames.has(pipe.config.name) ? (
- <Check className="h-3.5 w-3.5 mr-2" />
- ) : (
- <Users className="h-3.5 w-3.5 mr-2" />
- )}
- {sharedPipeNames.has(pipe.config.name) ? "update team copy" : "share to team"}
- </DropdownMenuItem>
- </>
- )}
{(pipe.source_slug || (pipe.config as any).config?.source_slug) && (
<DropdownMenuItem
onClick={() => {
diff --git a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx
index 0cb4f9308..317281df6 100644
--- a/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/privacy-section.tsx
@@ -11,7 +11,6 @@ import {
Globe,
Shield,
Monitor,
- Users,
Loader2,
AlertCircle,
RefreshCw,
@@ -27,13 +26,11 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Switch } from "@/components/ui/switch";
-import { Badge } from "@/components/ui/badge";
import { HelpTooltip } from "@/components/ui/help-tooltip";
import { MultiSelect } from "@/components/ui/multi-select";
import { WindowPicker } from "./window-picker";
import { useSettings, Settings } from "@/lib/hooks/use-settings";
import { ScheduleSettings } from "./schedule-settings";
-import { useTeam } from "@/lib/hooks/use-team";
import { useIsEnterpriseBuild } from "@/lib/hooks/use-is-enterprise-build";
import { open as openUrl } from "@tauri-apps/plugin-shell";
import { useToast } from "@/components/ui/use-toast";
@@ -253,16 +250,12 @@ function EncryptDataCard({
export function PrivacySection() {
const { settings, updateSettings } = useSettings();
- const team = useTeam();
- const isTeamAdmin = !!team.team && team.role === "admin";
const isEnterprise = useIsEnterpriseBuild();
const { toast } = useToast();
const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);
const [isUpdating, setIsUpdating] = useState(false);
const [validationErrors, setValidationErrors] = useState<Record<string, string>>({});
- const [filterView, setFilterView] = useState<"all" | "personal" | "team">("all");
- const [pushingFilter, setPushingFilter] = useState<string | null>(null);
const [picker, setPicker] = useState<"ignored" | "included" | null>(null);
const [liveApiKey, setLiveApiKey] = useState<string | null>(null);
@@ -521,49 +514,6 @@ export function PrivacySection() {
handleSettingsChange({ analyticsEnabled: checked }, true);
};
- const handlePushFilterToTeam = async (
- configType: string,
- key: string,
- filters: string[]
- ) => {
- setPushingFilter(key);
- try {
- await team.pushConfig(configType, key, { filters });
- toast({ title: "pushed to team" });
- } catch (err: any) {
- toast({
- title: "failed to push to team",
- description: err.message,
- variant: "destructive",
- });
- } finally {
- setPushingFilter(null);
- }
- };
-
- const handleRemoveTeamFilter = async (
- configType: string,
- key: string,
- filterToRemove: string
- ) => {
- const config = team.configs?.find(
- (c) => c.config_type === configType && c.key === key && c.scope === "team"
- );
- if (!config) return;
- const currentFilters: string[] = (config.value as any)?.filters ?? [];
- const newFilters = currentFilters.filter((f) => f !== filterToRemove);
- try {
- await team.pushConfig(configType, key, { filters: newFilters });
- toast({ title: "team filter removed" });
- } catch (err: any) {
- toast({
- title: "failed to remove team filter",
- description: err.message,
- variant: "destructive",
- });
- }
- };
-
// Add one pattern from the WindowPicker. Reuses the MultiSelect change
// handler so the mutual-exclusion logic (a pattern in ignore is removed
// from include and vice versa) stays in one place.
@@ -1191,544 +1141,108 @@ export function PrivacySection() {
Content filters
</h2>
- {/* All | Personal | Shared with team tabs */}
- {team.team &&
- (() => {
- const teamIgnored = new Set(
- settings.teamFilters?.ignoredWindows ?? []
- );
- const teamIncluded = new Set(
- settings.teamFilters?.includedWindows ?? []
- );
- const teamUrls = new Set(
- settings.teamFilters?.ignoredUrls ?? []
- );
- const personalOnlyCount =
- settings.ignoredWindows.filter((w) => !teamIgnored.has(w))
- .length +
- settings.includedWindows.filter((w) => !teamIncluded.has(w))
- .length +
- (settings.ignoredUrls || []).filter((u) => !teamUrls.has(u))
- .length;
- const teamOnlyCount =
- teamIgnored.size + teamIncluded.size + teamUrls.size;
- const allCount = personalOnlyCount + teamOnlyCount;
- return (
- <div className="flex items-center gap-4 border-b border-border">
- {(["all", "personal", "team"] as const).map((tab) => {
- const count =
- tab === "all"
- ? allCount
- : tab === "personal"
- ? personalOnlyCount
- : teamOnlyCount;
- const label =
- tab === "all"
- ? "All"
- : tab === "personal"
- ? "Personal"
- : "Shared with team";
- return (
- <button
- key={tab}
- onClick={() => setFilterView(tab)}
- className={cn(
- "pb-2 text-sm transition-colors duration-150 border-b-2 -mb-px",
- filterView === tab
- ? "border-foreground text-foreground font-medium"
- : "border-transparent text-muted-foreground hover:text-foreground"
- )}
- >
- {label} ({count})
- </button>
- );
- })}
- </div>
- );
- })()}
-
- {/* Personal filters (shown in "all" and "personal" views) */}
- {filterView !== "team" && (
- <>
- <Card className="border-border bg-card">
- <CardContent className="px-3 py-2.5">
- <div className="flex items-center space-x-2.5 mb-2">
- <EyeOff className="h-4 w-4 text-muted-foreground shrink-0" />
- <div className="flex items-center gap-1.5 flex-1 min-w-0">
- <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
- Ignored Apps
- <HelpTooltip text="Skip captures for these patterns. Plain text (e.g. '1Password') matches the app or any window title that contains it. Use 'App::Title' to scope to one window of an app (e.g. 'Slack::#hr' blocks only #hr in Slack)." />
- </h3>
- {isTeamAdmin && (
- <Button
- variant="outline"
- size="sm"
- className="h-6 text-[10px] ml-auto cursor-pointer"
- disabled={pushingFilter === "ignored_windows"}
- onClick={() =>
- handlePushFilterToTeam(
- "window_filter",
- "ignored_windows",
- settings.ignoredWindows
- )
- }
- >
- {pushingFilter === "ignored_windows" ? (
- <Loader2 className="h-3 w-3 mr-1 animate-spin" />
- ) : (
- <Users className="h-3 w-3 mr-1" />
- )}
- push to team
- </Button>
- )}
- </div>
- </div>
- <div className="ml-[26px]">
- <MultiSelect
- options={createWindowOptions(
- windowItems || [],
- settings.ignoredWindows
- )}
- defaultValue={settings.ignoredWindows}
- value={settings.ignoredWindows}
- onValueChange={handleIgnoredWindowsChange}
- placeholder="Select apps to ignore..."
- allowCustomValues
- />
- <Button
- variant="outline"
- size="sm"
- className="h-7 text-[11px] mt-1.5 gap-1.5"
- onClick={() => setPicker("ignored")}
- >
- <FolderTree className="h-3 w-3" /> browse apps & windows
- </Button>
- {filterView === "all" &&
- (settings.teamFilters?.ignoredWindows?.length ?? 0) > 0 && (
- <div className="flex flex-wrap gap-1 mt-1">
- {settings.teamFilters!.ignoredWindows.map((w) => (
- <Badge
- key={w}
- variant="outline"
- className="text-[10px] h-5 gap-0.5"
- >
- <Users className="h-2.5 w-2.5 mr-0.5" />
- {w}
- {isTeamAdmin && (
- <button
- onClick={() =>
- handleRemoveTeamFilter(
- "window_filter",
- "ignored_windows",
- w
- )
- }
- className="ml-0.5 hover:text-destructive"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="10"
- height="10"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 6 6 18" />
- <path d="m6 6 12 12" />
- </svg>
- </button>
- )}
- </Badge>
- ))}
- </div>
- )}
- </div>
- </CardContent>
- </Card>
-
- <Card className="border-border bg-card">
- <CardContent className="px-3 py-2.5">
- <div className="flex items-center space-x-2.5 mb-2">
- <Eye className="h-4 w-4 text-muted-foreground shrink-0" />
- <div className="flex items-center gap-1.5 flex-1 min-w-0">
- <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
- Included Apps
- <HelpTooltip text="When set, only matching windows are captured. Plain text is a global include (e.g. 'Slack' = only Slack). 'App::Title' creates a per-app whitelist (e.g. 'Slack::#engineering' keeps only that channel in Slack; other apps stay unaffected)." />
- </h3>
- {isTeamAdmin && (
- <Button
- variant="outline"
- size="sm"
- className="h-6 text-[10px] ml-auto cursor-pointer"
- disabled={pushingFilter === "included_windows"}
- onClick={() =>
- handlePushFilterToTeam(
- "window_filter",
- "included_windows",
- settings.includedWindows
- )
- }
- >
- {pushingFilter === "included_windows" ? (
- <Loader2 className="h-3 w-3 mr-1 animate-spin" />
- ) : (
- <Users className="h-3 w-3 mr-1" />
- )}
- push to team
- </Button>
- )}
- </div>
- </div>
- <div className="ml-[26px]">
- <MultiSelect
- options={createWindowOptions(
- windowItems || [],
- settings.includedWindows
- )}
- defaultValue={settings.includedWindows}
- value={settings.includedWindows}
- onValueChange={handleIncludedWindowsChange}
- placeholder="Only capture these apps (optional)..."
- allowCustomValues
- />
- <Button
- variant="outline"
- size="sm"
- className="h-7 text-[11px] mt-1.5 gap-1.5"
- onClick={() => setPicker("included")}
- >
- <FolderTree className="h-3 w-3" /> browse apps & windows
- </Button>
- {filterView === "all" &&
- (settings.teamFilters?.includedWindows?.length ?? 0) >
- 0 && (
- <div className="flex flex-wrap gap-1 mt-1">
- {settings.teamFilters!.includedWindows.map((w) => (
- <Badge
- key={w}
- variant="outline"
- className="text-[10px] h-5 gap-0.5"
- >
- <Users className="h-2.5 w-2.5 mr-0.5" />
- {w}
- {isTeamAdmin && (
- <button
- onClick={() =>
- handleRemoveTeamFilter(
- "window_filter",
- "included_windows",
- w
- )
- }
- className="ml-0.5 hover:text-destructive"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="10"
- height="10"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 6 6 18" />
- <path d="m6 6 12 12" />
- </svg>
- </button>
- )}
- </Badge>
- ))}
- </div>
- )}
- </div>
- </CardContent>
- </Card>
-
- <Card className="border-border bg-card">
- <CardContent className="px-3 py-2.5">
- <div className="flex items-center space-x-2.5 mb-2">
- <Globe className="h-4 w-4 text-muted-foreground shrink-0" />
- <div className="flex items-center gap-1.5 flex-1 min-w-0">
- <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
- Ignored URLs
- <HelpTooltip text="Browser URLs matching these patterns will not be captured. Use for privacy — e.g. add 'bank.com' to skip banking sites." />
- </h3>
- {isTeamAdmin && (
- <Button
- variant="outline"
- size="sm"
- className="h-6 text-[10px] ml-auto cursor-pointer"
- disabled={pushingFilter === "ignored_urls"}
- onClick={() =>
- handlePushFilterToTeam(
- "url_filter",
- "ignored_urls",
- settings.ignoredUrls || []
- )
- }
- >
- {pushingFilter === "ignored_urls" ? (
- <Loader2 className="h-3 w-3 mr-1 animate-spin" />
- ) : (
- <Users className="h-3 w-3 mr-1" />
- )}
- push to team
- </Button>
- )}
- </div>
- </div>
- <div className="ml-[26px]">
- <MultiSelect
- options={createUrlOptions(
- urlItems || [],
- settings.ignoredUrls || []
- )}
- defaultValue={settings.ignoredUrls || []}
- value={settings.ignoredUrls || []}
- onValueChange={handleIgnoredUrlsChange}
- placeholder="e.g. wellsfargo.com, chase.com..."
- allowCustomValues={true}
- />
- {(settings.ignoredUrls || []).some(
- (url) =>
- url.length < 5 ||
- ["bank", "pay", "money", "finance"].includes(
- url.toLowerCase()
- )
- ) && (
- <p className="text-xs text-yellow-600 dark:text-yellow-500 flex items-center gap-1 mt-1">
- <AlertCircle className="h-3 w-3" />
- Short patterns may over-match. Use specific domains.
- </p>
- )}
- {filterView === "all" &&
- (settings.teamFilters?.ignoredUrls?.length ?? 0) > 0 && (
- <div className="flex flex-wrap gap-1 mt-1">
- {settings.teamFilters!.ignoredUrls.map((u) => (
- <Badge
- key={u}
- variant="outline"
- className="text-[10px] h-5 gap-0.5"
- >
- <Users className="h-2.5 w-2.5 mr-0.5" />
- {u}
- {isTeamAdmin && (
- <button
- onClick={() =>
- handleRemoveTeamFilter(
- "url_filter",
- "ignored_urls",
- u
- )
- }
- className="ml-0.5 hover:text-destructive"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="10"
- height="10"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 6 6 18" />
- <path d="m6 6 12 12" />
- </svg>
- </button>
- )}
- </Badge>
- ))}
- </div>
- )}
- </div>
- </CardContent>
- </Card>
- </>
- )}
-
- {/* Team-only view */}
- {filterView === "team" && (
- <>
- {(settings.teamFilters?.ignoredWindows?.length ?? 0) > 0 && (
- <Card className="border-border bg-card">
- <CardContent className="px-3 py-2.5">
- <div className="flex items-center space-x-2.5 mb-2">
- <EyeOff className="h-4 w-4 text-muted-foreground shrink-0" />
- <h3 className="text-sm font-medium text-foreground">
- Ignored Apps
- </h3>
- </div>
- <div className="flex flex-wrap gap-1 ml-[26px]">
- {settings.teamFilters!.ignoredWindows.map((w) => (
- <Badge
- key={w}
- variant="outline"
- className="text-[10px] h-5 gap-0.5"
- >
- <Users className="h-2.5 w-2.5 mr-0.5" />
- {w}
- {isTeamAdmin && (
- <button
- onClick={() =>
- handleRemoveTeamFilter(
- "window_filter",
- "ignored_windows",
- w
- )
- }
- className="ml-0.5 hover:text-destructive"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="10"
- height="10"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 6 6 18" />
- <path d="m6 6 12 12" />
- </svg>
- </button>
- )}
- </Badge>
- ))}
- </div>
- </CardContent>
- </Card>
- )}
-
- {(settings.teamFilters?.includedWindows?.length ?? 0) > 0 && (
- <Card className="border-border bg-card">
- <CardContent className="px-3 py-2.5">
- <div className="flex items-center space-x-2.5 mb-2">
- <Eye className="h-4 w-4 text-muted-foreground shrink-0" />
- <h3 className="text-sm font-medium text-foreground">
- Included Apps
- </h3>
- </div>
- <div className="flex flex-wrap gap-1 ml-[26px]">
- {settings.teamFilters!.includedWindows.map((w) => (
- <Badge
- key={w}
- variant="outline"
- className="text-[10px] h-5 gap-0.5"
- >
- <Users className="h-2.5 w-2.5 mr-0.5" />
- {w}
- {isTeamAdmin && (
- <button
- onClick={() =>
- handleRemoveTeamFilter(
- "window_filter",
- "included_windows",
- w
- )
- }
- className="ml-0.5 hover:text-destructive"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="10"
- height="10"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 6 6 18" />
- <path d="m6 6 12 12" />
- </svg>
- </button>
- )}
- </Badge>
- ))}
- </div>
- </CardContent>
- </Card>
- )}
+ <Card className="border-border bg-card">
+ <CardContent className="px-3 py-2.5">
+ <div className="flex items-center space-x-2.5 mb-2">
+ <EyeOff className="h-4 w-4 text-muted-foreground shrink-0" />
+ <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
+ Ignored Apps
+ <HelpTooltip text="Skip captures for these patterns. Plain text (e.g. '1Password') matches the app or any window title that contains it. Use 'App::Title' to scope to one window of an app (e.g. 'Slack::#hr' blocks only #hr in Slack)." />
+ </h3>
+ </div>
+ <div className="ml-[26px]">
+ <MultiSelect
+ options={createWindowOptions(
+ windowItems || [],
+ settings.ignoredWindows
+ )}
+ defaultValue={settings.ignoredWindows}
+ value={settings.ignoredWindows}
+ onValueChange={handleIgnoredWindowsChange}
+ placeholder="Select apps to ignore..."
+ allowCustomValues
+ />
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-7 text-[11px] mt-1.5 gap-1.5"
+ onClick={() => setPicker("ignored")}
+ >
+ <FolderTree className="h-3 w-3" /> browse apps & windows
+ </Button>
+ </div>
+ </CardContent>
+ </Card>
- {(settings.teamFilters?.ignoredUrls?.length ?? 0) > 0 && (
- <Card className="border-border bg-card">
- <CardContent className="px-3 py-2.5">
- <div className="flex items-center space-x-2.5 mb-2">
- <Globe className="h-4 w-4 text-muted-foreground shrink-0" />
- <h3 className="text-sm font-medium text-foreground">
- Ignored URLs
- </h3>
- </div>
- <div className="flex flex-wrap gap-1 ml-[26px]">
- {settings.teamFilters!.ignoredUrls.map((u) => (
- <Badge
- key={u}
- variant="outline"
- className="text-[10px] h-5 gap-0.5"
- >
- <Users className="h-2.5 w-2.5 mr-0.5" />
- {u}
- {isTeamAdmin && (
- <button
- onClick={() =>
- handleRemoveTeamFilter(
- "url_filter",
- "ignored_urls",
- u
- )
- }
- className="ml-0.5 hover:text-destructive"
- >
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="10"
- height="10"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- >
- <path d="M18 6 6 18" />
- <path d="m6 6 12 12" />
- </svg>
- </button>
- )}
- </Badge>
- ))}
- </div>
- </CardContent>
- </Card>
- )}
+ <Card className="border-border bg-card">
+ <CardContent className="px-3 py-2.5">
+ <div className="flex items-center space-x-2.5 mb-2">
+ <Eye className="h-4 w-4 text-muted-foreground shrink-0" />
+ <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
+ Included Apps
+ <HelpTooltip text="When set, only matching windows are captured. Plain text is a global include (e.g. 'Slack' = only Slack). 'App::Title' creates a per-app whitelist (e.g. 'Slack::#engineering' keeps only that channel in Slack; other apps stay unaffected)." />
+ </h3>
+ </div>
+ <div className="ml-[26px]">
+ <MultiSelect
+ options={createWindowOptions(
+ windowItems || [],
+ settings.includedWindows
+ )}
+ defaultValue={settings.includedWindows}
+ value={settings.includedWindows}
+ onValueChange={handleIncludedWindowsChange}
+ placeholder="Only capture these apps (optional)..."
+ allowCustomValues
+ />
+ <Button
+ variant="outline"
+ size="sm"
+ className="h-7 text-[11px] mt-1.5 gap-1.5"
+ onClick={() => setPicker("included")}
+ >
+ <FolderTree className="h-3 w-3" /> browse apps & windows
+ </Button>
+ </div>
+ </CardContent>
+ </Card>
- {(settings.teamFilters?.ignoredWindows?.length ?? 0) === 0 &&
- (settings.teamFilters?.includedWindows?.length ?? 0) === 0 &&
- (settings.teamFilters?.ignoredUrls?.length ?? 0) === 0 && (
- <Card className="border-border bg-card">
- <CardContent className="py-8 text-center text-muted-foreground">
- <p>no team filters shared yet</p>
- {isTeamAdmin && (
- <p className="text-sm mt-2">
- use &quot;push to team&quot; to share your filters
- </p>
- )}
- </CardContent>
- </Card>
+ <Card className="border-border bg-card">
+ <CardContent className="px-3 py-2.5">
+ <div className="flex items-center space-x-2.5 mb-2">
+ <Globe className="h-4 w-4 text-muted-foreground shrink-0" />
+ <h3 className="text-sm font-medium text-foreground flex items-center gap-1.5">
+ Ignored URLs
+ <HelpTooltip text="Browser URLs matching these patterns will not be captured. Use for privacy — e.g. add 'bank.com' to skip banking sites." />
+ </h3>
+ </div>
+ <div className="ml-[26px]">
+ <MultiSelect
+ options={createUrlOptions(
+ urlItems || [],
+ settings.ignoredUrls || []
+ )}
+ defaultValue={settings.ignoredUrls || []}
+ value={settings.ignoredUrls || []}
+ onValueChange={handleIgnoredUrlsChange}
+ placeholder="e.g. wellsfargo.com, chase.com..."
+ allowCustomValues={true}
+ />
+ {(settings.ignoredUrls || []).some(
+ (url) =>
+ url.length < 5 ||
+ ["bank", "pay", "money", "finance"].includes(
+ url.toLowerCase()
+ )
+ ) && (
+ <p className="text-xs text-yellow-600 dark:text-yellow-500 flex items-center gap-1 mt-1">
+ <AlertCircle className="h-3 w-3" />
+ Short patterns may over-match. Use specific domains.
+ </p>
)}
- </>
- )}
+ </div>
+ </CardContent>
+ </Card>
</div>
{/* Telemetry */}
diff --git a/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx b/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx
index 44e2942e4..9e52dbedc 100644
--- a/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/recording-settings.tsx
@@ -78,7 +78,6 @@ import {
useSettings,
Settings,
} from "@/lib/hooks/use-settings";
-import { useTeam } from "@/lib/hooks/use-team";
import { useToast } from "@/components/ui/use-toast";
import { useHealthCheck } from "@/lib/hooks/use-health-check";
import { localFetch } from "@/lib/api";
@@ -1801,10 +1800,6 @@ export function RecordingSettings() {
const [showOpenAIApiKey, setShowOpenAIApiKey] = useState(false);
const [isRefreshingSubscription, setIsRefreshingSubscription] = useState(false);
const { checkLogin } = useLoginDialog();
- const team = useTeam();
- const isTeamAdmin = !!team.team && team.role === "admin";
- const [pushingFilter, setPushingFilter] = useState<string | null>(null);
- const [filterView, setFilterView] = useState<"all" | "personal" | "team">("all");
const overlayData = useOverlayData();
const [hwCapability, setHwCapability] = useState<HardwareCapability | null>(null);
@@ -1846,37 +1841,6 @@ export function RecordingSettings() {
]
);
- const handlePushFilterToTeam = async (configType: string, key: string, filters: string[]) => {
- setPushingFilter(key);
- try {
- await team.pushConfig(configType, key, { filters });
- toast({ title: "pushed to team" });
- } catch (err: any) {
- toast({ title: "failed to push to team", description: err.message, variant: "destructive" });
- } finally {
- setPushingFilter(null);
- }
- };
-
- const handleRemoveTeamFilter = async (configType: string, key: string, filterToRemove: string) => {
- const config = team.configs?.find(
- (c) => c.config_type === configType && c.key === key && c.scope === "team"
- );
- if (!config) return;
- const currentFilters = (config.value as { filters?: string[] })?.filters || [];
- const updated = currentFilters.filter((f) => f !== filterToRemove);
- try {
- if (updated.length === 0) {
- await team.deleteConfig(config.id);
- } else {
- await team.pushConfig(configType, key, { filters: updated });
- }
- toast({ title: "filter removed from team" });
- } catch (err: any) {
- toast({ title: "failed to remove filter", description: err.message, variant: "destructive" });
- }
- };
-
// Add new state to track if settings have changed
const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);