Proposed comment
-
+
{proposedComment}
diff --git a/ui/src/components/AppsSidebar.production.tsx b/ui/src/components/AppsSidebar.production.tsx
index cc5153b7f85..bf50e5d4b2c 100644
--- a/ui/src/components/AppsSidebar.production.tsx
+++ b/ui/src/components/AppsSidebar.production.tsx
@@ -66,8 +66,8 @@ export function AppsSidebar() {
Connectors
-
-
+
-
+
{developerTabs.map((tab) => (
-
-
+
{
const { title, detail } = attentionEvidenceText(entry);
return (
-
+
{attentionEvidenceLabel(item, entry)}:
{entry.subject.href ? (
diff --git a/ui/src/components/AttentionQueueRow.tsx b/ui/src/components/AttentionQueueRow.tsx
index 49502a5ccf5..fd92a447bae 100644
--- a/ui/src/components/AttentionQueueRow.tsx
+++ b/ui/src/components/AttentionQueueRow.tsx
@@ -51,6 +51,7 @@ import { DecisionResolver } from "./DecisionResolver";
import { StalledReviewActions } from "./StalledReviewActions";
import { readIssueReviewPolicyMetadata } from "../lib/review-policy";
import { attentionOtherAudienceUserId } from "../lib/attention-close";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
// Decision-action buttons: a comfortable tap target when the row is narrow
// (h-9 / text-sm), shrinking back to the dense pill (h-6 / text-xs) once the
@@ -334,10 +335,10 @@ export const AttentionQueueRow = memo(function AttentionQueueRow({
}
: {})}
>
-
+
{item.subject.title ?? meta.label}
- {detailLine}
+ {detailLine}
{/* Why this card is here (PAP-749 plan §1, Rule 4): "Why me?", "For
diff --git a/ui/src/components/CaseFieldsPanel.tsx b/ui/src/components/CaseFieldsPanel.tsx
index e7f2ace84f5..77745886087 100644
--- a/ui/src/components/CaseFieldsPanel.tsx
+++ b/ui/src/components/CaseFieldsPanel.tsx
@@ -6,6 +6,7 @@ import { IssueReferencePill } from "@/components/IssueReferencePill";
import { Link, useCaseHref } from "@/lib/router";
import { copyTextToClipboard } from "@/lib/clipboard";
import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
// -----------------------------------------------------------------------------
// CaseFieldsPanel (PAP-12968 §3) — the generic key-value renderer for a case's
@@ -223,7 +224,7 @@ export function CaseFieldValue({
);
}
return (
-
+
{JSON.stringify(value, null, 2)}
);
@@ -330,7 +331,7 @@ export function CaseFieldsTable({ fields }: { fields: Record })
return No fields set
;
}
return (
-
+
{rows.map(({ id, path, value }) => (
diff --git a/ui/src/components/CaseRevisionRail.test.tsx b/ui/src/components/CaseRevisionRail.test.tsx
index b8cd879771a..20cd3735556 100644
--- a/ui/src/components/CaseRevisionRail.test.tsx
+++ b/ui/src/components/CaseRevisionRail.test.tsx
@@ -6,6 +6,7 @@ import type { AnchorHTMLAttributes } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { CaseDocumentRevisions } from "@/api/cases";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
import { CaseRevisionRail } from "./CaseRevisionRail";
function act(callback: () => void) {
@@ -122,4 +123,18 @@ describe("CaseRevisionRail", () => {
expect(container.querySelector('[data-testid="md"]')?.textContent).toBe("# First version");
act(() => root.unmount());
});
+
+ it("keeps revision diff lines out of session replay", async () => {
+ mockCasesApi.listRevisions.mockResolvedValue(revisions);
+ const root = await render();
+ const compare = Array.from(container.querySelectorAll("button")).find((b) => /compare|diff/i.test(b.textContent ?? "") || /compare|diff/i.test(b.getAttribute("aria-label") ?? ""));
+ expect(compare).toBeTruthy();
+ act(() => compare!.dispatchEvent(new MouseEvent("click", { bubbles: true })));
+ await flush();
+ const dialog = document.querySelector('[role="dialog"]');
+ expect(dialog).not.toBeNull();
+ expect(replayLeaks("Second version", dialog!)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("First version", dialog!)).toEqual({ rendered: true, recorded: false });
+ act(() => root.unmount());
+ });
});
diff --git a/ui/src/components/CaseRevisionRail.tsx b/ui/src/components/CaseRevisionRail.tsx
index 7d7de2c546f..1af77b76565 100644
--- a/ui/src/components/CaseRevisionRail.tsx
+++ b/ui/src/components/CaseRevisionRail.tsx
@@ -14,6 +14,7 @@ import { MarkdownBody } from "@/components/MarkdownBody";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
import { cn, relativeTime } from "@/lib/utils";
import { Diff } from "lucide-react";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/** Author + via-issue attribution line for a revision. */
function RevisionByline({ revision }: { revision: CaseDocumentRevision }) {
@@ -150,7 +151,7 @@ function CaseDocumentDiffModal({
{markerByKind[row.kind]}
-
+
{row.text.length > 0 ? row.text : " "}
diff --git a/ui/src/components/CompanySettingsSidebar.production.tsx b/ui/src/components/CompanySettingsSidebar.production.tsx
index 24adf77aec0..2dd61e2837d 100644
--- a/ui/src/components/CompanySettingsSidebar.production.tsx
+++ b/ui/src/components/CompanySettingsSidebar.production.tsx
@@ -100,9 +100,9 @@ export function CompanySettingsSidebar() {
-
+
{showPage("instance.profile") && (
-
)}
{showPage("company.members") && (
-
))}
{showPage("company.invites") && (
-
+
)}
{showPage("company.secrets") && (
-
+
)}
{showPage("instance.environments") && (
-
)}
-
+
{showPage("instance.access") && (
-
)}
{showPage("instance.heartbeats") && (
-
)}
{showPage("company.export") && (
-
+
)}
{!isCloud && showPage("company.import") && (
-
+
)}
{showPage("instance.experimental") && (
-
)}
{showPlugins && (
-
) : null}
{showPage("instance.adapters") && (
-
-
+
-
+
{showPage("instance.profile") && (
-
)}
{showPage("company.members") && (
-
))}
{showPage("company.secrets") && (
-
+
)}
{showPage("instance.environments") && (
-
)}
-
+
{showPage("instance.access") && (
-
)}
{showPage("company.export") && (
-
+
)}
{!isCloud && showPage("company.import") && (
-
+
)}
{showPage("instance.experimental") && (
-
)}
{showPlugins && (
-
) : null}
{showPage("instance.adapters") && (
-
{rail ? {newTaskButton} New task : newTaskButton}
-
+
-
+
{!rail &&
openNewIssue()}
className="absolute right-3 top-1/2 -translate-y-1/2 rounded-md p-1 text-muted-foreground opacity-0 transition-opacity group-hover/coordinator-new:opacity-100 group-focus-within/coordinator-new:opacity-100 pointer-coarse:opacity-100 hover:bg-sidebar-accent focus-visible:ring-2 focus-visible:ring-ring"> }
-
+
{orderedPins.length > 0 &&
}
diff --git a/ui/src/components/DecisionCard.test.tsx b/ui/src/components/DecisionCard.test.tsx
index fe0c90ecce7..c3fcaf10be7 100644
--- a/ui/src/components/DecisionCard.test.tsx
+++ b/ui/src/components/DecisionCard.test.tsx
@@ -9,6 +9,7 @@ import { DecisionCard, type DecisionIssueRef } from "./DecisionCard";
import type { Decision, DecisionEffectExecution } from "../api/decisions";
import { ThemeProvider } from "../context/ThemeContext";
import { TooltipProvider } from "./ui/tooltip";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
let container: HTMLDivElement | null = null;
let root: Root | null = null;
@@ -319,3 +320,15 @@ describe("DecisionCard", () => {
expect(expired.textContent).not.toContain("expiry deadline");
});
});
+
+describe("DecisionCard session replay", () => {
+ it("keeps agent-written option labels, descriptions and field labels out of session replay", () => {
+ const el = render({ decision: mkDecision({
+ options: [{ id: "reply", label: "Reply to Globex renewal", description: "Draft answer to jane@globex.com", effects: [{ type: "comment_on_issue", targetIssueId: "issue-target", staleness: "lenient", bodyMarkdown: "nudge" }] }],
+ inputs: [{ id: "note", label: "Note for jane@globex.com", type: "text" }] as unknown as Decision["inputs"],
+ }) });
+ expect(replayLeaks("Reply to Globex renewal", el)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Draft answer to jane@globex.com", el)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Note for jane@globex.com", el)).toEqual({ rendered: true, recorded: false });
+ });
+});
diff --git a/ui/src/components/DecisionCard.tsx b/ui/src/components/DecisionCard.tsx
index a7d128a38f0..692ed40f13a 100644
--- a/ui/src/components/DecisionCard.tsx
+++ b/ui/src/components/DecisionCard.tsx
@@ -22,6 +22,7 @@ import { Button } from "./ui/button";
import { Input } from "./ui/input";
import { Textarea } from "./ui/textarea";
import { MarkdownBody } from "./MarkdownBody";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/**
* Presentational card for a single Decisions-v1 decision (PAP-14966 / PAP-14939
@@ -325,6 +326,7 @@ export function DecisionCard({
SHELL[tone],
dimmed && "opacity-80",
className,
+ ANALYTICS_MASK_CLASS,
)}
data-decision-state={badgeLabel.toLowerCase()}
>
diff --git a/ui/src/components/DecisionResolver.test.tsx b/ui/src/components/DecisionResolver.test.tsx
index 520bb38d332..25d7be5118b 100644
--- a/ui/src/components/DecisionResolver.test.tsx
+++ b/ui/src/components/DecisionResolver.test.tsx
@@ -4,6 +4,7 @@ import { flushSync } from "react-dom";
import { createRoot } from "react-dom/client";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { DecisionOutcome } from "../api/decisions";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
const state = vi.hoisted(() => ({ issueStatus: "todo", queriedIssueIds: [] as string[] }));
@@ -20,7 +21,7 @@ vi.mock("@tanstack/react-query", async (importOriginal) => ({
originIssueId: "origin-1",
status: "open",
targetSnapshots: { "target-1": { updatedAt: "2026-07-31T00:00:00.000Z" } },
- options: [{ id: "yes", label: "Yes", effects: [
+ options: [{ id: "yes", label: "Yes", description: "Send the Globex renewal reply", effects: [
{
type: "create_issue",
targetIssueId: "target-1",
@@ -123,4 +124,13 @@ describe("DecisionResolver", () => {
flushSync(() => root.unmount());
});
+
+ it("keeps the compact view's option text out of session replay", () => {
+ const root = createRoot(container);
+ flushSync(() => root.render(Lead} />));
+ expect(container.querySelector('[data-testid="decision-status"]')).toBeNull();
+ expect(replayLeaks("Yes", container).recorded).toBe(false);
+ expect(replayLeaks("Yes", container).rendered).toBe(true);
+ flushSync(() => root.unmount());
+ });
});
diff --git a/ui/src/components/DecisionResolver.tsx b/ui/src/components/DecisionResolver.tsx
index 9d35f4dd881..c425f88b399 100644
--- a/ui/src/components/DecisionResolver.tsx
+++ b/ui/src/components/DecisionResolver.tsx
@@ -13,6 +13,7 @@ import { MarkdownBody } from "./MarkdownBody";
import { NeedsYouPanel, NeedsYouPanelNote } from "./coordinator/NeedsYouCardKit";
import { Button } from "./ui/button";
import { Textarea } from "./ui/textarea";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
interface DecisionResolverProps {
companyId: string;
@@ -91,7 +92,7 @@ function CompactDecision({ decision, resolveIssue, targetChanged, busy, errorMes
.some((effect) => effect.staleness === "strict" && decisionEffectTargetIssueIds(effect).some((target) => stale.has(target))) ?? false;
const body = decision.body?.trim();
return (
-
+
{decision.title}
{body ?
{body}
: null}
diff --git a/ui/src/components/DesignSidebar.tsx b/ui/src/components/DesignSidebar.tsx
index ecd0941a11f..c0cfd9f0a0e 100644
--- a/ui/src/components/DesignSidebar.tsx
+++ b/ui/src/components/DesignSidebar.tsx
@@ -30,20 +30,20 @@ export function DesignSidebar({ onNewTask, recentTasks = [] }: { onNewTask: () =
New Task
-
-
+
+
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
{companyRecentTasks.length > 0 ?
diff --git a/ui/src/components/DocumentDiffModal.tsx b/ui/src/components/DocumentDiffModal.tsx
index 68f3880d44e..3636f8eee8e 100644
--- a/ui/src/components/DocumentDiffModal.tsx
+++ b/ui/src/components/DocumentDiffModal.tsx
@@ -20,6 +20,8 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
function getRevisionLabel(revision: DocumentRevision) {
const actor = revision.createdByUserId
@@ -168,7 +170,7 @@ export function DocumentDiffModal({
{markerByKind[row.kind]}
-
+
{row.text.length > 0 ? row.text : " "}
diff --git a/ui/src/components/EmailMessageCard.tsx b/ui/src/components/EmailMessageCard.tsx
index b1c374e1ac4..7f6157622e8 100644
--- a/ui/src/components/EmailMessageCard.tsx
+++ b/ui/src/components/EmailMessageCard.tsx
@@ -8,6 +8,8 @@ import type {
} from "@paperclipai/shared";
import { useEmailThread } from "@/hooks/useEmailThread";
import { issuesApi } from "@/api/issues";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
const EmailContext = createContext(null);
export function EmailThreadProvider({
companyId,
@@ -59,7 +61,7 @@ export function EmailMessageCard({
aria-label={
message.direction === "inbound" ? "Email received" : "Email sent"
}
- className={contextNotice ? "task-context-notice space-y-3" : "space-y-4 rounded-xl border border-border bg-card p-5"}
+ className={cn(contextNotice ? "task-context-notice space-y-3" : "space-y-4 rounded-xl border border-border bg-card p-5", ANALYTICS_MASK_CLASS)}
>
diff --git a/ui/src/components/EmailTaskActivity.tsx b/ui/src/components/EmailTaskActivity.tsx
index 9a5781d82c4..4c354c1d7e2 100644
--- a/ui/src/components/EmailTaskActivity.tsx
+++ b/ui/src/components/EmailTaskActivity.tsx
@@ -8,6 +8,8 @@ import { Input } from "@/components/ui/input";
import { describeError } from "@/api/errors";
import { QueryErrorState, useQueryView } from "./QueryView";
import type { EmailPublicationSummary } from "@paperclipai/shared";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
// Email actions belong to the agent's task conversation. Only surface mail
// without a task comment yet and delivery outcomes that need attention here.
@@ -93,7 +95,7 @@ function EmailDelivery({
{p.request && !p.providerMessageId && (
{p.request.subject ?? "Email reply"}
{p.request.to && To: {p.request.to.join(", ")}
}
diff --git a/ui/src/components/EmptyState.tsx b/ui/src/components/EmptyState.tsx
index 9dfe8e40334..1b23884f89f 100644
--- a/ui/src/components/EmptyState.tsx
+++ b/ui/src/components/EmptyState.tsx
@@ -2,7 +2,6 @@ import { Plus } from "lucide-react";
import type { LucideIcon } from "lucide-react";
import type { ReactNode } from "react";
import { Button } from "@/components/ui/button";
-import { ANALYTICS_UNMASK_PROPS } from "@/lib/analytics/privacy";
interface EmptyStateProps {
icon: LucideIcon;
@@ -17,8 +16,6 @@ interface EmptyStateProps {
onAction?: () => void;
/** Hide the leading "+" glyph on the action button (e.g. for a "Set up" CTA). */
hideActionIcon?: boolean;
- /** The text is fixed product copy, so session replay may show it. */
- analyticsChrome?: boolean;
}
export function EmptyState({
@@ -30,10 +27,9 @@ export function EmptyState({
action,
onAction,
hideActionIcon = false,
- analyticsChrome = false,
}: EmptyStateProps) {
return (
-
+
{graphic ?
{graphic}
:
}
diff --git a/ui/src/components/ExecutionWorkspaceCloseDialog.tsx b/ui/src/components/ExecutionWorkspaceCloseDialog.tsx
index 412ea33953a..49470a8679b 100644
--- a/ui/src/components/ExecutionWorkspaceCloseDialog.tsx
+++ b/ui/src/components/ExecutionWorkspaceCloseDialog.tsx
@@ -17,6 +17,8 @@ import {
DialogHeader,
DialogTitle,
} from "./ui/dialog";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
type ExecutionWorkspaceCloseDialogProps = {
workspaceId: string;
@@ -268,7 +270,7 @@ export function ExecutionWorkspaceCloseDialog({
{action.label}
{action.description}
{action.command ? (
-
+
{action.command}
) : null}
diff --git a/ui/src/components/ExternalObjectPill.tsx b/ui/src/components/ExternalObjectPill.tsx
index adee15645fb..f244da5c884 100644
--- a/ui/src/components/ExternalObjectPill.tsx
+++ b/ui/src/components/ExternalObjectPill.tsx
@@ -18,6 +18,7 @@ import {
externalObjectTypeLabel,
} from "../lib/external-objects";
import { cn } from "../lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export interface ExternalObjectPillData {
providerKey: string | null;
@@ -153,7 +154,7 @@ export function ExternalObjectPill({
sizeClassName="h-3 w-3"
label={`${providerLabel}: ${statusLabel}`}
/>
- {valueLabel}
+ {valueLabel}
>
);
const countSuffix = typeof sourceCount === "number" && sourceCount > 1 ? (
@@ -164,7 +165,7 @@ export function ExternalObjectPill({
{showProviderIcon && ProviderIcon ? (
) : null}
-
+
{labelText}
{countSuffix}
diff --git a/ui/src/components/FileViewerSheet.tsx b/ui/src/components/FileViewerSheet.tsx
index 4a3f558e3b6..400e59be555 100644
--- a/ui/src/components/FileViewerSheet.tsx
+++ b/ui/src/components/FileViewerSheet.tsx
@@ -356,7 +356,7 @@ export function FileContentViewer({ content, highlightedLine, onLoaded, previewM
tabIndex={0}
className={cn("paperclip-file-viewer-code min-w-0 flex-1 overflow-auto bg-(--code-bg-resolved) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset", ANALYTICS_MASK_CLASS)}
>
-
+
{lines.map((lineText, index) => {
const lineNumber = index + 1;
const isHighlighted = lineNumber === highlightedLine;
diff --git a/ui/src/components/InstructionHistory.tsx b/ui/src/components/InstructionHistory.tsx
index f9bd3a7c8e9..c8c249c2be5 100644
--- a/ui/src/components/InstructionHistory.tsx
+++ b/ui/src/components/InstructionHistory.tsx
@@ -5,6 +5,8 @@ import { agentsApi } from "../api/agents";
import { describeError } from "../api/errors";
import { Button } from "./ui/button";
import { QueryErrorState, useQueryView } from "./QueryView";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function InstructionHistory({
agentId,
@@ -129,13 +131,13 @@ export function InstructionHistory({
{diff.data && (
<>
Selected revision
-
+
{diff.data.from.content}
Changes from selected revision to current
-
+
{diff.data.removed && `Removed:\n${diff.data.removed}\n`}
{diff.data.added && `Added:\n${diff.data.added}`}
{!diff.data.removed &&
diff --git a/ui/src/components/IssueLinkQuicklook.tsx b/ui/src/components/IssueLinkQuicklook.tsx
index 106f19f22dc..d7242390c97 100644
--- a/ui/src/components/IssueLinkQuicklook.tsx
+++ b/ui/src/components/IssueLinkQuicklook.tsx
@@ -16,6 +16,7 @@ import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover
import { StatusGlyph } from "@/components/StatusGlyph";
import { ProjectTile } from "@/components/ProjectTile";
import { useFlyoutAppearance } from "@/components/ui/flyout-appearance";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/* ------------------------------------------------------------------ */
/* Single-flight quicklook store */
@@ -211,7 +212,7 @@ export function IssueQuicklookCard({
{description ? (
-
+
{description}
) : null}
diff --git a/ui/src/components/IssueRecoveryActionCard.tsx b/ui/src/components/IssueRecoveryActionCard.tsx
index ecbec1c8b72..e02af9c234d 100644
--- a/ui/src/components/IssueRecoveryActionCard.tsx
+++ b/ui/src/components/IssueRecoveryActionCard.tsx
@@ -51,6 +51,7 @@ import {
readRecoveryRetryLineage,
type RecoveryRetryLineage,
} from "@/lib/recovery-lineage";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export type RecoveryCardCardState = RecoveryDisplayState;
export const deriveRecoveryCardState = deriveRecoveryDisplayState;
@@ -1167,7 +1168,7 @@ export function IssueRecoveryActionCard({
>
) : null}
-
{headline}
+
{headline}
{variant === "compact" ? null : (
@@ -1306,11 +1307,11 @@ export function IssueRecoveryActionCard({
{evidenceSummary ? (
evidenceSummary.isCode ? (
-
+
{evidenceSummary.text}
) : (
- {evidenceSummary.text}
+ {evidenceSummary.text}
)
) : (
@@ -1381,7 +1382,7 @@ export function IssueRecoveryActionCard({
)}
>
{option.label}
- {option.description}
+ {option.description}
))}
diff --git a/ui/src/components/IssueRelatedWorkPanel.tsx b/ui/src/components/IssueRelatedWorkPanel.tsx
index 6d732628c4f..4909a530a36 100644
--- a/ui/src/components/IssueRelatedWorkPanel.tsx
+++ b/ui/src/components/IssueRelatedWorkPanel.tsx
@@ -4,6 +4,8 @@ import { ExternalObjectPill } from "./ExternalObjectPill";
import type { IssueExternalObjectGroup } from "../hooks/useIssueExternalObjects";
import { externalObjectToneSeverity } from "../lib/external-objects";
import { Badge } from "@/components/ui/badge";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
type GroupedSource = {
label: string;
@@ -147,7 +149,7 @@ function ExternalObjectsSection({
>
{pill.displayTitle ? (
-
+
{pill.displayTitle}
) : null}
diff --git a/ui/src/components/IssueRunLedger.test.tsx b/ui/src/components/IssueRunLedger.test.tsx
index 71414b8a808..d194e6d6d4d 100644
--- a/ui/src/components/IssueRunLedger.test.tsx
+++ b/ui/src/components/IssueRunLedger.test.tsx
@@ -8,6 +8,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { RunForIssue } from "../api/activity";
import type { ActiveRunForIssue } from "../api/heartbeats";
import { IssueRunLedgerContent } from "./IssueRunLedger";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
vi.mock("@/lib/router", () => ({
Link: ({ children, to, ...props }: { children: ReactNode; to: string } & ComponentProps<"a">) => (
@@ -319,6 +320,7 @@ describe("IssueRunLedger", () => {
expect(container.textContent).toContain("Retry exhausted");
expect(container.textContent).toContain("no further automatic retry will be queued");
expect(container.textContent).toContain("Manual intervention required");
+ expect(replayLeaks("Bounded retry exhausted after 4 scheduled attempts", container)).toEqual({ rendered: true, recorded: false });
});
it("labels max-turn stops and continuation retries without confusing them with per-run turns", () => {
diff --git a/ui/src/components/IssueRunLedger.tsx b/ui/src/components/IssueRunLedger.tsx
index 3c8a34eda75..aa8e465449b 100644
--- a/ui/src/components/IssueRunLedger.tsx
+++ b/ui/src/components/IssueRunLedger.tsx
@@ -37,6 +37,7 @@ import {
runRequestedProviderTrace,
} from "./ProviderTraceStatusBadge";
import { readFromIssueChatBootstrap } from "@/lib/issue-chat-bootstrap";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type IssueRunLedgerProps = {
issueId: string;
@@ -973,7 +974,7 @@ export function IssueRunLedgerContent({
{retryState ? (
-
+
{retryState.detail ?
{retryState.detail}
: null}
{retryState.secondary ? (
{retryState.secondary}
diff --git a/ui/src/components/IssueThreadInteractionCard.tsx b/ui/src/components/IssueThreadInteractionCard.tsx
index f4e4078df38..bea9313e3a7 100644
--- a/ui/src/components/IssueThreadInteractionCard.tsx
+++ b/ui/src/components/IssueThreadInteractionCard.tsx
@@ -58,6 +58,7 @@ import { DecisionCardFooter } from "./DecisionCardFooter";
import { ToolActionAuditHashCopy } from "./ToolActionAuditHashCopy";
import { NeedsYouPanel, NeedsYouPanelNote, NeedsYouPanelRow } from "./coordinator/NeedsYouCardKit";
import { claimReviseDraftWork, clearReviseDraft, releaseReviseDraftWork, reviseDraftKey, useReviseDraft, type ReviseDraftWork } from "@/lib/revise-draft-store";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const OTHER_ANSWER_ID = "__paperclip_other__";
@@ -1982,7 +1983,7 @@ function ToolActionResolution({
- {formattedOutput}
+ {formattedOutput}
) :
{status}
}
@@ -2065,7 +2066,7 @@ function RequestToolActionCard({
const preview = payload.previewMarkdown?.trim() ?? "";
const previewIsLine = Boolean(preview) && !preview.includes("\n") && preview.length <= 120;
return (
-
+
{ask}
@@ -2074,7 +2075,7 @@ function RequestToolActionCard({
{preview && !previewIsLine ?
: null}
{isPending ? inspectableArguments ?
Arguments
- {payload.argumentsSummaryJson}
+ {payload.argumentsSummaryJson}
:
Request arguments are unavailable.
: null}
{isPending ? (
@@ -2116,7 +2117,7 @@ function RequestToolActionCard({
}
return (
-
+
@@ -2131,7 +2132,7 @@ function RequestToolActionCard({
Arguments
-
+
{payload.argumentsSummaryJson}
@@ -2885,7 +2886,7 @@ function RequestConnectionAuthorizationCard({
{lead}
- } title={connectionName && connectionName !== providerName ? `${providerName} · ${connectionName}` : providerName} meta="Not connected" />
+ } title={connectionName && connectionName !== providerName ? <>{providerName} · {connectionName} > : providerName} meta="Not connected" />
{consentSentence}
@@ -4437,7 +4438,7 @@ export function IssueThreadInteractionCard({
if (coordinatorEnabled && !compactDecision && interaction.kind === "suggest_tasks") {
return
-
+
{interaction.status === "pending" ?
: null}
@@ -4447,7 +4448,7 @@ export function IssueThreadInteractionCard({
}
if (!compactDecision && interaction.kind === "connection_intent" && interaction.payload.accessRequest) {
return (
-
+
-
+
{compactDecision ? <>
{!bodyNamesDecision ?
{compactTitle} : null}
{/* Questions and confirmations put the note under their ask (UI1). */}
diff --git a/ui/src/components/LinkPreview.tsx b/ui/src/components/LinkPreview.tsx
index d505edc10b7..075a19f5869 100644
--- a/ui/src/components/LinkPreview.tsx
+++ b/ui/src/components/LinkPreview.tsx
@@ -6,6 +6,8 @@ import type { LinkPreview as Preview, LinkPreviewResult, LinkPreviewState, LinkP
import { useLinkPreviewContext, type LinkPreviewContextValue } from "@/context/LinkPreviewContext";
import { timeAgo } from "@/lib/timeAgo";
import { linkPreviewQueryOptions } from "@/lib/link-preview-query";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export const linkPreviewStateLabel: Record
= {
unknown: "Status unknown", open: "Open", merged: "Merged", conflicts: "Merge conflicts", draft: "Draft", closed: "Closed",
@@ -19,7 +21,7 @@ function PreviewCardContents({ target, preview, loading }: { target: LinkPreview
const state = preview?.state ?? "unknown";
const Icon = linkPreviewStateIcon[state] ?? linkPreviewStateIcon.unknown;
const updated = preview?.updatedAt && Number.isFinite(Date.parse(preview.updatedAt)) ? preview.updatedAt : null;
- return
+ return
{target.label}
diff --git a/ui/src/components/ProjectGitAuthorization.test.tsx b/ui/src/components/ProjectGitAuthorization.test.tsx
index c736508f79d..ef833504266 100644
--- a/ui/src/components/ProjectGitAuthorization.test.tsx
+++ b/ui/src/components/ProjectGitAuthorization.test.tsx
@@ -6,6 +6,7 @@ import type { Project } from "@paperclipai/shared";
import { describe, expect, it, vi } from "vitest";
import { projectsApi } from "@/api/projects";
import { ProjectGitAuthorization } from "./ProjectGitAuthorization";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
vi.mock("@/api/projects", () => ({
projectsApi: {
@@ -76,4 +77,42 @@ describe("ProjectGitAuthorization", () => {
client.clear();
}
});
+
+ it("masks GitHub logins in session replay", async () => {
+ const saved = {
+ grantId: "grant-a",
+ authorizedByUserId: "user-a",
+ options: [
+ { grantId: "grant-a", connectionName: "Work GitHub", login: "saved-octo-quillon" },
+ { grantId: "grant-b", connectionName: "Side GitHub", login: "picked-octo-varnell" },
+ ],
+ };
+ const client = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } } });
+ client.setQueryData(["project-git-authorization", "company-a", "project-b"], saved);
+ const container = document.createElement("div"),
+ root = createRoot(container);
+ document.body.appendChild(container);
+ try {
+ await act(async () =>
+ root.render(
+
+
+ ,
+ ),
+ );
+ expect(replayLeaks("saved-octo-quillon", container)).toEqual({ rendered: true, recorded: false });
+ const trigger = container.querySelector
('[role="combobox"]')!;
+ await act(async () => {
+ trigger.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true }));
+ });
+ expect(replayLeaks("picked-octo-varnell", document.body)).toEqual({ rendered: true, recorded: false });
+ const option = [...document.querySelectorAll('[role="option"]')].find((item) => item.textContent?.includes("picked-octo-varnell"))!;
+ await act(async () => option.click());
+ expect(replayLeaks("picked-octo-varnell", trigger)).toEqual({ rendered: true, recorded: false });
+ } finally {
+ await act(async () => root.unmount());
+ container.remove();
+ client.clear();
+ }
+ });
});
diff --git a/ui/src/components/ProjectGitAuthorization.tsx b/ui/src/components/ProjectGitAuthorization.tsx
index 966d3a746fc..4930a41a51c 100644
--- a/ui/src/components/ProjectGitAuthorization.tsx
+++ b/ui/src/components/ProjectGitAuthorization.tsx
@@ -4,6 +4,8 @@ import type { Project } from "@paperclipai/shared";
import { projectsApi } from "@/api/projects";
import { Button } from "./ui/button";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./ui/select";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function ProjectGitAuthorization({ project }: { project: Project }) {
const client = useQueryClient();
@@ -31,7 +33,7 @@ export function ProjectGitAuthorization({ project }: { project: Project }) {
Task runs continue to use their own identity.
{data?.grantId && (
-
+
Authorized:{" "}
{data.options.find((option) => option.grantId === data.grantId)?.login ??
"selected grant (unavailable or owned by another member)"}
@@ -40,12 +42,12 @@ export function ProjectGitAuthorization({ project }: { project: Project }) {
{data && (
-
+
{data.options.map((option) => (
-
+
{option.login} · {option.connectionName}
))}
diff --git a/ui/src/components/RoutineActivityRow.tsx b/ui/src/components/RoutineActivityRow.tsx
index 783383d0cd3..e236047923e 100644
--- a/ui/src/components/RoutineActivityRow.tsx
+++ b/ui/src/components/RoutineActivityRow.tsx
@@ -2,6 +2,7 @@ import { useState } from "react";
import { ChevronRight } from "lucide-react";
import type { ActivityEvent } from "@paperclipai/shared";
import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export type RoutineActivityEvent = Pick;
@@ -89,7 +90,7 @@ export function RoutineActivityRow({ event }: { event: RoutineActivityEvent }) {
) : null}
{expanded && hasPayload ? (
-
+
{JSON.stringify(event.details, null, 2)}
) : null}
diff --git a/ui/src/components/RoutineContextualSidebar.tsx b/ui/src/components/RoutineContextualSidebar.tsx
index 4e46f247c46..4e562e10226 100644
--- a/ui/src/components/RoutineContextualSidebar.tsx
+++ b/ui/src/components/RoutineContextualSidebar.tsx
@@ -104,12 +104,12 @@ export function RoutineContextualSidebar({
Operate
-
-
;
type ProjectLookup = Map;
@@ -970,7 +972,7 @@ function DiffTable({ rows }: { rows: DiffRow[] }) {
{markerByKind[row.kind]}
-
+
{row.text.length > 0 ? row.text : " "}
diff --git a/ui/src/components/RunnerInspector.test.tsx b/ui/src/components/RunnerInspector.test.tsx
index aa8feacc334..c82169023a7 100644
--- a/ui/src/components/RunnerInspector.test.tsx
+++ b/ui/src/components/RunnerInspector.test.tsx
@@ -7,6 +7,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { ApiError } from "@/api/client";
import { ConnectivityProvider, createConnectivityStore, type ConnectivityStore } from "@/lib/connectivity";
import { RunnerInspector } from "./RunnerInspector";
+import { isBlockedFromReplay, replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
const accessMock = vi.hoisted(() => vi.fn());
const eventsMock = vi.hoisted(() => vi.fn());
@@ -273,6 +274,7 @@ describe("RunnerInspector", () => {
flushSync(() => reveal?.click());
await flush();
expect(container.textContent).toContain("run-one-secret");
+ expect(isBlockedFromReplay("run-one-secret", document.body)).toBe(true);
flushSync(() =>
root.render(
@@ -290,6 +292,44 @@ describe("RunnerInspector", () => {
expect(container.textContent).not.toContain("run-one-secret");
});
+ it("blocks an exact frame revealed in the trace view from session replay", async () => {
+ traceMock.mockResolvedValue(traceInspection("run-1", "run-1-redacted"));
+ revealMock.mockResolvedValue({
+ schema: "paperclip.provider_trace_frame.v1",
+ frameId: 1,
+ timestamp: "1",
+ direction: "provider_to_client",
+ transport: "stdio_jsonl",
+ provider: "codex",
+ byteLength: 31,
+ digest: `sha256:${"b".repeat(64)}`,
+ rawBase64: btoa(JSON.stringify({ authorization: "Bearer trace-view-Kq72Lx" })),
+ });
+ vi.spyOn(window, "confirm").mockReturnValue(true);
+
+ flushSync(() =>
+ root.render(
+ ,
+ ),
+ );
+ await flush();
+ flushSync(() =>
+ Array.from(document.querySelectorAll('[role="tab"]')).find((tab) => tab.textContent?.includes("Exact trace"))!.click(),
+ );
+ await flush();
+ expect(replayLeaks("run-1-redacted", document.body)).toEqual({ rendered: true, recorded: false });
+ flushSync(() =>
+ Array.from(document.querySelectorAll("button")).find((button) => button.textContent?.includes("Reveal exact frame"))!.click(),
+ );
+ await flush();
+ expect(isBlockedFromReplay("Bearer trace-view-Kq72Lx", document.body)).toBe(true);
+ });
+
it("clears exact frames when raw-trace access is revoked while open", async () => {
traceMock.mockResolvedValue(traceInspection("run-1", "run-1-redacted"));
revealMock.mockResolvedValue({
diff --git a/ui/src/components/RunnerInspector.tsx b/ui/src/components/RunnerInspector.tsx
index 2af63e0ffe4..285d36f0c29 100644
--- a/ui/src/components/RunnerInspector.tsx
+++ b/ui/src/components/RunnerInspector.tsx
@@ -57,6 +57,7 @@ import {
SheetTitle,
} from "@/components/ui/sheet";
import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS, ANALYTICS_NO_CAPTURE_CLASS } from "@/lib/analytics/privacy";
import { useCopyAction } from "@/lib/use-copy-action";
type TraceEntry = Record;
@@ -489,7 +490,7 @@ function JsonNode({
function JsonExplorer({ value, label = "Search this JSON" }: { value: unknown; label?: string }) {
const [query, setQuery] = useState("");
return (
-
+
{Array.isArray(selectedFrame.withheldPaths) && selectedFrame.withheldPaths.length > 0 ?
Withheld paths: {selectedFrame.withheldPaths.join(", ")}
: null}
{canInspectRaw === true ?
void reveal(Number(selectedFrame.frameId))}> Reveal exact frame : null}
- {revealedFrame ?
: null}
+ {revealedFrame ?
: null}
) :
This PRP event has no recoverable raw frame.
}
@@ -1226,7 +1227,7 @@ export function RunnerInspector({
{view === "trace" ? (
{frames.length ? [...frames].sort((left, right) => Number(left.frameId) - Number(right.frameId)).map((frame) =>
{ const operation = operations.find((candidate) => candidate.frames.some((candidateFrame) => Number(candidateFrame.frameId) === Number(frame.frameId))); if (operation) setSelectedKey(operation.key); setSelectedFrameId(Number(frame.frameId)); }} className={cn("mb-1 w-full rounded-md border px-3 py-2 text-left", Number(frame.frameId) === Number(selectedFrame?.frameId) ? "border-primary/40 bg-primary/10" : "border-transparent hover:bg-muted/50")}>#{String(frame.frameId)} {frameMethod(frame) || text(frame.direction)} {text(frame.direction).replaceAll("_", " ")} · {formatBytes(Number(frame.byteLength) || 0)} ) :
No raw frames were captured for this run.
}
-
{selectedFrame ? <>
Exact trace frame #{String(selectedFrame.frameId)} {frameMethod(selectedFrame) || text(selectedFrame.direction)} {canInspectRaw === true ?
void reveal(Number(selectedFrame.frameId))}> Reveal exact frame : null}{revealedFrame ?
: null}> :
Select a frame from the chronological trace.
}
+
{selectedFrame ? <>
Exact trace frame #{String(selectedFrame.frameId)} {frameMethod(selectedFrame) || text(selectedFrame.direction)} {canInspectRaw === true ?
void reveal(Number(selectedFrame.frameId))}> Reveal exact frame : null}{revealedFrame ?
: null}> :
Select a frame from the chronological trace.
}
) : null}
diff --git a/ui/src/components/Sidebar.production.tsx b/ui/src/components/Sidebar.production.tsx
index 766485d84c5..21f79a5aad7 100644
--- a/ui/src/components/Sidebar.production.tsx
+++ b/ui/src/components/Sidebar.production.tsx
@@ -149,9 +149,9 @@ export function Sidebar() {
width; a nav row also keeps search reachable from the
collapsed rail, where the old header icon was dropped entirely.
Cmd/Ctrl+K remains the keyboard path (command palette). */}
-
-
-
+
+
0}
/>
{showDecisions ? (
-
) : null}
{showStatusCards ? (
-
+
) : null}
{conferenceRoomChatEnabled ? (
-
+
) : null}
-
+
{showCases ? (
-
+
) : null}
-
+
{showGoalsLink ? (
-
+
) : goalsLinkPending ? (
) : null}
-
-
+
+
{showWorkspacesLink ? (
-
+
) : null}
{streamlined ? (
<>
-
+
>
) : null}
@@ -224,14 +224,14 @@ export function Sidebar() {
-
- {showApps ? : null}
-
-
+
+ {showApps ? : null}
+
+
{/* One entry — /audit merged into the rich Activity feed (PAP-16302). */}
-
-
-
+
+
+
-
+
+
{!combinedInboxTasks ? (
- 0}
/>
) : null}
- {agentChatEnabled && !chatRail ? : null}
+ {agentChatEnabled && !chatRail ? : null}
{showDecisions ? (
-
) : null}
{showStatusCards ? (
-
+
) : null}
{conferenceRoomChatEnabled ? (
-
+
) : null}
@@ -212,12 +212,12 @@ function ClassicSidebar({ children }: { children?: ReactNode }) {
agents you talk to live in the Chat surface's own secondary rail
(ChatContextualSidebar), not in the primary nav. */}
{chatRail ? (
-
+
) : null}
{/* Combined Inbox + Task List: Inbox is a view inside Tasks, so the
unread/failed-run badge rides on Tasks. */}
{combinedInboxTasks ? (
- 0}
/>
) : (
-
+
)}
{streamlinedUiEnabled ? (
<>
-
+
>
) : null}
-
-
+
+
{showCases ? (
-
+
) : null}
{showGoalsLink ? (
-
+
) : goalsLinkPending ? (
) : null}
{showWorkspacesLink ? (
-
+
) : null}
-
-
-
-
+
+
+
+
) : null}
@@ -291,13 +291,13 @@ function ClassicSidebar({ children }: { children?: ReactNode }) {
label="Organization"
collapsible={{ open: organizationOpen, onOpenChange: setOrganizationOpen }}
>
-
-
-
-
-
-
-
+
+
+
+
+
+
+
>
)}
diff --git a/ui/src/components/SidebarNavItem.production.tsx b/ui/src/components/SidebarNavItem.production.tsx
index 53e015d10ca..c7034179c89 100644
--- a/ui/src/components/SidebarNavItem.production.tsx
+++ b/ui/src/components/SidebarNavItem.production.tsx
@@ -2,7 +2,6 @@ import { createContext, useContext, type ReactNode } from "react";
import { NavLink } from "@/lib/router";
import { SIDEBAR_SCROLL_RESET_STATE } from "../lib/navigation-scroll";
import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";
-import { ANALYTICS_UNMASK_PROPS } from "@/lib/analytics/privacy";
import { useSidebar } from "../context/SidebarContext";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import type { LucideIcon } from "lucide-react";
@@ -36,8 +35,6 @@ export function useSidebarNavExpanded() {
interface SidebarNavItemProps {
to: string;
label: string;
- /** The label is fixed product copy, so session replay may show it. */
- analyticsChrome?: boolean;
icon?: LucideIcon;
/**
* Pre-rendered icon element for rows whose icon isn't a plain Lucide
@@ -75,7 +72,6 @@ interface SidebarNavItemProps {
export function SidebarNavItem({
to,
label,
- analyticsChrome = false,
icon: Icon,
iconNode,
end,
@@ -123,7 +119,6 @@ export function SidebarNavItem({
to={to}
state={SIDEBAR_SCROLL_RESET_STATE}
end={end}
- {...(analyticsChrome ? ANALYTICS_UNMASK_PROPS : {})}
aria-label={railAriaLabel}
onClick={() => { if (isMobile) setSidebarOpen(false); }}
className={({ isActive }) =>
diff --git a/ui/src/components/SidebarNavItem.tsx b/ui/src/components/SidebarNavItem.tsx
index 479fd4e6ec0..6c77c4eedd2 100644
--- a/ui/src/components/SidebarNavItem.tsx
+++ b/ui/src/components/SidebarNavItem.tsx
@@ -3,7 +3,6 @@ import { NavLink } from "@/lib/router";
import type { IssueNavigationPrefetchHandlers } from "@/hooks/useIssueNavigationPrefetch";
import { SIDEBAR_SCROLL_RESET_STATE } from "../lib/navigation-scroll";
import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";
-import { ANALYTICS_UNMASK_PROPS } from "@/lib/analytics/privacy";
import { useSidebar } from "../context/SidebarContext";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import type { LucideIcon } from "lucide-react";
@@ -36,8 +35,6 @@ export function useSidebarNavExpanded() {
interface SidebarNavItemProps {
to: string;
label: string;
- /** The label is fixed product copy, so session replay may show it. */
- analyticsChrome?: boolean;
icon?: LucideIcon;
/**
* Pre-rendered icon element for rows whose icon isn't a plain Lucide
@@ -77,7 +74,6 @@ interface SidebarNavItemProps {
export function SidebarNavItem({
to,
label,
- analyticsChrome = false,
icon: Icon,
iconNode,
end,
@@ -127,7 +123,6 @@ export function SidebarNavItem({
to={to}
state={SIDEBAR_SCROLL_RESET_STATE}
end={end}
- {...(analyticsChrome ? ANALYTICS_UNMASK_PROPS : {})}
aria-label={railAriaLabel}
{...linkHandlers}
onClick={() => { if (isMobile) setSidebarOpen(false); }}
diff --git a/ui/src/components/SkillsContextualSidebar.tsx b/ui/src/components/SkillsContextualSidebar.tsx
index 6093d147f17..f9493f5e7ee 100644
--- a/ui/src/components/SkillsContextualSidebar.tsx
+++ b/ui/src/components/SkillsContextualSidebar.tsx
@@ -36,21 +36,21 @@ export function SkillsContextualSidebar() {
className={contextualSidebarStyles.nav}
>
-
-
-
+
@@ -67,7 +67,7 @@ export function SkillsContextualSidebar() {
Skills you create, edit, and test.
-
({ update: vi.fn(), link: vi.fn() }));
vi.mock("../api/subscriptions", () => ({ subscriptionsApi: mocks }));
@@ -132,4 +133,14 @@ describe("subscription costs", () => {
await click("Link accounts");
await vi.waitFor(() => expect(mocks.link).toHaveBeenCalledWith("company", "account-1", "account-2", 0, 3));
});
+ it("masks subscription account and owner names in session replay", async () => {
+ const report = fixture();
+ report.accounts[0] = { ...report.accounts[0], name: "Thistlewood Claude", ownerName: "Marisol Quenby" };
+ report.accounts.push({ ...report.accounts[0], id: "account-2", name: "Larkspur Claude seat", price: { ...report.accounts[0].price, revision: 3 } });
+ await render(report); await click("View details");
+ expect(replayLeaks("Thistlewood Claude", document.body)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Marisol Quenby", document.body)).toEqual({ rendered: true, recorded: false });
+ await click("Edit price");
+ expect(replayLeaks("Larkspur Claude seat", document.body)).toEqual({ rendered: true, recorded: false });
+ });
});
diff --git a/ui/src/components/SubscriptionCostCard.tsx b/ui/src/components/SubscriptionCostCard.tsx
index 83bccc8c8a9..05dfcda3294 100644
--- a/ui/src/components/SubscriptionCostCard.tsx
+++ b/ui/src/components/SubscriptionCostCard.tsx
@@ -2,13 +2,14 @@ import { useState } from "react";
import { useMutation } from "@tanstack/react-query";
import { SUBSCRIPTION_CURRENCIES, centsToUsd, usdToCents, type SubscriptionAccountReport, type SubscriptionCostReport, type SubscriptionUsage } from "@paperclipai/shared";
import { subscriptionsApi } from "../api/subscriptions";
-import { formatCents, formatDateTime, formatTokens, providerDisplayName } from "../lib/utils";
+import { cn, formatCents, formatDateTime, formatTokens, providerDisplayName } from "../lib/utils";
import { Button } from "./ui/button";
import { Badge } from "./ui/badge";
import { Card } from "./ui/card";
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "./ui/dialog";
import { Input } from "./ui/input";
import { Label } from "./ui/label";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export function subscriptionMoney(cents: string, currency: string) {
return currency === "USD" ? formatCents(Number(cents))
@@ -55,7 +56,7 @@ function SubscriptionEditor({ account, accounts, companyId, onDone }: {
{targets.length > 0 &&
Same subscription as another account?
-
setTargetId(event.target.value)}>Choose an account {targets.map(row => {row.name} · {row.price.plan} )}
+
setTargetId(event.target.value)}>Choose an account {targets.map(row => {row.name} · {row.price.plan} )}
Linking counts these accounts once, combines their Paperclip usage, and keeps the selected account’s price. Only link the same subscription or paid seat.
{link.error &&
Could not link these accounts. Reopen their details and try again.
}
link.mutate()}>Link accounts
@@ -97,7 +98,7 @@ export function SubscriptionCostCard({ companyId, report, error, onChanged }: {
{report?.accounts.length === 0 &&
No subscriptions are visible to you yet. Connect an AI account or run an agent with a connected subscription.
}
{report?.accounts.map(account =>
-
{account.name}
{account.shared ? "Shared" : account.ownerName ?? (account.ownerUserId ? "Account owner" : "Personal accounts")} · {providerDisplayName(account.provider)} · {account.price.plan}
+
{account.name}
{account.shared ? "Shared" : account.ownerName ?? (account.ownerUserId ? "Account owner" : "Personal accounts")} · {providerDisplayName(account.provider)} · {account.price.plan}
{account.price.status !== "active" ? account.price.status === "ended" ? "Ended" : "Excluded" : account.price.monthlyCents == null ? "Price unknown" : `${subscriptionMoney(account.price.monthlyCents, account.price.currency)}/month`}
{account.price.source === "catalog" ? "Estimated · before tax" : account.price.source === "user" ? "User supplied" : ""}{account.price.cadence === "year" ? " · annual payment ÷ 12" : ""}
diff --git a/ui/src/components/TailscaleSshMachine.tsx b/ui/src/components/TailscaleSshMachine.tsx
index d7756508ecf..c1815c0b989 100644
--- a/ui/src/components/TailscaleSshMachine.tsx
+++ b/ui/src/components/TailscaleSshMachine.tsx
@@ -6,6 +6,8 @@ import { useTailscaleConnections } from "@/hooks/useTailscaleConnections";
import { Link } from "@/lib/router";
import { Button } from "./ui/button";
import { Field } from "./agent-config-primitives";
+import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export function TailscaleSshMachine(props: {
companyId: string; connectionId: string; deviceId: string;
@@ -32,7 +34,7 @@ export function TailscaleSshMachine(props: {
Manage Tailscale connector
{showConnectionSelector ?
- props.onChange({ connectionId: event.target.value, deviceId: "", host: "" })}>
Choose a connection
{props.connectionId && !connected.some(connection => connection.id === props.connectionId) ? Unavailable connection : null}
diff --git a/ui/src/components/TaskDecisionRecord.test.tsx b/ui/src/components/TaskDecisionRecord.test.tsx
index 7c52ad12309..fb63c8fd05e 100644
--- a/ui/src/components/TaskDecisionRecord.test.tsx
+++ b/ui/src/components/TaskDecisionRecord.test.tsx
@@ -8,6 +8,7 @@ import type { DecisionOutcome } from "@/api/decisions";
import type { DecisionHistoryItem } from "@paperclipai/shared";
import { CoordinatorDecisionReceipt } from "./coordinator/CoordinatorDecisionReceipt";
import { TaskDecisionRecord } from "./TaskDecisionRecord";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
const mocks = vi.hoisted(() => ({ get: vi.fn(), resolver: vi.fn() }));
vi.mock("@/api/decisions", () => ({ decisionsApi: { get: mocks.get } }));
@@ -76,3 +77,13 @@ it("refreshes the mounted record after company decision events invalidate its re
expect(mocks.get).toHaveBeenCalledTimes(2);
expect(mocks.resolver).toHaveBeenLastCalledWith(expect.objectContaining({ recordedDecision: decision }));
});
+it("keeps the recorded choice, inputs and receipt label out of session replay", async () => {
+ await act(async () => root.render(
+ {}} />
+
+ ));
+ await vi.waitFor(() => expect(host.textContent).toContain("The draft is ready"));
+ expect(replayLeaks("Own blog first", host)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("The draft is ready", host)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Decision record", host)).toEqual({ rendered: true, recorded: true });
+});
diff --git a/ui/src/components/TaskDecisionRecord.tsx b/ui/src/components/TaskDecisionRecord.tsx
index e63b8826fbd..4edf9d4c880 100644
--- a/ui/src/components/TaskDecisionRecord.tsx
+++ b/ui/src/components/TaskDecisionRecord.tsx
@@ -7,6 +7,8 @@ import { queryKeys } from "@/lib/queryKeys";
import { taskChatHashAnchor } from "./task-chat/scroll-navigation";
import { DecisionResolver } from "./DecisionResolver";
import { Button } from "./ui/button";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
/** A selected Decisions-v1 record belongs to its task, not a second history tab. */
export function TaskDecisionRecord({ companyId, issueId, viewerId, agentMap }: {
@@ -28,7 +30,7 @@ export function TaskDecisionRecord({ companyId, issueId, viewerId, agentMap }: {
{["loading", "reconnecting"].includes(recordView.kind) ? Loading decision…
: (recordView.kind === "error") ? (
Could not load this decision.
void record.refetch()}>Retry
) : !matchesTask ? This decision is not available in this task.
: <>
- {decision.status !== "open" ?
+ {decision.status !== "open" ?
Recorded choice {choice?.label ?? (decision.chosenOptionId === "dismissed" ? "Dismissed" : decision.status)}
{(decision.inputs ?? []).filter((input) => decision.inputValues?.[input.id] !== undefined).map((input) =>
{input.label} {decision.inputValues![input.id]}
diff --git a/ui/src/components/ToastViewport.test.tsx b/ui/src/components/ToastViewport.test.tsx
index cdf0babd014..ba63c222db1 100644
--- a/ui/src/components/ToastViewport.test.tsx
+++ b/ui/src/components/ToastViewport.test.tsx
@@ -4,6 +4,7 @@ import { createRoot } from "react-dom/client";
import { describe, expect, it, vi } from "vitest";
import { ToastProvider, useToastActions, type ToastInput } from "../context/ToastContext";
import { ToastViewport } from "./ToastViewport";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);
vi.stubGlobal("requestAnimationFrame", (callback: () => void) => setTimeout(callback, 0));
@@ -25,3 +26,14 @@ describe("notification avatars", () => {
} finally { act(() => root.unmount()); }
});
});
+describe("toast session replay", () => {
+ it("masks both the title and the body", () => {
+ const container = document.createElement("div");
+ const root = createRoot(container);
+ try {
+ act(() => root.render(
));
+ expect(replayLeaks("ops@globex.com", container)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Globex workspace connected", container)).toEqual({ rendered: true, recorded: false });
+ } finally { act(() => root.unmount()); }
+ });
+});
diff --git a/ui/src/components/ToastViewport.tsx b/ui/src/components/ToastViewport.tsx
index 9205814af00..4b168064478 100644
--- a/ui/src/components/ToastViewport.tsx
+++ b/ui/src/components/ToastViewport.tsx
@@ -11,6 +11,7 @@ import {
type ToastTone,
} from "../context/ToastContext";
import { cn } from "../lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const toneClasses: Record
= {
info: "border-sky-300 bg-sky-50 text-sky-900 dark:border-sky-500/25 dark:bg-sky-950/60 dark:text-sky-100",
@@ -61,7 +62,7 @@ function AnimatedToast({
) : (
)}
-
+
{toast.title}
{toast.body && (
diff --git a/ui/src/components/actions/ActionCard.tsx b/ui/src/components/actions/ActionCard.tsx
index 2c9ad9d438f..60585b01f58 100644
--- a/ui/src/components/actions/ActionCard.tsx
+++ b/ui/src/components/actions/ActionCard.tsx
@@ -7,6 +7,7 @@ import { Button } from "@/components/ui/button";
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
import { EnforcementBanner } from "@/components/EnforcementBanner";
import { CapabilityBadges, DecisionBadge, RiskBadge } from "@/pages/tools/shared";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/**
* Action approval card (PAP-10787 / PAP-10778, surfaces 11/12/99).
@@ -267,7 +268,7 @@ export function ActionCard({
{/* JSON input */}
@@ -275,7 +276,7 @@ export function ActionCard({
{/* Why I'm asking */}
Why I'm asking
-
+
{reason}
{policyNumber != null ? (
<>
diff --git a/ui/src/components/ai-connections/AiConnectionAccountControls.test.tsx b/ui/src/components/ai-connections/AiConnectionAccountControls.test.tsx
new file mode 100644
index 00000000000..762d3ca2bbd
--- /dev/null
+++ b/ui/src/components/ai-connections/AiConnectionAccountControls.test.tsx
@@ -0,0 +1,18 @@
+// @vitest-environment jsdom
+import { renderToStaticMarkup } from "react-dom/server";
+import { afterEach, expect, it, vi } from "vitest";
+import type { ConnectionGrant } from "@paperclipai/shared";
+import { AiConnectionAccountControls } from "./AiConnectionAccountControls";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
+
+afterEach(() => { document.body.innerHTML = ""; });
+
+it("masks the account label line in session replay", () => {
+ document.body.innerHTML = renderToStaticMarkup( );
+ expect(replayLeaks("tamsin.vale@example.test")).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Reconnect")).toEqual({ rendered: true, recorded: true });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionAccountControls.tsx b/ui/src/components/ai-connections/AiConnectionAccountControls.tsx
index 27e4c17a594..4453ecb3087 100644
--- a/ui/src/components/ai-connections/AiConnectionAccountControls.tsx
+++ b/ui/src/components/ai-connections/AiConnectionAccountControls.tsx
@@ -8,6 +8,7 @@ import { AI_PROVIDERS, type AiConnectionSummary } from "./model";
import { describeError } from "@/api/errors";
import { AiDefaultCrown } from "./AiConnectionDefault";
import { isOwnAiAccount } from "./useAiConnectionDefaults";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/** AI-only account controls; identity, access and navigation belong to AppDetail. */
export function AiConnectionAccountControls({
@@ -48,7 +49,7 @@ export function AiConnectionAccountControls({
)}
-
{account.method === "subscription" ? "Subscription" : "API key"}{account.accountLabel ? ` · ${account.accountLabel}` : ""}
+
{account.method === "subscription" ? "Subscription" : "API key"}{account.accountLabel ? ` · ${account.accountLabel}` : ""}
{!readOnly && grant.capabilities?.canRevoke && (
diff --git a/ui/src/components/ai-connections/AiConnectionAccountDetails.test.tsx b/ui/src/components/ai-connections/AiConnectionAccountDetails.test.tsx
index b69086cea3d..c6178f4a05f 100644
--- a/ui/src/components/ai-connections/AiConnectionAccountDetails.test.tsx
+++ b/ui/src/components/ai-connections/AiConnectionAccountDetails.test.tsx
@@ -7,6 +7,7 @@ import type { AiConnectionAccountIdentity, AiManagedConnectionSummary, Connectio
import { AiConnectionAccountDetails } from "./AiConnectionAccountDetails";
import { ManagedAiConnectionDetails } from "./ManagedAiConnectionDetails";
import { TooltipProvider } from "@/components/ui/tooltip";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
vi.mock("@/lib/router", () => ({ useNavigate: () => vi.fn() }));
vi.mock("@/api/auth", () => ({ authApi: { getSession: vi.fn(async () => ({ user: { id: "user" } })) } }));
@@ -156,3 +157,10 @@ it("reuses recent identity observations and invalidates them after reconnect", a
expect(host.textContent).toContain("new-account@example.test");
expect(host.textContent).not.toContain("avery@example.test");
});
+
+it("masks the provider account and organization labels in session replay", async () => {
+ observation = { ...known, accountLabel: "perrin.ashdown@example.test", organizationLabel: "Brackenridge Analytics" };
+ await render();
+ expect(replayLeaks("perrin.ashdown@example.test", document.body)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Brackenridge Analytics", document.body)).toEqual({ rendered: true, recorded: false });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionAccountDetails.tsx b/ui/src/components/ai-connections/AiConnectionAccountDetails.tsx
index 75bf0c94a81..c39b44d81e4 100644
--- a/ui/src/components/ai-connections/AiConnectionAccountDetails.tsx
+++ b/ui/src/components/ai-connections/AiConnectionAccountDetails.tsx
@@ -5,6 +5,8 @@ import { describeError } from "@/api/errors";
import { retryTransientOnly } from "@/lib/query-client";
import { Button } from "@/components/ui/button";
import { AI_PROVIDERS, aiMethodLabel } from "./model";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
/** Provider profile loading is independent of account access and maintenance controls. */
export function AiConnectionAccountDetails({ account, grant }: {
@@ -28,10 +30,10 @@ export function AiConnectionAccountDetails({ account, grant }: {
Connected account
{AI_PROVIDERS[account.provider].name} account
- {accountLabel ?? "Not available"}
+ {accountLabel ?? "Not available"}
{(isChatGpt || identity.data?.organizationLabel) && <>
{isChatGpt ? "ChatGPT workspace" : "Organization"}
- {identity.data?.organizationLabel ?? (identity.isPending && canLookUp ? "Checking…" : "Not available")}
+ {identity.data?.organizationLabel ?? (identity.isPending && canLookUp ? "Checking…" : "Not available")}
>}
Sign-in method
{aiMethodLabel(account.provider, account.method)}
diff --git a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx
index 83a7af6a4d0..98612f09eec 100644
--- a/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx
+++ b/ui/src/components/ai-connections/AiConnectionCredentialStep.tsx
@@ -15,6 +15,7 @@ import { instanceSettingsApi } from "@/api/instanceSettings";
import { queryKeys } from "@/lib/queryKeys";
import { resolveAdapterTestEnvironmentId, resolveLocalDefaultEnvironmentId, resolveManagedSandboxEnvironmentId } from "@/lib/adapter-test-environment";
import { resolveForcedKubernetesEnvironment } from "@/lib/forced-kubernetes-environment";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type Props = {
companyId: string;
@@ -87,8 +88,8 @@ function SubscriptionConnectionStep({ companyId, provider, initialMethod, fixedM
return
{!hideName &&
Connection name setName(event.target.value)} disabled={Boolean(connectionId)} /> }
{!suppliedEnvironmentId && !forced.forced && loginEnvironments.length > 1 &&
-
- {loginEnvironments.map((env) => {env.name} )}
+
+ {loginEnvironments.map((env) => {env.name} )}
}
{loadError ?
: environmentError ?
{environmentError}
: null}
@@ -131,8 +132,8 @@ function ApiKeyConnectionStep({ companyId, provider, connectionId, name: initial
{save.error &&
{describeError(save.error).body}
}
{copilot &&
Use a personal fine-grained token with Copilot Requests permission. GitHub token instructions . Verification discovers models in the selected environment and sends no model prompt. Repository access uses a separate connection.
}
{copilot && !suppliedEnvironmentId &&
-
- {(envs.data ?? []).filter(env => env.status === "active").map(env => {env.name} )}
+
+ {(envs.data ?? []).filter(env => env.status === "active").map(env => {env.name} )}
}
{environmentError &&
{environmentError}
}
{defaults}
diff --git a/ui/src/components/ai-connections/AiConnectionDefault.tsx b/ui/src/components/ai-connections/AiConnectionDefault.tsx
index b5ee6fe8d93..90fa8ad5b01 100644
--- a/ui/src/components/ai-connections/AiConnectionDefault.tsx
+++ b/ui/src/components/ai-connections/AiConnectionDefault.tsx
@@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button";
import { DropdownMenuItem } from "@/components/ui/dropdown-menu";
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
import { AI_PROVIDERS } from "./model";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export function AiDefaultCrown({ account }: { account: Pick
}) {
const [open, setOpen] = useState(false);
@@ -16,7 +17,7 @@ export function AiDefaultCrown({ account }: { account: Pick
- {label}
+ {label}
;
}
diff --git a/ui/src/components/ai-connections/AiConnectionField.test.tsx b/ui/src/components/ai-connections/AiConnectionField.test.tsx
index 6525ae11bf3..55712ab15fc 100644
--- a/ui/src/components/ai-connections/AiConnectionField.test.tsx
+++ b/ui/src/components/ai-connections/AiConnectionField.test.tsx
@@ -8,6 +8,7 @@ import type { AiManagedConnectionSummary } from "@paperclipai/shared";
import { AiConnectionField, aiProviderForAdapter } from "./AiConnectionField";
import { ApiError } from "@/api/client";
import type { AiConnectionCredentialStep } from "./AiConnectionCredentialStep";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
const mocks = vi.hoisted(() => ({ list: vi.fn(), setDefault: vi.fn() }));
let credentialProps: ComponentProps | undefined;
@@ -235,3 +236,21 @@ it("shows readable copy with a retry when connections cannot be loaded", async (
expect(document.body.textContent).toContain("Reconnect account");
expect(document.body.textContent).not.toContain("Retry connections");
});
+
+it("masks the adoption dialog's account label in session replay", async () => {
+ const personal = account({ id: "00000000-0000-4000-8000-000000000011", grantId: "00000000-0000-4000-8000-000000000012", provider: "openai", method: "api_key", name: "OpenAI", accountLabel: "solenne.drake@example.test", status: "connected", isDefault: false });
+ mocks.list.mockResolvedValue({ currentUserId: "owner", connections: [personal], canManageConnections: true });
+ flushSync(() => root.render(
+
+ ));
+ await settle();
+ await click("Choose a managed connection");
+ const trigger = container.querySelector('[role="combobox"][aria-label="Connection"]')!;
+ flushSync(() => trigger.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true })));
+ await settle();
+ flushSync(() => [...document.querySelectorAll('[role="option"]')].find(choice => choice.textContent?.includes("solenne.drake@example.test"))!.click());
+ await settle();
+ const dialog = document.querySelector('[role="dialog"]')!;
+ expect(replayLeaks("solenne.drake@example.test", dialog)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Adopt Connections for Nova", dialog)).toEqual({ rendered: true, recorded: false });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionField.tsx b/ui/src/components/ai-connections/AiConnectionField.tsx
index eb0bbfbb7b7..fbf560a48ab 100644
--- a/ui/src/components/ai-connections/AiConnectionField.tsx
+++ b/ui/src/components/ai-connections/AiConnectionField.tsx
@@ -27,6 +27,8 @@ import {
DialogDescription,
DialogFooter,
} from "@/components/ui/dialog";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function aiProviderForAdapter(
adapterType: string,
@@ -143,7 +145,7 @@ export function AiConnectionField({
)}
{(compatiblePools.length > 0 || value?.mode === "router") &&
AI connection
- {
+ {
if (event.target.value) changeBinding({ mode: "router", connectionId: event.target.value });
else changeBinding({ mode: "responsible_user", provider, method });
}}>
@@ -178,14 +180,14 @@ export function AiConnectionField({
if (!open) setPendingAdoption(undefined);
}}
>
-
+
- {pendingAdoption?.mode === "router" ? `Use ${accounts.data?.pools?.find(pool => pool.id === pendingAdoption.connectionId)?.name ?? "this pool"}?` : `Adopt Connections for ${agentName}`}
+ {pendingAdoption?.mode === "router" ? `Use ${accounts.data?.pools?.find(pool => pool.id === pendingAdoption.connectionId)?.name ?? "this pool"}?` : `Adopt Connections for ${agentName}`}
{pendingAdoption?.mode === "router" ? "Reset existing sessions that use an account outside this pool." : "Saving validates access to the selected connection. Existing sessions keep their account or require an explicit reset before adoption."}
- {pendingAdoption?.mode !== "router" &&
+ {pendingAdoption?.mode !== "router" &&
{pendingAdoption?.mode === "responsible_user"
? `Responsible user’s default. For you: ${pendingAccount ? aiConnectionDisplayLabel(pendingAccount) : "Not connected"}. Other users use their own default.`
: pendingAccount && aiConnectionDisplayLabel(pendingAccount)}
@@ -213,7 +215,7 @@ export function AiConnectionField({
{ if (!selectDefault.isPending) setConnecting(open); }}>
-
+
{reconnecting ? "Reconnect account" : "Connect account"}
diff --git a/ui/src/components/ai-connections/AiConnectionIdentity.test.tsx b/ui/src/components/ai-connections/AiConnectionIdentity.test.tsx
new file mode 100644
index 00000000000..995b589ec25
--- /dev/null
+++ b/ui/src/components/ai-connections/AiConnectionIdentity.test.tsx
@@ -0,0 +1,17 @@
+// @vitest-environment jsdom
+import { renderToStaticMarkup } from "react-dom/server";
+import { afterEach, expect, it } from "vitest";
+import { AiConnectionIdentity } from "./AiConnectionIdentity";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
+
+afterEach(() => { document.body.innerHTML = ""; });
+
+it("masks the connection name and account label in session replay", () => {
+ document.body.innerHTML = renderToStaticMarkup( );
+ expect(replayLeaks("Zephyr Labs Claude")).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("quill.marten@example.test")).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Company shared")).toEqual({ rendered: true, recorded: true });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionIdentity.tsx b/ui/src/components/ai-connections/AiConnectionIdentity.tsx
index b35aebbbfd4..23d71aead47 100644
--- a/ui/src/components/ai-connections/AiConnectionIdentity.tsx
+++ b/ui/src/components/ai-connections/AiConnectionIdentity.tsx
@@ -5,6 +5,8 @@ import {
aiMethodLabel,
type AiConnectionSummary,
} from "./model";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function AiConnectionIdentity({
connection,
@@ -17,10 +19,10 @@ export function AiConnectionIdentity({
-
+
{connection.name}
-
+
{provider.name} ·{" "}
{aiMethodLabel(connection.provider, connection.method)}
{connection.accountLabel ? ` · ${connection.accountLabel}` : ""}
diff --git a/ui/src/components/ai-connections/AiConnectionPicker.test.tsx b/ui/src/components/ai-connections/AiConnectionPicker.test.tsx
new file mode 100644
index 00000000000..f1fcbe53184
--- /dev/null
+++ b/ui/src/components/ai-connections/AiConnectionPicker.test.tsx
@@ -0,0 +1,25 @@
+// @vitest-environment jsdom
+import { renderToStaticMarkup } from "react-dom/server";
+import { afterEach, expect, it, vi } from "vitest";
+import { AiConnectionPicker } from "./AiConnectionPicker";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
+
+afterEach(() => { document.body.innerHTML = ""; });
+
+it("masks a shared connection's account label in session replay", () => {
+ document.body.innerHTML = renderToStaticMarkup( );
+ expect(replayLeaks("orla.brisk@example.test")).toEqual({ rendered: true, recorded: false });
+});
+
+it("masks the responsible user's default connection name in session replay", () => {
+ document.body.innerHTML = renderToStaticMarkup( );
+ expect(replayLeaks("Orla's Claude Max")).toEqual({ rendered: true, recorded: false });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionPicker.tsx b/ui/src/components/ai-connections/AiConnectionPicker.tsx
index a781deb7e83..b3738bab67d 100644
--- a/ui/src/components/ai-connections/AiConnectionPicker.tsx
+++ b/ui/src/components/ai-connections/AiConnectionPicker.tsx
@@ -13,6 +13,7 @@ import {
type AiConnectionRequirement,
type AiConnectionSummary,
} from "./model";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export interface AiConnectionPickerProps {
requirement: AiConnectionRequirement;
@@ -110,13 +111,13 @@ export function AiConnectionPicker({
selectedId={value?.mode === "responsible_user" ? "responsible_user" : value?.connectionId}
choices={[
{ id: "responsible_user", name: "Responsible user’s connection", description: <>
- For you: {personalDefault?.name ?? "Not connected"}
+ For you: {personalDefault?.name ?? "Not connected"}
Other users’ tasks use their own {AI_PROVIDERS[requirement.provider].name} connection.
> },
...compatible.filter((connection) => connection.ownership === "shared").map((connection) => ({
id: connection.id, name: connection.name,
disabled: Boolean(aiConnectionProblem(connection)),
- description: <>Company shared · {aiMethodLabel(connection.provider, connection.method)}{connection.accountLabel ? ` · ${connection.accountLabel}` : ""}{aiConnectionProblem(connection) ? ` · ${aiConnectionProblem(connection)}` : ""}>,
+ description: <>Company shared · {aiMethodLabel(connection.provider, connection.method)}{connection.accountLabel ? {` · ${connection.accountLabel}`} : ""}{aiConnectionProblem(connection) ? ` · ${aiConnectionProblem(connection)}` : ""}>,
})),
]}
onSelect={(id) => {
diff --git a/ui/src/components/ai-connections/AiConnectionPoolConnector.tsx b/ui/src/components/ai-connections/AiConnectionPoolConnector.tsx
index 624c2c636d4..e8522e9b601 100644
--- a/ui/src/components/ai-connections/AiConnectionPoolConnector.tsx
+++ b/ui/src/components/ai-connections/AiConnectionPoolConnector.tsx
@@ -26,6 +26,8 @@ import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent,
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@/components/ui/dropdown-menu";
import { AiConnectionUsagePanel } from "./AiConnectionUsagePanel";
import { AI_PROVIDERS, aiMethodLabel } from "./model";
+import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const configOf = ({ name, enabled, members, mode, thresholdPercent }: AiConnectionPoolConfig): AiConnectionPoolConfig => ({ name, enabled, members, mode, thresholdPercent });
const emptyConfig = (): AiConnectionPoolConfig => ({ name: "AI connection pool", enabled: false, members: [], mode: "round_robin", thresholdPercent: 90 });
@@ -134,7 +136,7 @@ function PoolConnector({ companyId, pluginKey, connection }: { companyId: string
return
{index + 1}
- {account?.name ?? "Connection unavailable"}
{account ? aiMethodLabel(account.provider, account.method) : "Restore access to this connection."}
{connection && draft.mode === "usage_aware" && account &&
Usage {inspectionError ?
{inspectionError}
:
}
}
+ {account?.name ?? "Connection unavailable"}
{account ? aiMethodLabel(account.provider, account.method) : "Restore access to this connection."}
{connection && draft.mode === "usage_aware" && account &&
Usage {inspectionError ?
{inspectionError}
:
}
}
move(index, -1)}>
move(index, 1)}>
@@ -147,12 +149,12 @@ function PoolConnector({ companyId, pluginKey, connection }: { companyId: string
return
{connection ?
{ if (!disabled) { setNameDraft(draft.name); setRenaming(true); } }} onRenameCancel={() => setRenaming(false)} onRenameSubmit={value => void save({ ...draft, name: value })} />
- { setError(""); setRemoving(true); }}> Remove connection
+ { setError(""); setRemoving(true); }}> Remove connection
:
}
{unavailable &&
{entry?.availability?.reason ?? "Enable the connection pool plugin in Plugins."}
}
{!canManage &&
A connection manager can edit this pool.
}
{error && !removing &&
{error}
}
- {!connection && step === 0 ?
setDraft({ ...draft, members })} onRefresh={() => void accountsQuery.refetch()} /> :
+ {!connection && step === 0 ?
setDraft({ ...draft, members })} onRefresh={() => void accountsQuery.refetch()} /> :
{connection &&
Connections { setPickerMembers(draft.members); setPickerOpen(true); }}> Add connections }
{orderedMembers}
{connection ? "Order changes apply to new tasks." : "Created paused. Enable it when you’re ready."}
@@ -161,7 +163,7 @@ function PoolConnector({ companyId, pluginKey, connection }: { companyId: string
Advanced
setDraft({ ...draft, mode: checked ? "usage_aware" : "round_robin" })} />Skip connections near their usage limit
{draft.mode === "usage_aware" && Skip at setDraft({ ...draft, thresholdPercent: Number(event.target.value) })} />% usage }
- {draft.members.map((member, index) => )}
+ {draft.members.map((member, index) => )}
Used by
@@ -176,17 +178,17 @@ function PoolConnector({ companyId, pluginKey, connection }: { companyId: string
connection ? navigate("/apps") : step ? setStep(0) : navigate("/apps")}>{!connection && step ? "Back" : "Cancel"}
100} onClick={() => !connection && step === 0 ? setStep(1) : void save()}>{busy && }{busy ? "Saving…" : connection ? "Save changes" : step ? "Create pool" : "Continue"}
- Add connections Choose connections you already use. void accountsQuery.refetch()} /> setPickerOpen(false)}>Cancel { setDraft({ ...draft, members: pickerMembers }); setPickerOpen(false); }}>Done
- { if (!busy) setRemoving(open); }}>Remove {draft.name}? The connections in this pool are kept. {error && {error}
}Cancel { event.preventDefault(); void remove(); }}>{busy ? "Removing…" : "Remove connection"}
+ Add connections Choose connections you already use. void accountsQuery.refetch()} /> setPickerOpen(false)}>Cancel { setDraft({ ...draft, members: pickerMembers }); setPickerOpen(false); }}>Done
+ { if (!busy) setRemoving(open); }}>Remove {draft.name}? The connections in this pool are kept. {error && {error}
}Cancel { event.preventDefault(); void remove(); }}>{busy ? "Removing…" : "Remove connection"}
;
}
function ConnectionPicker({ accounts, selected, disabled, onChange, onRefresh }: { accounts: AiManagedConnectionSummary[]; selected: AiConnectionPoolMember[]; disabled: boolean; onChange: (members: AiConnectionPoolMember[]) => void; onRefresh: () => void }) {
const [search, setSearch] = useState("");
const filtered = accounts.filter(account => `${account.name} ${AI_PROVIDERS[account.provider].name}`.toLowerCase().includes(search.toLowerCase()));
- return
+ return
setSearch(event.target.value)} className="pl-9" />
- {filtered.map(account => { const existing = selected.find(member => member.binding.connectionId === account.id); const checked = existing?.binding.grantId === account.grantId; return
onChange(value ? [...selected, memberOf(account)] : selected.filter(member => member.binding.connectionId !== account.id))} aria-label={account.name} />{account.name} {aiMethodLabel(account.provider, account.method)} · {account.ownership === "shared" ? "Shared" : "Personal"} {account.status !== "connected" && Needs attention } ; })}
+ {filtered.map(account => { const existing = selected.find(member => member.binding.connectionId === account.id); const checked = existing?.binding.grantId === account.grantId; return
onChange(value ? [...selected, memberOf(account)] : selected.filter(member => member.binding.connectionId !== account.id))} aria-label={account.name} />{account.name} {aiMethodLabel(account.provider, account.method)} · {account.ownership === "shared" ? "Shared" : "Personal"} {account.status !== "connected" && Needs attention } ; })}
{filtered.length === 0 &&
{accounts.length ? "No matching connections." : "No AI connections yet."}
}
Connect a new accountRefresh
diff --git a/ui/src/components/ai-connections/AiConnectionPoolRunDetails.test.tsx b/ui/src/components/ai-connections/AiConnectionPoolRunDetails.test.tsx
new file mode 100644
index 00000000000..1994e2088a5
--- /dev/null
+++ b/ui/src/components/ai-connections/AiConnectionPoolRunDetails.test.tsx
@@ -0,0 +1,16 @@
+// @vitest-environment jsdom
+import { renderToStaticMarkup } from "react-dom/server";
+import { afterEach, expect, it } from "vitest";
+import { AiConnectionPoolRunDetails } from "./AiConnectionPoolRunDetails";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
+
+afterEach(() => { document.body.innerHTML = ""; });
+
+it("masks the pinned pool account name in session replay", () => {
+ document.body.innerHTML = renderToStaticMarkup(
);
+ expect(replayLeaks("Juniper Ops Pool Account")).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("claude-sonnet")).toEqual({ rendered: true, recorded: true });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionPoolRunDetails.tsx b/ui/src/components/ai-connections/AiConnectionPoolRunDetails.tsx
index 34e75fe2ae0..db07523c012 100644
--- a/ui/src/components/ai-connections/AiConnectionPoolRunDetails.tsx
+++ b/ui/src/components/ai-connections/AiConnectionPoolRunDetails.tsx
@@ -1,4 +1,6 @@
import type { AiConnectionRouterSelection } from "@paperclipai/shared";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function AiConnectionPoolRunDetails({ context }: { context: Record
| null }) {
const selection = context?.aiRouterSelection as AiConnectionRouterSelection | undefined;
@@ -7,7 +9,7 @@ export function AiConnectionPoolRunDetails({ context }: { context: Record
- Task-pinned pool account · {account?.accountName ?? account?.connectionId ?? "Selected account"}
+ Task-pinned pool account · {account?.accountName ?? account?.connectionId ?? "Selected account"}
{[selection.binding.provider, config.provider, config.acpxAgent, config.model, effort].filter(Boolean).map(String).join(" · ")}
{selection.notes.length > 0 && {selection.notes.join(" ")}
}
;
diff --git a/ui/src/components/ai-connections/AiConnectionSelect.test.tsx b/ui/src/components/ai-connections/AiConnectionSelect.test.tsx
new file mode 100644
index 00000000000..411d87164af
--- /dev/null
+++ b/ui/src/components/ai-connections/AiConnectionSelect.test.tsx
@@ -0,0 +1,39 @@
+// @vitest-environment jsdom
+import { flushSync } from "react-dom";
+import { createRoot, type Root } from "react-dom/client";
+import { afterEach, beforeEach, expect, it, vi } from "vitest";
+import { AiConnectionSelect } from "./AiConnectionSelect";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
+
+vi.mock("@/pages/apps/AppLogo", () => ({ AppLogo: () => null }));
+
+let root: Root;
+let container: HTMLDivElement;
+beforeEach(() => {
+ container = document.createElement("div");
+ document.body.append(container);
+ root = createRoot(container);
+});
+afterEach(() => { flushSync(() => root.unmount()); container.remove(); });
+
+it("masks the selected connection in the trigger and the account labels in the open list", async () => {
+ const connections = [
+ { id: "selected", grantId: "selected-grant", companyId: "company", provider: "anthropic" as const, method: "api_key" as const,
+ name: "Claude key", accountLabel: "wren.halloway@example.test", ownership: "shared" as const, status: "connected" as const },
+ { id: "other", grantId: "other-grant", companyId: "company", provider: "anthropic" as const, method: "api_key" as const,
+ name: "Claude backup", accountLabel: "ivo.castellan@example.test", ownership: "shared" as const, status: "connected" as const },
+ ];
+ flushSync(() => root.render(
));
+ const trigger = container.querySelector
('[role="combobox"][aria-label="Connection"]')!;
+ expect(replayLeaks("wren.halloway@example.test", trigger)).toEqual({ rendered: true, recorded: false });
+ flushSync(() => trigger.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true })));
+ await new Promise(resolve => setTimeout(resolve, 0));
+ flushSync(() => {});
+ expect(document.querySelectorAll('[role="option"]').length).toBeGreaterThan(0);
+ expect(replayLeaks("ivo.castellan@example.test", document.body)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("wren.halloway@example.test", document.body)).toEqual({ rendered: true, recorded: false });
+ expect(replayLeaks("Connect an account", document.body)).toEqual({ rendered: true, recorded: false });
+});
diff --git a/ui/src/components/ai-connections/AiConnectionSelect.tsx b/ui/src/components/ai-connections/AiConnectionSelect.tsx
index 1eb36785f1e..786bb4a6e91 100644
--- a/ui/src/components/ai-connections/AiConnectionSelect.tsx
+++ b/ui/src/components/ai-connections/AiConnectionSelect.tsx
@@ -17,12 +17,14 @@ import { Button } from "@/components/ui/button";
import { aiConnectionDisplayLabel, aiConnectionProblem, personalAiDefault } from "./model";
import type { AiConnectionPickerProps } from "./AiConnectionPicker";
import type { AiConnectionSummary } from "./model";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
function ConnectionLabel({ connection, label, wrap = false }: { connection: AiConnectionSummary; label?: string; wrap?: boolean }) {
return (
- {label ?? aiConnectionDisplayLabel(connection)}
+ {label ?? aiConnectionDisplayLabel(connection)}
);
}
@@ -119,7 +121,7 @@ export function AiConnectionSelect({
onValueChange={change}
disabled={readOnly || loading || Boolean(error)}
>
-
+
-
+
{incompatible && selected && (
diff --git a/ui/src/components/ai-connections/AiProviderSetup.tsx b/ui/src/components/ai-connections/AiProviderSetup.tsx
index e80a0f8c94b..a2740eb6eec 100644
--- a/ui/src/components/ai-connections/AiProviderSetup.tsx
+++ b/ui/src/components/ai-connections/AiProviderSetup.tsx
@@ -26,6 +26,8 @@ import {
SelectValue,
} from "@/components/ui/select";
import { AiConnectionCredentialStep } from "./AiConnectionCredentialStep";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
const providers = [
{
@@ -356,10 +358,10 @@ export function AiProviderSetup({
}}
disabled={Boolean(reconnect) || Boolean(initialProtocol)}
>
-
+
-
+
OpenAI Responses · Codex
@@ -393,10 +395,10 @@ export function AiProviderSetup({
onValueChange={(v) => setAuth(v as typeof auth)}
disabled={Boolean(reconnect)}
>
-
+
-
+
{provider === "bedrock"
? "Bedrock API key"
diff --git a/ui/src/components/artifacts/ArtifactCard.tsx b/ui/src/components/artifacts/ArtifactCard.tsx
index db426c518f5..c383a1ab1fc 100644
--- a/ui/src/components/artifacts/ArtifactCard.tsx
+++ b/ui/src/components/artifacts/ArtifactCard.tsx
@@ -3,6 +3,7 @@ import { Download, ExternalLink, Paperclip, Play } from "lucide-react";
import type { CompanyArtifact } from "@/api/artifacts";
import { Link } from "@/lib/router";
import { cn, formatDate } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
interface ArtifactCardProps {
artifact: CompanyArtifact;
@@ -141,7 +142,7 @@ function TextPreview({ artifact }: { artifact: PreviewArtifact }) {
return (
diff --git a/ui/src/components/artifacts/RichArtifactCards.tsx b/ui/src/components/artifacts/RichArtifactCards.tsx
index 04d36e0e0ff..65380ba9b42 100644
--- a/ui/src/components/artifacts/RichArtifactCards.tsx
+++ b/ui/src/components/artifacts/RichArtifactCards.tsx
@@ -31,6 +31,8 @@ import {
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
// Renderers contain UI labels only. All artifact-specific content is passed in.
// Example values live exclusively in the individual stories' args.
@@ -306,7 +308,7 @@ export function CommitCard(props: CommitCardProps) {
function Markdown({ body, preview = false }: { body: string; preview?: boolean }) {
return (
-
+
patch
- ?
+ : "m-0 min-w-0 whitespace-pre-wrap wrap-anywhere font-mono text-xs leading-5", ANALYTICS_MASK_CLASS)}>
: ;
return (
@@ -451,7 +453,7 @@ export interface DataCardProps extends ArtifactIdentity {
function DataTable({ columns, rows }: Pick) {
return (
-
+
{columns.map((column, i) => (
diff --git a/ui/src/components/chat/AgentChannelsPanel.tsx b/ui/src/components/chat/AgentChannelsPanel.tsx
index fc4193f4937..cebc00b8398 100644
--- a/ui/src/components/chat/AgentChannelsPanel.tsx
+++ b/ui/src/components/chat/AgentChannelsPanel.tsx
@@ -6,6 +6,8 @@ import { Badge } from "@/components/ui/badge";
import { queryKeys } from "@/lib/queryKeys";
import { Link } from "@/lib/router";
import { useChatConnectorsEnabled, chatProviderVisible } from "@/hooks/useChatConnectorsEnabled";
+import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const providerNames: Record = {
speko: "Speko",
@@ -74,7 +76,7 @@ export function AgentChannelsPanel({
{providerNames[endpoint.provider]}
-
+
{endpoint.botLabel ??
endpoint.providerAccountLabel ??
"Provider identity"}
diff --git a/ui/src/components/chat/ExternallyConnectedTaskBanner.test.tsx b/ui/src/components/chat/ExternallyConnectedTaskBanner.test.tsx
index e08a0b0aeee..d2001724f97 100644
--- a/ui/src/components/chat/ExternallyConnectedTaskBanner.test.tsx
+++ b/ui/src/components/chat/ExternallyConnectedTaskBanner.test.tsx
@@ -10,6 +10,7 @@ import { ExternallyConnectedTaskBanner } from "./ExternallyConnectedTaskBanner";
import { boardSendDraftKey, readBoardSendDraft } from "./board-send-draft";
import { ApiError } from "@/api/client";
import { queryKeys } from "@/lib/queryKeys";
+import { replayLeaks } from "@/lib/analytics/replay-recording.test-utils";
const mockSession = vi.hoisted(() => ({ userId: "user-1" }));
vi.mock("@/api/auth", () => ({
authApi: { getSession: vi.fn(async () => ({ user: { id: mockSession.userId } })) },
@@ -177,6 +178,12 @@ describe("ExternallyConnectedTaskBanner publication truth", () => {
autoResendOverride.stalled = false;
});
+ it("keeps the connected channel label out of session replay", async () => {
+ const client = await renderBanner();
+ expect(replayLeaks("#paperclip", container)).toEqual({ rendered: true, recorded: false });
+ client.clear();
+ });
+
it("cancels an automatic resend and hides its draft after an account change", async () => {
mockChatEndpointsApi.publishBoardMessage.mockRejectedValue(new ApiError("Bad gateway", 502, {}));
const client = await renderBanner();
diff --git a/ui/src/components/chat/ExternallyConnectedTaskBanner.tsx b/ui/src/components/chat/ExternallyConnectedTaskBanner.tsx
index 33e6fd7f512..9cba73f3f9e 100644
--- a/ui/src/components/chat/ExternallyConnectedTaskBanner.tsx
+++ b/ui/src/components/chat/ExternallyConnectedTaskBanner.tsx
@@ -41,6 +41,7 @@ import {
} from "./board-send-draft";
import { LegacyBoardSendNotice } from "./LegacyBoardSendNotice";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const providerNames: Record = {
speko: "Speko",
@@ -558,7 +559,7 @@ function ConnectedTaskComposer({
Connected to {providerNames[binding.provider]}
-
+
{binding.externalLabel} · {binding.provider === "slack"
? "Messages you send here and agent replies are also posted to Slack."
: "Agent assignment is fixed for this external task."}
diff --git a/ui/src/components/coordinator/CoordinatorDecisionReceipt.tsx b/ui/src/components/coordinator/CoordinatorDecisionReceipt.tsx
index 1fe18384503..c86d0e14a28 100644
--- a/ui/src/components/coordinator/CoordinatorDecisionReceipt.tsx
+++ b/ui/src/components/coordinator/CoordinatorDecisionReceipt.tsx
@@ -1,6 +1,8 @@
import { ArrowUpRight, Check } from "lucide-react";
import type { DecisionHistoryItem } from "@paperclipai/shared";
import { decisionHistoryContext, decisionHistoryHeadline } from "@/lib/coordinator-attention";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
/** A recorded decision links to its context; it is not a second approval form. */
export function CoordinatorDecisionReceipt({ item, onOpen, userLabelMap }: {
@@ -12,7 +14,7 @@ export function CoordinatorDecisionReceipt({ item, onOpen, userLabelMap }: {
const handledFor = item.handledForUserId ? userLabelMap?.get(item.handledForUserId) ?? "someone else" : null;
return onOpen(item.href)} data-decision-history-item={item.id} className="coordinator-decision-receipt flex w-full items-center gap-3 rounded-xl border border-border bg-card p-4 text-left hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">
-
+
{decisionHistoryHeadline(item, userLabelMap)}{handledFor ? · for @{handledFor} : null}
{decisionHistoryContext(item)}
{/* Who withdrew it is in the headline; the reason they gave is here (PAP-749 plan §3). */}
diff --git a/ui/src/components/coordinator/CoordinatorNeedsYou.tsx b/ui/src/components/coordinator/CoordinatorNeedsYou.tsx
index 0e2e12b02e4..a418b760565 100644
--- a/ui/src/components/coordinator/CoordinatorNeedsYou.tsx
+++ b/ui/src/components/coordinator/CoordinatorNeedsYou.tsx
@@ -43,6 +43,8 @@ import { BlockedTaskCardBody, RecoveryCardBody, ReviewTaskCardBody } from "./Nee
import { NEEDS_YOU_SECTIONS, NeedsYouPanelRow, needsYouSection, type NeedsYouSection } from "./NeedsYouCardKit";
import { NeedsYouAudience, NeedsYouReceiptCard, NeedsYouRequester, NeedsYouTaskLink, NeedsYouTypeLabel, needsYouTaskRef } from "./NeedsYouCardParts";
import { CoordinatorNeedsYouSidePanel, needsYouReviewTab, needsYouReviewTabId, needsYouTabArtifact, type NeedsYouReviewPayload } from "./CoordinatorNeedsYouSidePanel";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
type Group = "type" | "none" | "task" | "agent" | "project";
@@ -320,7 +322,7 @@ export function CoordinatorNeedsYou() {
const title = coordinatorCardTitle(item);
const detail = coordinatorCardDetail(item, attentionDetailLine(item));
// The ask, with one plain line under it (UI1).
- const heading = {title} {detail && !sameText(detail, title) ?
{detail}
: null}
;
+ const heading = {title} {detail && !sameText(detail, title) ?
{detail}
: null}
;
const footerContext = ;
const type = attentionCardType(item);
return
diff --git a/ui/src/components/coordinator/NeedsYouCardKit.tsx b/ui/src/components/coordinator/NeedsYouCardKit.tsx
index 11585abd94f..c1b6a804b37 100644
--- a/ui/src/components/coordinator/NeedsYouCardKit.tsx
+++ b/ui/src/components/coordinator/NeedsYouCardKit.tsx
@@ -2,6 +2,7 @@ import type { ReactNode } from "react";
import { ArrowUpRight } from "lucide-react";
import { attentionCardKind, attentionCardType, type AttentionCardType, type AttentionItem } from "@paperclipai/shared";
import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/**
* The parts every Needs You card is built from (PAP-775, Paper "A · Compact
@@ -90,5 +91,5 @@ export function NeedsYouPanelRow({ icon, title, meta, onOpen, href, label }: {
/** The small grey line at the bottom of a panel. */
export function NeedsYouPanelNote({ children }: { children: ReactNode }) {
- return {children}
;
+ return {children}
;
}
diff --git a/ui/src/components/coordinator/NeedsYouCardParts.tsx b/ui/src/components/coordinator/NeedsYouCardParts.tsx
index 86c99ce578d..3b18b28690e 100644
--- a/ui/src/components/coordinator/NeedsYouCardParts.tsx
+++ b/ui/src/components/coordinator/NeedsYouCardParts.tsx
@@ -17,6 +17,7 @@ import { cn } from "@/lib/utils";
import { timeAgo } from "@/lib/timeAgo";
import { DecisionCardFooter } from "@/components/DecisionCardFooter";
import { NeedsYouPanel, NeedsYouPanelRow, needsYouCardLabel } from "./NeedsYouCardKit";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/**
* Who is asking (PAP-775, UI2): the requester's avatar and name, agent or
@@ -143,8 +144,8 @@ export function NeedsYouReceiptCard({ receipt, userLabelMap, onDismiss, onOpen,
-
{receipt.title ?? "Your request"}
- {receipt.reason ?
{receipt.reason}
: null}
+
{receipt.title ?? "Your request"}
+ {receipt.reason ?
{receipt.reason}
: null}
: }
diff --git a/ui/src/components/decision-models/DecisionHistory.tsx b/ui/src/components/decision-models/DecisionHistory.tsx
index 3cef0509d2f..e9658aaf358 100644
--- a/ui/src/components/decision-models/DecisionHistory.tsx
+++ b/ui/src/components/decision-models/DecisionHistory.tsx
@@ -4,6 +4,7 @@ import { decisionModelsApi } from "@/api/decision-models";
import { Link } from "@/lib/router";
import { formatDateTime, formatTokens, formatDetailedCents } from "@/lib/utils";
import { Button } from "@/components/ui/button";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export function DecisionHistoryTable({ entries, fastResponse = false, fastResponsesEnabled = true }: { entries: (DecisionHistoryEntry & { publicationStatus?: string; connectionName?: string | null })[]; fastResponse?: boolean; fastResponsesEnabled?: boolean }) {
if (!entries.length) return {fastResponse ? "No fast responses in this period." : "No decision requests in this period."} {fastResponse ? fastResponsesEnabled ? "Configure fast response" : "Enable experimental fast responses" : "Configure a decision model"} to run a test.
;
@@ -15,7 +16,7 @@ export function DecisionHistoryTable({ entries, fastResponse = false, fastRespon
{formatDateTime(row.startedAt)}
{row.feature === "settings.test" ? "Setup test" : row.feature}
{row.actorType === "system" ? "Paperclip services" : row.userName ?? (row.responsibleUserId === "local-board" ? "Board" : "Former user")}
{row.issueId ? {row.issueIdentifier ?? "View task"} : "—"}
- {fastResponse && {row.connectionName ?? (row.connectionId ? "Removed connection" : "—")} }
+ {fastResponse && {row.connectionName ?? (row.connectionId ? "Removed connection" : "—")} }
{row.model}
{row.status === "succeeded" ? "Succeeded" : row.status === "running" ? "Running" : row.status === "unknown" ? "Unresolved" : row.status === "skipped" ? "Skipped" : row.status === "pending" ? "Pending" : "Failed"}
{row.publicationStatus && {row.publicationStatus}
}{row.errorCode && {row.errorCode.replaceAll("_", " ")}
}
{row.durationMs === null ? "—" : `${(row.durationMs / 1000).toFixed(1)}s`}
diff --git a/ui/src/components/interrupt-handoff/InterruptHandoffViews.tsx b/ui/src/components/interrupt-handoff/InterruptHandoffViews.tsx
index 1c9049dc768..b0f4630b71d 100644
--- a/ui/src/components/interrupt-handoff/InterruptHandoffViews.tsx
+++ b/ui/src/components/interrupt-handoff/InterruptHandoffViews.tsx
@@ -10,6 +10,7 @@ import {
type ReassignInterruptCopy,
type TimelineAssigneeLike,
} from "../../lib/interrupt-handoff";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/**
* Presentational views for the interrupt-handoff UX clarity surfaces (PAP-10669).
@@ -174,7 +175,7 @@ export function ComposerHandoffPreviewRow({
role="status"
aria-live="polite"
>
- {preview.text}
+ {preview.text}
{preview.chip ? : null}
{preview.suffix ? {preview.suffix} : null}
@@ -337,7 +338,7 @@ export function PauseAffectsSummaryView({
>
{bucket.label}:
{bucket.count}
- — {bucket.detail}
+ — {bucket.detail}
))}
diff --git a/ui/src/components/issue-properties/external-object-rows.tsx b/ui/src/components/issue-properties/external-object-rows.tsx
index 87e7fc01041..dc55317b316 100644
--- a/ui/src/components/issue-properties/external-object-rows.tsx
+++ b/ui/src/components/issue-properties/external-object-rows.tsx
@@ -16,6 +16,7 @@ import { cn } from "../../lib/utils";
import { ExternalObjectStatusIcon } from "../ExternalObjectStatusIcon";
import { PropertyRow } from "./primitives";
import { ExpandRelationListButton } from "./relation-controls";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const EXTERNAL_OBJECT_PROPERTY_PREVIEW_COUNT = 5;
@@ -45,7 +46,7 @@ function externalObjectRowLabel(group: IssueExternalObjectGroup): ReactNode {
return (
{Icon ? : null}
- {displayKey}
+ {displayKey}
);
}
@@ -115,7 +116,7 @@ function ExternalObjectPropertyValue({ group }: { group: IssueExternalObjectGrou
sizeClassName="h-3.5 w-3.5"
label={`${providerLabel}: ${statusLabel}`}
/>
- {value}
+ {value}
>
);
const className = cn(
diff --git a/ui/src/components/routine-triggers/WebhookFields.test.tsx b/ui/src/components/routine-triggers/WebhookFields.test.tsx
new file mode 100644
index 00000000000..81aadd629ec
--- /dev/null
+++ b/ui/src/components/routine-triggers/WebhookFields.test.tsx
@@ -0,0 +1,16 @@
+// @vitest-environment jsdom
+import { renderToStaticMarkup } from "react-dom/server";
+import { afterEach, expect, it } from "vitest";
+import { CopyField } from "./WebhookFields";
+import { isBlockedFromReplay } from "@/lib/analytics/replay-recording.test-utils";
+
+afterEach(() => { document.body.innerHTML = ""; });
+
+it("blocks the webhook URL and secret from session replay", () => {
+ document.body.innerHTML = renderToStaticMarkup(<>
+
+
+ >);
+ expect(isBlockedFromReplay("hook_k4Zr9Qe1", document.body)).toBe(true);
+ expect(isBlockedFromReplay("whsec_Tq8vLm2Rz7Np", document.body)).toBe(true);
+});
diff --git a/ui/src/components/routine-triggers/WebhookFields.tsx b/ui/src/components/routine-triggers/WebhookFields.tsx
index e55e10ebf61..aa2be35dbd1 100644
--- a/ui/src/components/routine-triggers/WebhookFields.tsx
+++ b/ui/src/components/routine-triggers/WebhookFields.tsx
@@ -4,6 +4,7 @@ import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { copyTextToClipboard } from "@/lib/clipboard";
import { AgentSetupPrompt } from "@/components/AgentSetupPrompt";
+import { ANALYTICS_NO_CAPTURE_CLASS } from "@/lib/analytics/privacy";
export function CopyField({
label,
@@ -20,7 +21,7 @@ export function CopyField({
{label}
-
+
{value}
{(run.status === "failed" || run.status === "timed_out") && (
-
+
Failure details
{run.error && (
@@ -568,7 +569,7 @@ export function LogViewer({ run, adapterType }: { run: HeartbeatRun; adapterType
{run.stderrExcerpt && run.stderrExcerpt.trim() && (
stderr excerpt
-
+
{redactPathText(run.stderrExcerpt, censorUsernameInLogs)}
@@ -576,7 +577,7 @@ export function LogViewer({ run, adapterType }: { run: HeartbeatRun; adapterType
{run.resultJson && (
adapter result JSON
-
+
{JSON.stringify(redactPathValue(run.resultJson, censorUsernameInLogs), null, 2)}
@@ -584,7 +585,7 @@ export function LogViewer({ run, adapterType }: { run: HeartbeatRun; adapterType
{run.stdoutExcerpt && run.stdoutExcerpt.trim() && !run.resultJson && (
stdout excerpt
-
+
{redactPathText(run.stdoutExcerpt, censorUsernameInLogs)}
@@ -601,7 +602,7 @@ export function LogViewer({ run, adapterType }: { run: HeartbeatRun; adapterType
{loadingMoreEvents ? "Loading..." : eventsError ? "Retry events" : "Load more events"}
)}
-
+
{events.map((evt) => {
const color = evt.color
?? (evt.level ? levelColors[evt.level] : null)
diff --git a/ui/src/components/run-log/RunDetails.tsx b/ui/src/components/run-log/RunDetails.tsx
index 7eef5a734a0..672aa2734b5 100644
--- a/ui/src/components/run-log/RunDetails.tsx
+++ b/ui/src/components/run-log/RunDetails.tsx
@@ -9,6 +9,7 @@ import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@/component
import { type HeartbeatRun, type WorkspaceOperation } from "@paperclipai/shared";
import { redactHomePathUserSegments, redactHomePathUserSegmentsInValue } from "@paperclipai/adapter-utils";
import { Badge } from "@/components/ui/badge";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export const RUN_LOG_PAGE_BYTES = 256_000;
@@ -208,7 +209,7 @@ export function RunInvocationCard({
{commandLine && (
Command:
- {commandLine}
+ {commandLine}
)}
{Array.isArray(payload.commandNotes) && payload.commandNotes.length > 0 && (
@@ -218,7 +219,7 @@ export function RunInvocationCard({
{payload.commandNotes
.filter((value): value is string => typeof value === "string" && value.trim().length > 0)
.map((note, idx) => (
-
+
{note}
))}
@@ -228,7 +229,7 @@ export function RunInvocationCard({
{payload.prompt !== undefined && (
Prompt
-
+
{typeof payload.prompt === "string"
? redactPathText(payload.prompt, censorUsernameInLogs)
: JSON.stringify(redactPathValue(payload.prompt, censorUsernameInLogs), null, 2)}
@@ -238,7 +239,7 @@ export function RunInvocationCard({
{payload.context !== undefined && (
Context
-
+
{JSON.stringify(redactPathValue(payload.context, censorUsernameInLogs), null, 2)}
@@ -246,7 +247,7 @@ export function RunInvocationCard({
{payload.env !== undefined && (
Environment
-
+
{formatEnvForDisplay(payload.env, censorUsernameInLogs)}
@@ -462,7 +463,7 @@ export function WorkspaceOperationsSection({
{operation.stderrExcerpt && operation.stderrExcerpt.trim() && (
stderr excerpt
-
+
{redactPathText(operation.stderrExcerpt, censorUsernameInLogs)}
@@ -470,7 +471,7 @@ export function WorkspaceOperationsSection({
{operation.stdoutExcerpt && operation.stdoutExcerpt.trim() && (
stdout excerpt
-
+
{redactPathText(operation.stdoutExcerpt, censorUsernameInLogs)}
diff --git a/ui/src/components/search/SearchResultRow.tsx b/ui/src/components/search/SearchResultRow.tsx
index 5f8a4db7a56..7cb322c63b0 100644
--- a/ui/src/components/search/SearchResultRow.tsx
+++ b/ui/src/components/search/SearchResultRow.tsx
@@ -9,6 +9,7 @@ import { StatusIcon } from "../StatusIcon";
import { Identity } from "../Identity";
import { HighlightedText, type HighlightedTextProps } from "./HighlightedText";
import { taskStatusIconProps } from "@/lib/task-status-presentation";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type SnippetStyle = {
Icon: ComponentType>;
@@ -265,7 +266,7 @@ function SnippetLine({ text, highlights, field, fallbackLabel, multiline = false
);
diff --git a/ui/src/components/skill-studio/SkillSourceConnectionRepair.tsx b/ui/src/components/skill-studio/SkillSourceConnectionRepair.tsx
index 33ee7b94a1a..eb41dd3b3c1 100644
--- a/ui/src/components/skill-studio/SkillSourceConnectionRepair.tsx
+++ b/ui/src/components/skill-studio/SkillSourceConnectionRepair.tsx
@@ -10,6 +10,7 @@ import { Button } from '@/components/ui/button';
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';
import { RadioCardGroup } from '@/components/ui/radio-card';
import { SkillSourceBranchRepair } from './SkillSourceBranchRepair';
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export function SkillSourceConnectionRepair({ companyId, source, onClose, onSaved, onReturnFocus }: {
companyId: string; source: SkillSource; onClose: () => void; onSaved: () => Promise
;
@@ -41,7 +42,7 @@ export function SkillSourceConnectionRepair({ companyId, source, onClose, onSave
{query.isPending &&
Loading connections…
}
{query.error &&
{describeError(query.error).body} void query.refetch()}>Try again
}
-
({ value: connection.id, title: connection.name }))} />
{query.isSuccess && connections.length === 0 && Connect GitHub to continue.
}
Manage GitHub connections
diff --git a/ui/src/components/skills/ConnectedAppSkills.tsx b/ui/src/components/skills/ConnectedAppSkills.tsx
index b1f5aeeb20e..2dfcc0ad373 100644
--- a/ui/src/components/skills/ConnectedAppSkills.tsx
+++ b/ui/src/components/skills/ConnectedAppSkills.tsx
@@ -9,6 +9,8 @@ import { useToastActions } from "../../context/ToastContext";
import { formatBytes } from "../../lib/issue-output";
import { queryKeys } from "../../lib/queryKeys";
import { describeError } from "@/api/errors";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
const STATUS_LABEL: Record = {
pending_review: "Needs review",
@@ -129,7 +131,7 @@ export function ConnectedAppSkillsList({ skills, pendingSkillId, preview, onPrev
preview?.error ? {preview.error}
: preview?.loading || !previewCurrent ? Loading instructions…
// Shown as text: the content comes from the app and is never rendered as a page.
- : {preview?.markdown}
+ : {preview?.markdown}
) : null}
);
diff --git a/ui/src/components/task-chat/TaskChatCompactInteractionCard.tsx b/ui/src/components/task-chat/TaskChatCompactInteractionCard.tsx
index e5c4831cd16..7064f866cec 100644
--- a/ui/src/components/task-chat/TaskChatCompactInteractionCard.tsx
+++ b/ui/src/components/task-chat/TaskChatCompactInteractionCard.tsx
@@ -76,6 +76,7 @@ import {
} from "./TaskChatComposerTakeoverContext";
import { TaskChatPlanPreviewCard } from "./TaskChatPlanPreviewCard";
import { TaskChatRichInput } from "./TaskChatRichInput";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const TAKEOVER_TEXTAREA_CLASS =
"min-h-16 resize-y border-0 bg-muted/35 text-sm shadow-none focus-visible:ring-0 focus-visible:ring-offset-0";
@@ -578,7 +579,7 @@ function ReceiptDisclosure({
{interaction.payload.toolAction.previewMarkdown}
-
+
{interaction.payload.toolAction.argumentsSummaryJson}
@@ -954,7 +955,7 @@ function ConfirmationCard({
Arguments
-
+
{interaction.payload.toolAction.argumentsSummaryJson}
diff --git a/ui/src/components/task-chat/TaskChatProtocolActivityRow.tsx b/ui/src/components/task-chat/TaskChatProtocolActivityRow.tsx
index fca5eba7ec6..4aaa7da9c36 100644
--- a/ui/src/components/task-chat/TaskChatProtocolActivityRow.tsx
+++ b/ui/src/components/task-chat/TaskChatProtocolActivityRow.tsx
@@ -28,6 +28,7 @@ import {
protocolActivityPresentation,
providerNoticeSeverity,
} from "./task-chat-activity-presentation";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const COMPACT_RESEARCH_RESULT_LIMIT = 5;
const COMPACT_WORKSPACE_FILE_LIMIT = 8;
@@ -176,7 +177,7 @@ function ProviderDetails({ item, neutral = false }: { item: TaskChatProviderActi
) : null}
{item.output ? (
- {item.output}
+ {item.output}
) : null}
{item.outputTruncated ? Output truncated to 8 KiB.
: null}
@@ -224,7 +225,7 @@ function WorkspaceFileDetails({ item }: { item: TaskChatWorkspaceFileItem }) {
item.presentation === "document" ? (
{item.preview}
) : (
-
{item.preview}
+
{item.preview}
)
) :
Preview unavailable.
}
{item.previewTruncated ?
Preview truncated by the runner.
: null}
diff --git a/ui/src/components/task-chat/TaskChatProtocolCard.tsx b/ui/src/components/task-chat/TaskChatProtocolCard.tsx
index b56664bdc6e..cfea850bc9e 100644
--- a/ui/src/components/task-chat/TaskChatProtocolCard.tsx
+++ b/ui/src/components/task-chat/TaskChatProtocolCard.tsx
@@ -57,6 +57,7 @@ import { TaskChatDiffCounts, TaskChatDiffView } from "./TaskChatDiffView";
import { parseUnifiedDiffLines } from "./diff-lines";
import { useArtifactsV1Enabled } from "@/hooks/useArtifactsV1Enabled";
import { ArtifactFileRow, ArtifactRow, fileRowSourceFromAttachment, fileRowSourceFromWorkProduct, subjectFromAttachment, subjectFromDocumentSummary, subjectFromWorkProduct, workProductStateBadge } from "@/components/artifacts/v1";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export interface TaskChatProtocolCardProps {
item: TaskChatProtocolItem;
@@ -400,7 +401,7 @@ function ProviderActivityCard({
) : null}
{item.output ? (
-
+
{item.output}
) : null}
@@ -623,7 +624,7 @@ function WorkspaceFileCard({ item }: { item: TaskChatWorkspaceFileItem }) {
src={item.preview}
/>
) : (
-
+
{item.preview}
)}
diff --git a/ui/src/components/task-chat/TaskChatRunnerActivityGroup.tsx b/ui/src/components/task-chat/TaskChatRunnerActivityGroup.tsx
index c5d1da43cf7..852fcea5671 100644
--- a/ui/src/components/task-chat/TaskChatRunnerActivityGroup.tsx
+++ b/ui/src/components/task-chat/TaskChatRunnerActivityGroup.tsx
@@ -35,6 +35,7 @@ import { toolActivityPresentation, type ToolIcon } from "./tool-taxonomy";
import { useTaskChatShimmer } from "./TaskChatShimmer";
import { TaskChatDiffCounts, TaskChatDiffView } from "./TaskChatDiffView";
import { useTaskReferenceLabel, withTaskReference } from "./task-reference";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type Activity = TaskChatActivityPhaseItem["items"][number];
type ToolActivity = Extract;
@@ -430,7 +431,7 @@ function ActivityDetailsBody({ item }: { item: Activity }) {
) : null}
{item.blockedReason ? Blocked: {item.blockedReason}
: null}
{item.detail ? (
-
+
{item.detail}
) : null}
diff --git a/ui/src/components/task-chat/TaskChatToolCard.tsx b/ui/src/components/task-chat/TaskChatToolCard.tsx
index 7e79f3b4cd5..9a9d8da86ee 100644
--- a/ui/src/components/task-chat/TaskChatToolCard.tsx
+++ b/ui/src/components/task-chat/TaskChatToolCard.tsx
@@ -16,6 +16,7 @@ import { useTaskReferenceLabel, withTaskReference } from "./task-reference";
import { ProviderToolIcon, useProviderToolIcons } from "@/components/ProviderToolIcon";
import type { ToolCallProgressSnapshot } from "@paperclipai/shared";
import { TaskChatToolProgress, useToolCallProgress } from "./tool-call-progress";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const STATUS_ICON = {
pending: { Icon: Loader2, spin: false, tone: "text-muted-foreground" },
@@ -149,7 +150,7 @@ export function TaskChatToolCard({ item, progress: givenProgress }: {
) : null}
{item.detail && showDetail ? (
-
+
{item.detail}
) : null}
diff --git a/ui/src/components/task-side-panel/TaskAttachmentPanel.tsx b/ui/src/components/task-side-panel/TaskAttachmentPanel.tsx
index 738de068a7d..ba5e8264e9f 100644
--- a/ui/src/components/task-side-panel/TaskAttachmentPanel.tsx
+++ b/ui/src/components/task-side-panel/TaskAttachmentPanel.tsx
@@ -16,6 +16,8 @@ import { attachmentDownloadPath, isMarkdownAttachment, isTextAttachment } from "
import { queryKeys } from "@/lib/queryKeys";
import { readTextPreview, TEXT_PREVIEW_MAX_BYTES } from "@/lib/text-preview";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export { readTextPreview, TEXT_PREVIEW_MAX_BYTES } from "@/lib/text-preview";
export function TextAttachmentPreview({ title, text, markdown, html = false, csv = false, patch = isPatchFile(title), downloadUrl }: {
@@ -40,13 +42,13 @@ export function TextAttachmentPreview({ title, text, markdown, html = false, csv
-
+
{text.length === 0 ?
File is empty.
: renderCsv ?
: renderHtml ?
: markdown && mode === "rendered" ?
{text}
- : patch ?
- :
{text} }
+ : patch ?
+ :
{text} }
);
diff --git a/ui/src/components/transcript/RunTranscriptView.tsx b/ui/src/components/transcript/RunTranscriptView.tsx
index af8a05676bd..166eb701a42 100644
--- a/ui/src/components/transcript/RunTranscriptView.tsx
+++ b/ui/src/components/transcript/RunTranscriptView.tsx
@@ -14,6 +14,7 @@ import {
User,
} from "lucide-react";
import { toolTaxonomy } from "../task-chat/tool-taxonomy";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/** Family glyph for a tool block/row; the taxonomy falls back to Wrench. */
function ToolFamilyIcon({ name, className }: { name: string; className?: string }) {
@@ -878,7 +879,7 @@ function TranscriptProviderActivity({ block, density }: { block: Extract 0 ? {steps.map((step, index) => {step.status === "completed" ? "✓" : step.status === "blocked" ? "!" : "○"} {String(step.body ?? "")} )} : null}
{children.length > 0 ? : null}
{sources.length > 0 ? {sources.map((source, index) => { const url = typeof source.url === "string" && /^https?:\/\//.test(source.url) ? source.url : null; return {url ? {String(source.title ?? url)} : String(source.title ?? "Unavailable source")} Provider-reported ; })} : null}
- {output ? {output} : null}
+ {output ? {output} : null}
{block.family === "provider_notice" && Array.isArray(block.payload.details) ? {block.payload.details.slice(0, 64).map((value, index) => { const detail = asRecord(value); return detail && typeof detail.name === "string" && typeof detail.value === "string" ?
{detail.name} {detail.value} : null; })} : null}
{block.family === "model_identity" ? Requested {String(block.payload.requestedModel ?? "—")} · Effective {String(block.payload.effectiveModel ?? "—")}
: null}
: null}
@@ -1109,7 +1110,7 @@ function TranscriptToolCard({
Input
-
+
{formatToolPayload(block.input) || ""}
@@ -1117,7 +1118,7 @@ function TranscriptToolCard({
Result
-
@@ -1262,7 +1263,7 @@ function TranscriptCommandGroup({
{item.result && (
-
@@ -1403,14 +1404,14 @@ function TranscriptToolGroup({
Input
-
+
{formatToolPayload(item.input) || ""}
{item.result && (
Result
-
@@ -1506,7 +1507,7 @@ function TranscriptEventRow({
)}
{block.detail && (
-
+
{block.detail}
)}
@@ -1559,7 +1560,7 @@ function TranscriptDiffGroup({
{open ? : }
{open && (
-
@@ -1637,7 +1638,7 @@ function TranscriptStderrGroup({
{open ? : }
{open && (
-
+
{block.lines.map((line, i) => (
{i > 0 ? "\n" : ""}
@@ -1674,7 +1675,7 @@ function TranscriptSystemGroup({
{open ? : }
{open && (
-
+
{block.lines.map((line, i) => (
{i > 0 ? "\n" : ""}
@@ -1714,7 +1715,7 @@ function TranscriptStdoutRow({
{open && (
-
@@ -1834,7 +1835,7 @@ function RawTranscriptView({
{entry.kind}
-
+
{rawEntryContent(entry)}
@@ -1868,7 +1869,7 @@ export function RunTranscriptView({
if (entries.length === 0) {
return (
-
+
{emptyMessage}
);
@@ -1876,14 +1877,14 @@ export function RunTranscriptView({
if (mode === "raw") {
return (
-
+
);
}
return (
-
+
{keyedBlocks.map(({ block, key }, index) => (
&
VariantProps
& {
asChild?: boolean
- /** The label is fixed product copy, so session replay may show it. */
- analyticsChrome?: boolean
}
>(function Button({
className,
variant = "default",
size = "default",
asChild = false,
- analyticsChrome = false,
...props
}, ref) {
const Comp = asChild ? Slot.Root : "button"
@@ -62,7 +58,6 @@ const Button = React.forwardRef<
& {
- /** The text is fixed product copy, so session replay may show it. */
- analyticsChrome?: boolean
-}) {
+}: React.ComponentProps) {
return (
& {
- /** The text is fixed product copy, so session replay may show it. */
- analyticsChrome?: boolean
-}) {
+}: React.ComponentProps) {
return (
Speko charge {charge(report.costMicroUsd)} {report.durationSeconds !== null &&
Duration {report.durationSeconds} seconds }
Agent costs are separate. Recordings remain in Speko.
- {report.transcript.length ? {report.transcript.map(turn => {turn.speaker === "caller" ? "You" : "Agent"}{turn.interrupted ? " · interrupted" : ""}
{turn.text}
)}
+ {report.transcript.length ? {report.transcript.map(turn => {turn.speaker === "caller" ? "You" : "Agent"}{turn.interrupted ? " · interrupted" : ""}
{turn.text}
)}
: {report.status === "unavailable" ? "The transcript is unavailable. Paperclip will retry while Speko finishes the report." : report.status === "pending" ? "The transcript will appear after Speko finishes the call report." : "Speko did not provide a transcript for this call."}
}
;
}
diff --git a/ui/src/components/voice/VoiceTranscript.tsx b/ui/src/components/voice/VoiceTranscript.tsx
index 66b8b498049..6003ad7d041 100644
--- a/ui/src/components/voice/VoiceTranscript.tsx
+++ b/ui/src/components/voice/VoiceTranscript.tsx
@@ -1,4 +1,6 @@
import type { VoiceTranscriptEntry } from "@/lib/voice-transcript";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export interface VoiceTranscriptProps {
entries: readonly VoiceTranscriptEntry[];
@@ -11,7 +13,7 @@ export function VoiceTranscript({ entries, agentName, unavailable = false }: Voi
if (unavailable) return
The transcript is unavailable. Your task history is still available.
;
if (!entries.length) return
Your conversation will appear here.
;
return (
-
+
{entries.map((entry) => (
diff --git a/ui/src/features/connections/ConnectionChoiceList.tsx b/ui/src/features/connections/ConnectionChoiceList.tsx
index 2aaea7f85c4..b3c318699cf 100644
--- a/ui/src/features/connections/ConnectionChoiceList.tsx
+++ b/ui/src/features/connections/ConnectionChoiceList.tsx
@@ -1,5 +1,7 @@
import type { ReactNode } from "react";
import { Check, ChevronRight, Loader2 } from "lucide-react";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
/** The account-reuse rows shared by connection setup and agent bindings. */
export function ConnectionChoiceList({ choices, selectedId, pendingId, disabled, onSelect }: {
@@ -21,7 +23,7 @@ export function ConnectionChoiceList({ choices, selectedId, pendingId, disabled,
>
{choice.icon && {choice.icon} }
- {choice.name}
+ {choice.name}
{choice.description}
{pendingId === choice.id ?
diff --git a/ui/src/features/connections/ConnectionInstructions.tsx b/ui/src/features/connections/ConnectionInstructions.tsx
index 562b4065b84..923f93299ae 100644
--- a/ui/src/features/connections/ConnectionInstructions.tsx
+++ b/ui/src/features/connections/ConnectionInstructions.tsx
@@ -19,6 +19,8 @@ import { Button } from "@/components/ui/button";
import { Textarea } from "@/components/ui/textarea";
import { ToggleSwitch } from "@/components/ui/toggle-switch";
import { InlineBanner } from "@/components/InlineBanner";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function ConnectionInstructionsEditor({ provider, template, value, onChange, disabled = false }: {
provider: string;
@@ -39,7 +41,7 @@ export function ConnectionInstructionsEditor({ provider, template, value, onChan
{!value.enabled && Agents can still use this connection’s tools, but won’t receive these instructions. }
{editing ?
diff --git a/ui/src/pages/ApprovalDetail.tsx b/ui/src/pages/ApprovalDetail.tsx
index f152c5a5bc7..8550bb91f83 100644
--- a/ui/src/pages/ApprovalDetail.tsx
+++ b/ui/src/pages/ApprovalDetail.tsx
@@ -17,6 +17,8 @@ import { Textarea } from "@/components/ui/textarea";
import { CheckCircle2, ChevronRight, Sparkles } from "lucide-react";
import type { ApprovalComment } from "@paperclipai/shared";
import { MarkdownBody } from "../components/MarkdownBody";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function ApprovalDetail() {
const { approvalId } = useParams<{ approvalId: string }>();
@@ -231,7 +233,7 @@ export function ApprovalDetail() {
See full request
{showRawPayload && (
-
+
{JSON.stringify(payload, null, 2)}
)}
diff --git a/ui/src/pages/CaseDetail.tsx b/ui/src/pages/CaseDetail.tsx
index 892d9218cd9..07bb4bc3a40 100644
--- a/ui/src/pages/CaseDetail.tsx
+++ b/ui/src/pages/CaseDetail.tsx
@@ -24,6 +24,8 @@ import { Button } from "@/components/ui/button";
import { formatDateTime } from "@/lib/utils";
import { queryKeys } from "@/lib/queryKeys";
import { caseAuditHref } from "./audit/audit-navigation";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
function CaseRelation({ item, search }: { item: Pick; search: string }) {
const caseHref = useCaseHref();
@@ -100,7 +102,7 @@ export function CaseDetail() {
{caseData.caseType}
{caseData.title}
- {caseData.summary && {caseData.summary}
}
+ {caseData.summary && {caseData.summary}
}
{caseData.labels.length > 0 && {caseData.labels.map(label => {label.name} )}
}
@@ -123,7 +125,7 @@ export function CaseDetail() {
{caseData.attachments.length > 0 &&
Attachments
{images.length > 0 && }
- {files.length > 0 && }
+ {files.length > 0 && }
}
{caseData.workIssueId && }
diff --git a/ui/src/pages/CompanyEnvironments.tsx b/ui/src/pages/CompanyEnvironments.tsx
index 0055abfc6df..e37e31762f6 100644
--- a/ui/src/pages/CompanyEnvironments.tsx
+++ b/ui/src/pages/CompanyEnvironments.tsx
@@ -67,6 +67,8 @@ import {
Field,
ToggleField,
} from "../components/agent-config-primitives";
+import { ANALYTICS_NO_CAPTURE_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
type EnvironmentFormState = {
name: string;
@@ -1207,7 +1209,7 @@ function EnvironmentImageTemplatePanel({
SSH command fallback
-
+
{connectionCommand}
diff --git a/ui/src/pages/CompanyExport.tsx b/ui/src/pages/CompanyExport.tsx
index d0d63bcfb66..9f593d2989a 100644
--- a/ui/src/pages/CompanyExport.tsx
+++ b/ui/src/pages/CompanyExport.tsx
@@ -59,6 +59,7 @@ import {
} from "../components/FileTree";
import { describeError } from "@/api/errors";
import { companyProjectsQuery } from "@/lib/company-projects-query";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
/**
* Extract the set of agent/project/task slugs that are "checked" based on
@@ -572,7 +573,7 @@ function ExportPreviewPane({
) : textContent !== null ? (
-
+
{textContent}
) : (
diff --git a/ui/src/pages/CompanyImport.tsx b/ui/src/pages/CompanyImport.tsx
index 67f264ce641..11db214522e 100644
--- a/ui/src/pages/CompanyImport.tsx
+++ b/ui/src/pages/CompanyImport.tsx
@@ -72,6 +72,7 @@ import {
} from "../lib/import-job-watch";
import { Badge } from "@/components/ui/badge";
import { describeError } from "@/api/errors";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
// ── Import-specific helpers ───────────────────────────────────────────
@@ -275,7 +276,7 @@ function ImportPreviewPane({
) : textContent !== null ? (
-
+
{textContent}
) : (
diff --git a/ui/src/pages/CompanySkills.production.tsx b/ui/src/pages/CompanySkills.production.tsx
index 45d60259f3c..1f8374c3ad9 100644
--- a/ui/src/pages/CompanySkills.production.tsx
+++ b/ui/src/pages/CompanySkills.production.tsx
@@ -172,6 +172,7 @@ import {
import { GithubIcon } from "../components/icons/github-icon";
import type { FolderListItem, FolderListResult } from "@paperclipai/shared";
import { describeError } from "@/api/errors";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type SkillTreeNode = {
name: string;
@@ -2027,7 +2028,7 @@ function CatalogDetailPane({
) : fileQuery.data.markdown ? (
{body}
) : (
-
+
{fileQuery.data.content}
)}
@@ -2743,7 +2744,7 @@ function SkillVersionDiffDialog({
{row.oldLineNumber ?? ""}
{row.newLineNumber ?? ""}
{markerByKind[row.kind]}
- {row.text.length > 0 ? row.text : " "}
+ {row.text.length > 0 ? row.text : " "}
))}
@@ -3128,7 +3129,7 @@ export function SkillDetailPage({
) : file.markdown && viewMode === "preview" ? (
{body}
) : (
-
+
{file.content}
)}
@@ -4014,7 +4015,7 @@ function SkillPane({
) : file.markdown && viewMode === "preview" ? (
{body}
) : (
-
+
{file.content}
)}
diff --git a/ui/src/pages/CompanySkills.tsx b/ui/src/pages/CompanySkills.tsx
index d78d572aaa4..27273d6d456 100644
--- a/ui/src/pages/CompanySkills.tsx
+++ b/ui/src/pages/CompanySkills.tsx
@@ -181,6 +181,7 @@ import {
import { GithubIcon } from "../components/icons/github-icon";
import type { FolderListItem, FolderListResult } from "@paperclipai/shared";
import { describeError } from "@/api/errors";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type SkillTreeNode = {
name: string;
@@ -1937,7 +1938,7 @@ function CatalogDetailPane({
) : fileQuery.data.markdown ? (
{body}
) : (
-
+
{fileQuery.data.content}
)}
@@ -2653,7 +2654,7 @@ function SkillVersionDiffDialog({
{row.oldLineNumber ?? ""}
{row.newLineNumber ?? ""}
{markerByKind[row.kind]}
- {row.text.length > 0 ? row.text : " "}
+ {row.text.length > 0 ? row.text : " "}
))}
@@ -3049,7 +3050,7 @@ export function SkillDetailPage({
{body}
) : (
-
+
{file.content}
)}
@@ -3936,7 +3937,7 @@ function SkillPane({
) : file.markdown && viewMode === "preview" ? (
{body}
) : (
-
+
{file.content}
)}
diff --git a/ui/src/pages/ExecutionWorkspaceDetail.tsx b/ui/src/pages/ExecutionWorkspaceDetail.tsx
index def9dba1d24..9ee46119002 100644
--- a/ui/src/pages/ExecutionWorkspaceDetail.tsx
+++ b/ui/src/pages/ExecutionWorkspaceDetail.tsx
@@ -51,6 +51,7 @@ import {
sortWorkspaceRoutinesByName,
} from "../lib/workspace-routines";
import { useUpdateIssueMutation } from "../hooks/useUpdateIssueMutation";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type WorkspaceFormState = {
name: string;
@@ -1566,9 +1567,9 @@ export function ExecutionWorkspaceDetail() {
{operation.finishedAt ? ` → ${formatDateTime(operation.finishedAt)}` : ""}
{operation.stderrExcerpt ? (
- {operation.stderrExcerpt}
+ {operation.stderrExcerpt}
) : operation.stdoutExcerpt ? (
- {operation.stdoutExcerpt}
+ {operation.stdoutExcerpt}
) : null}
{operation.status}
diff --git a/ui/src/pages/InviteLanding.test.tsx b/ui/src/pages/InviteLanding.test.tsx
index f257e249972..bf03fd47833 100644
--- a/ui/src/pages/InviteLanding.test.tsx
+++ b/ui/src/pages/InviteLanding.test.tsx
@@ -7,6 +7,7 @@ import { MemoryRouter, Route, Routes } from "react-router-dom";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { InviteLandingPage } from "./InviteLanding";
import { queryKeys } from "../lib/queryKeys";
+import { isBlockedFromReplay } from "@/lib/analytics/replay-recording.test-utils";
const getInviteMock = vi.hoisted(() => vi.fn());
const acceptInviteMock = vi.hoisted(() => vi.fn());
@@ -571,6 +572,40 @@ describe("InviteLandingPage", () => {
});
});
+ it("blocks the one-time claim secret and the tokenized onboarding URL from session replay", async () => {
+ acceptInviteMock.mockResolvedValue({
+ id: "join-1",
+ companyId: "company-1",
+ requestType: "human",
+ status: "pending_approval",
+ claimSecret: "pcp_claim_Vb38nQe7Rw",
+ claimApiKeyPath: "/api/join-requests/join-1/claim-api-key",
+ onboarding: { textInstructions: { url: "https://paperclip.example.test/api/invites/pcp_invite_Hx9dLq/onboarding.txt" } },
+ });
+ getSessionMock.mockResolvedValue({
+ session: { id: "session-1", userId: "user-1" },
+ user: { id: "user-1", name: "Jane Example", email: "jane@example.com", image: null },
+ });
+
+ const root = createRoot(container);
+ const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } });
+
+ await act(async () => {
+ renderInviteLanding(root, queryClient);
+ });
+ await flushReact();
+ await flushReact();
+ await flushReact();
+ await flushReact();
+
+ expect(isBlockedFromReplay("pcp_claim_Vb38nQe7Rw", container)).toBe(true);
+ expect(isBlockedFromReplay("pcp_invite_Hx9dLq", container)).toBe(true);
+
+ await act(async () => {
+ root.unmount();
+ });
+ });
+
it("auto-completes a previously accepted human invite after sign-in", async () => {
getInviteMock.mockResolvedValue({
id: "invite-1",
diff --git a/ui/src/pages/InviteLanding.tsx b/ui/src/pages/InviteLanding.tsx
index b297bbfc5d8..0c86f7c6609 100644
--- a/ui/src/pages/InviteLanding.tsx
+++ b/ui/src/pages/InviteLanding.tsx
@@ -14,7 +14,8 @@ import { healthApi } from "../api/health";
import { getAdapterLabel } from "../adapters/adapter-display-registry";
import { clearPendingInviteToken, rememberPendingInviteToken } from "../lib/invite-memory";
import { queryKeys } from "../lib/queryKeys";
-import { formatDate } from "../lib/utils";
+import { cn, formatDate } from "../lib/utils";
+import { ANALYTICS_NO_CAPTURE_CLASS } from "@/lib/analytics/privacy";
type AuthMode = "sign_in" | "sign_up";
type AuthFeedback = { tone: "error" | "info"; message: string };
@@ -198,13 +199,13 @@ function AwaitingJoinApprovalPanel({
{claimSecret && claimApiKeyPath ? (
Claim secret
-
{claimSecret}
+
{claimSecret}
POST {claimApiKeyPath}
) : null}
{onboardingTextUrl ? (
- Onboarding: {onboardingTextUrl}
+ Onboarding: {onboardingTextUrl}
) : null}
diff --git a/ui/src/pages/McpConnect.test.tsx b/ui/src/pages/McpConnect.test.tsx
index db7e9bfc94e..9ac81610b3e 100644
--- a/ui/src/pages/McpConnect.test.tsx
+++ b/ui/src/pages/McpConnect.test.tsx
@@ -7,6 +7,7 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { beforeEach, expect, it, vi } from "vitest";
import { api } from "../api/client";
import { McpConnectPage, McpDevicePage } from "./McpConnect";
+import { isBlockedFromReplay } from "@/lib/analytics/replay-recording.test-utils";
const route = vi.hoisted(() => ({ id: "request-one", companyId: null as string | null, unavailable: false, canWrite: true, requestedWrite: true, requestedConfigure: false, agentConnection: false, requiresSignIn: false, clientName: "Assistant", clientOrigin: null as string | null, setupUrl: "https://my.paperclip.app/orgs/new", reverseCompanies: false, hideFirst: false }));
vi.mock("@/lib/router", () => ({
@@ -48,6 +49,14 @@ function setup(device = false, agentPairingOnly = false) {
};
}
+it("blocks the device code being confirmed from session replay", async () => {
+ const page = setup(true);
+ try {
+ await vi.waitFor(() => expect(page.container.textContent).toContain("Confirm this matches the code shown by your assistant"));
+ expect(isBlockedFromReplay("MIST-YPED", page.container)).toBe(true);
+ } finally { page.cleanup(); }
+});
+
it("lets a person correct an invalid device code without reloading", async () => {
vi.mocked(api.get).mockRejectedValueOnce(new Error("Invalid code"));
const page = setup(true);
diff --git a/ui/src/pages/McpConnect.tsx b/ui/src/pages/McpConnect.tsx
index f20123e6d99..937b0d0e714 100644
--- a/ui/src/pages/McpConnect.tsx
+++ b/ui/src/pages/McpConnect.tsx
@@ -14,6 +14,8 @@ import { CompanyPatternIcon } from "@/components/CompanyPatternIcon";
import { useResilientFetch } from "@/hooks/useResilientFetch";
import { api } from "../api/client";
import { describeError } from "../api/errors";
+import { cn } from "@/lib/utils";
+import { ANALYTICS_NO_CAPTURE_CLASS } from "@/lib/analytics/privacy";
const PAIRING_CODE_PATTERN = /^[A-Za-z0-9_-]{32}$/;
@@ -102,7 +104,7 @@ function McpConnectRequest({ id, device = false, agentPairingOnly = false, onEdi
{clientOrigin && }
{!device && data?.redirectOrigin && data.redirectOrigin !== clientOrigin && }
- {device && Confirm this matches the code shown by your assistant: {id.toUpperCase()}
}
+ {device && Confirm this matches the code shown by your assistant: {id.toUpperCase()}
}
{(requestView.kind === "loading" || requestView.kind === "reconnecting") && Loading connection request…
}
{requestView.kind === "error" && }
{requestView.kind === "error" && Start a new connection from your assistant.
}
diff --git a/ui/src/pages/PluginManager.tsx b/ui/src/pages/PluginManager.tsx
index a7cdfa7679c..5049b34f1eb 100644
--- a/ui/src/pages/PluginManager.tsx
+++ b/ui/src/pages/PluginManager.tsx
@@ -30,6 +30,7 @@ import {
} from "@/components/ui/dialog";
import { useToastActions } from "@/context/ToastContext";
import { cn } from "@/lib/utils";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
function firstNonEmptyLine(value: string | null | undefined): string | null {
if (!value) return null;
@@ -573,7 +574,7 @@ export function PluginManager() {
Full error output
-
+
{errorDetailsPlugin?.lastError ?? "No stored error message."}
diff --git a/ui/src/pages/Secrets.tsx b/ui/src/pages/Secrets.tsx
index ba88cc60ecd..c04a399d4e7 100644
--- a/ui/src/pages/Secrets.tsx
+++ b/ui/src/pages/Secrets.tsx
@@ -155,6 +155,7 @@ import {
} from "./secrets/user-secret-presentation";
import type { MyUserSecretEntry } from "../api/secrets";
import { describeError } from "@/api/errors";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
type CreateMode = "managed" | "external";
// "value" writes a new secret value (for external references: through to the
@@ -4274,7 +4275,7 @@ function AwsProviderVaultDiscoveryError({
Safe request/error details
-
+
{detailsText}
@@ -4367,7 +4368,7 @@ function SecretCreateError({
Safe request/error details
-
+
{detailsText}
diff --git a/ui/src/pages/SkillStudio.tsx b/ui/src/pages/SkillStudio.tsx
index fe70fa2510e..c62d0af5f7f 100644
--- a/ui/src/pages/SkillStudio.tsx
+++ b/ui/src/pages/SkillStudio.tsx
@@ -179,6 +179,7 @@ import {
type RunTemplateSelection,
type SavedInputDraftState,
} from "@/lib/skill-studio";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
const PANE_STORAGE_KEY = "skillStudio.paneSizes";
const RUN_TEMPLATE_STORAGE_KEY_PREFIX = "skillStudio.runTemplate";
@@ -2877,7 +2878,7 @@ function RunTemplateAdvancedPanel({
{selectedTemplate.description ? (
{selectedTemplate.description}
) : null}
-
+
{selectedTemplate.body}
@@ -3610,7 +3611,7 @@ function VersionHistorySheet({
Diff v{left?.revisionNumber} → v{right?.revisionNumber}
-
+
{diff.map((row, i) => (
-
+
{card.queries.length > 0 ? queryJson : "// query not compiled yet"}
diff --git a/ui/src/pages/TeamCatalog.tsx b/ui/src/pages/TeamCatalog.tsx
index b3dbe952d5b..a7c3f5f386a 100644
--- a/ui/src/pages/TeamCatalog.tsx
+++ b/ui/src/pages/TeamCatalog.tsx
@@ -114,6 +114,7 @@ import {
XOctagon,
} from "lucide-react";
import { GithubIcon } from "../components/icons/github-icon";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
// Matches design §11 breakpoints. Module-level so stories and the page agree.
const DESKTOP_MIN = 1024;
@@ -853,7 +854,7 @@ export function TeamDetailPane({
{fileContent}
) : (
-
{fileContent}
+ {fileContent}
)}
diff --git a/ui/src/pages/apps/AggregatorAppManager.tsx b/ui/src/pages/apps/AggregatorAppManager.tsx
index 64d4f58a7d1..5e6a0ed9001 100644
--- a/ui/src/pages/apps/AggregatorAppManager.tsx
+++ b/ui/src/pages/apps/AggregatorAppManager.tsx
@@ -12,6 +12,8 @@ import { QueryErrorState, useQueryView } from "@/components/QueryView";
import { Button } from "@/components/ui/button";
import { Label } from "@/components/ui/label";
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function AggregatorAppManager({ app, connections, initialConnectionId, onClose }: {
app: AggregatorAppCatalogEntry; connections: ToolConnection[]; initialConnectionId?: string; onClose: () => void;
@@ -19,12 +21,12 @@ export function AggregatorAppManager({ app, connections, initialConnectionId, on
const [connectionId, setConnectionId] = useState(initialConnectionId ?? connections[0]?.id ?? "");
const connection = connections.find(candidate => candidate.id === connectionId);
const provider = connection?.config?.sourceTemplateKey;
- return { if (!open) onClose(); }}>
+ return { if (!open) onClose(); }}>
Manage {app.name}
Accounts and sign-in are managed in {isAppAggregator(provider) ? AGGREGATOR_NAMES[provider] : "the provider"}.
{connections.length > 1 ? Connection
- setConnectionId(event.target.value)}>
+ setConnectionId(event.target.value)}>
{connections.map(candidate => {candidate.name} )}
: null}
{connection ? : This connection is no longer available.
}
@@ -48,11 +50,11 @@ function AccountObservations({ app, connection, onClose }: { app: AggregatorAppC
{refresh.error || query.data?.sync.status === "error" ? Couldn’t check {name}. Last known accounts are shown.
: null}
{query.isLoading || queryView.kind === "reconnecting" ? Loading accounts…
: accounts.length ?
{accounts.map(({ account, snapshot }) =>
-
{account.alias || `${app.name} account`}
+
{account.alias || `${app.name} account`}
{snapshot.freshness === "stale" || snapshot.errorAt || Date.now() - new Date(snapshot.checkedAt).getTime() > 5 * 60_000 || account.status === "UNVERIFIED" ? "Not verified" : account.status === "ACTIVE" ? "Connected" : account.status === "INITIATED" ? "Waiting for sign-in" : "Needs sign-in"}
)}
: {query.data?.discovery.message ?? `No connected ${app.name} accounts.`}
}
- Via “{connection.name}”
+ Via “{connection.name}”
Close
refresh.mutate()}>Refresh
{managementUrl ?
Open in {name} : null}
diff --git a/ui/src/pages/apps/AggregatorConnectDialog.tsx b/ui/src/pages/apps/AggregatorConnectDialog.tsx
index c1bfe63eb7c..073db9b5b19 100644
--- a/ui/src/pages/apps/AggregatorConnectDialog.tsx
+++ b/ui/src/pages/apps/AggregatorConnectDialog.tsx
@@ -9,6 +9,8 @@ import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, D
import { AppLogo } from "./AppLogo";
import { remoteMcpProviders } from "@/features/connections/remote-mcp/providers";
import { ComposioAppSetup } from "./ComposioAppSetup";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
+import { cn } from "@/lib/utils";
export function aggregatorAppConnectHref(route: AggregatorAppRoute, connection?: ToolConnection) {
const params = new URLSearchParams({ source: route.provider, targetToolkit: route.toolkit });
@@ -37,7 +39,7 @@ export function AggregatorConnectDialog({ app, connections, initialProvider, onC
else setSelected(route);
}
return
{ if (!open) onClose(); }}>
-
+
{provider ? `Connect ${app.name} through ${provider.name}` : `Connect ${app.name}`}
{selected?.provider === "composio"
@@ -59,7 +61,7 @@ export function AggregatorConnectDialog({ app, connections, initialProvider, onC
;
})} :
{selected.provider !== "composio" ?
{provider!.name} account
- setSelectedAccountId(event.target.value)} className="h-9 w-full rounded-md border border-input bg-background px-3 text-sm">
+ setSelectedAccountId(event.target.value)} className={cn("h-9 w-full rounded-md border border-input bg-background px-3 text-sm", ANALYTICS_MASK_CLASS)}>
{existing.map(connection => {connection.name} )}
: null}
diff --git a/ui/src/pages/apps/AppDetail.tsx b/ui/src/pages/apps/AppDetail.tsx
index 155e9b7d902..2f74105c8d9 100644
--- a/ui/src/pages/apps/AppDetail.tsx
+++ b/ui/src/pages/apps/AppDetail.tsx
@@ -80,6 +80,7 @@ import {
connectionOwnerProfile,
} from "./connection-owner";
import { describeError } from "@/api/errors";
+import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy";
export { connectionAddress, connectionTransportLabel };
@@ -547,7 +548,7 @@ function StandardAppDetail({ renderActions, renderAgentSettings, renderConnectio
if (isRetiredComposioConnection(connection)) {
return
-
{appName}
+
{appName}
Connection retired
{RETIRED_COMPOSIO_MESSAGE}
@@ -605,6 +606,7 @@ function StandardAppDetail({ renderActions, renderAgentSettings, renderConnectio
else setRenaming(false);
}}
/>
+
{status.tone === "attention" && connection.requiresReauthorization === false && (
}
)}
+
);
}
@@ -828,7 +831,7 @@ export function AppDetailHeader({
) : (
-
{appName}
+
{appName}
void }) {
const [apiKey, setApiKey] = useState("");
@@ -21,9 +22,9 @@ export function ArcadeDiscoverySetup({ connection, onClose }: { connection: Tool
},
onSuccess: onClose,
});
- return { if (!open && !save.isPending) onClose(); }}>
+ return { if (!open && !save.isPending) onClose(); }}>
Sync Arcade accounts
- See apps available through “{connection.name}”. Your gateway works without account sync.
+ See apps available through “{connection.name}” . Your gateway works without account sync.