Skip to content

Commit 6f95ecf

Browse files
feat(web): note anonymous usage data in onboarding and link the privacy policy
Tell new users during setup that T3 Code collects anonymous usage data and how to opt out, and add a privacy policy link under Settings > About. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 0c183a9 commit 6f95ecf

4 files changed

Lines changed: 36 additions & 1 deletion

File tree

‎apps/web/src/components/onboarding/WelcomeWizard.tsx‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
3636
import { TYPOGRAPHY_ADVANCED_STORAGE_KEY } from "../../appearanceFonts";
3737
import { useLocalStorage } from "../../hooks/useLocalStorage";
3838
import { hasCloudPublicConfig } from "../../cloud/publicConfig";
39+
import { PRIVACY_POLICY_URL } from "../../legalLinks";
3940
import { useT3ConnectAuthPrompt } from "../clerk/useT3ConnectAuthPrompt";
4041
import { useCompleteOnboarding } from "../../onboarding/firstRun";
4142
import {
@@ -414,8 +415,21 @@ function ConnectionStep({
414415
</Collapsible>
415416
</div>
416417
</div>
417-
<div className="mt-6 flex items-center justify-end gap-3">
418+
<div className="mt-6 flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6">
419+
<p className="min-w-0 text-xs leading-relaxed text-muted-foreground">
420+
T3 Code collects anonymous usage data to help us improve it. To opt out, set{" "}
421+
<code>T3CODE_TELEMETRY_ENABLED=false</code> in your environment.{" "}
422+
<a
423+
className="underline underline-offset-2 hover:text-foreground"
424+
href={PRIVACY_POLICY_URL}
425+
target="_blank"
426+
rel="noreferrer noopener"
427+
>
428+
Privacy policy
429+
</a>
430+
</p>
418431
<Button
432+
className="shrink-0 self-end"
419433
ref={continueRef}
420434
autoFocus={!expandPairingInitially}
421435
disabled={!ready || isPairing}

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { SettingsGroup } from "./SettingsGroup";
22
import { Spinner } from "~/components/ui/spinner";
33
import { NotificationSettings } from "./NotificationSettings";
4+
import { PRIVACY_POLICY_URL } from "../../legalLinks";
45
import { ArchiveIcon, ArchiveX, CheckIcon, ChevronRightIcon, SettingsIcon } from "lucide-react";
56
import { Link, useNavigate } from "@tanstack/react-router";
67
import type { CSSProperties, ReactNode } from "react";
@@ -3334,6 +3335,19 @@ export function GeneralSettingsPanel() {
33343335
description="Current version of the application."
33353336
/>
33363337
)}
3338+
<SettingsRow
3339+
{...searchableSetting("privacy-policy")}
3340+
description="How we handle your data, including the anonymous usage data T3 Code collects."
3341+
control={
3342+
<Button
3343+
render={<a href={PRIVACY_POLICY_URL} target="_blank" rel="noreferrer noopener" />}
3344+
size="sm"
3345+
variant="outline"
3346+
>
3347+
View policy
3348+
</Button>
3349+
}
3350+
/>
33373351
</SettingsSection>
33383352
<SettingsSection title="Diagnostics">
33393353
<SettingsRow

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@ export const SETTINGS_SEARCH_ITEMS = [
493493
scope: "project-defaults",
494494
searchTerms: ["generated thread titles source control content default provider"],
495495
},
496+
{
497+
id: "privacy-policy",
498+
title: "Privacy policy",
499+
to: "/settings/general",
500+
searchTerms: ["telemetry analytics usage data tracking legal opt out"],
501+
},
496502
{
497503
id: "diagnostics",
498504
title: "Diagnostics",

‎apps/web/src/legalLinks.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const PRIVACY_POLICY_URL = "https://t3.codes/privacy-policy";

0 commit comments

Comments
 (0)