Skip to content

AI-native design editor. Open-source Figma alternative.

feat: send a daily anonymous ping and ask before sharing usage stats (#1095)

Danila Poyarkov447844e5ff69
diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml
index 04d5036c5..01e7546fa 100644
--- a/.github/workflows/app.yml
+++ b/.github/workflows/app.yml
@@ -28,6 +28,9 @@ jobs:
- run: bunx playwright install --with-deps chromium
- run: bun run build
+ env:
+ # Official releases only: lets the app send its daily ping and, with consent, usage stats.
+ VITE_OPENPENCIL_FEEDBACK: "on"
- uses: cloudflare/wrangler-action@v4
with:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8408d8c68..850f1a795 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -68,6 +68,9 @@ jobs:
- name: Install pinned workflow tooling
run: bun install --cwd .pipeline --frozen-lockfile
- name: Build shared desktop frontend and package outputs
+ env:
+ # Official releases only: lets the app send its daily ping and, with consent, usage stats.
+ VITE_OPENPENCIL_FEEDBACK: "on"
run: |
bun run generate:icons --target desktop
bun run generate:tauri-menu
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 923c93005..18a26a47a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,8 @@
- Text keeps a case, a link, text and fill styles, and variable bindings for any range of its characters, as in Figma: the canvas draws each range in its own case, `.fig` files and the Figma clipboard keep them, apart from font weight bindings, HTML, Tailwind, and JSX exports write links as `<a href>` and cases as `text-transform` and HTML import reads them back, Design JSX `<Span>` takes `textCase` and `href`, and the Typography section's text case changes the selected characters while text is edited. Scripts read and set them with `getRangeTextCase`, `setRangeTextCase`, `getRangeHyperlink`, `setRangeHyperlink`, `getRangeTextStyleId`, `setRangeTextStyleIdAsync`, `getRangeFillStyleId`, `setRangeFillStyleIdAsync`, `getRangeBoundVariable`, `setRangeBoundVariable`, and the text's `hyperlink`.
+- Official builds send one anonymous ping a day, with the app version, operating system, architecture, desktop or web, and whether usage stats are shared, and no ID; turn it off in Settings → Privacy or with `OPENPENCIL_TELEMETRY=0` or `DO_NOT_TRACK=1` in the desktop app's environment. Usage stats (launches, file formats opened and exported, and which AI provider answered) are sent only after you agree in a one-time prompt after the welcome screen. The [privacy page](https://openpencil.dev/overview/privacy) lists every field.
+
### Changed
- **Settings…** (<kbd>⌘</kbd><kbd>,</kbd>) is in the **OpenPencil** menu on macOS and at the end of the **File** menu elsewhere, instead of under **View → Preferences**.
diff --git a/README.md b/README.md
index 6d8b78940..f52606f54 100644
--- a/README.md
+++ b/README.md
@@ -212,7 +212,9 @@ Share a link to co-edit in real time. No server, no account — peers connect di
Figma is a closed platform that actively fights programmatic access. Their MCP server is read-only. [figma-use](https://github.com/dannote/figma-use) added full read/write automation via CDP — then [Figma 126 killed CDP](https://forum.figma.com/report-a-problem-6/remote-debugging-port-not-working-in-figma-desktop-126-1-2-50858). Your design files are in a proprietary binary format that only their software can fully read. Your workflows break when they decide to ship a point release.
-OpenPencil is the alternative: open source (MIT), reads .fig files natively, every operation is scriptable, and your data never leaves your machine.
+OpenPencil is the alternative: open source (MIT), local-first, reads .fig files natively, and every operation is scriptable.
+
+Official builds send one anonymous ping a day and, only if you agree, usage stats; the [privacy page](https://openpencil.dev/overview/privacy) lists every field and how to turn it off.
See the [roadmap](https://openpencil.dev/development/roadmap) for product direction and current Figma compatibility gaps.
diff --git a/bun.lock b/bun.lock
index e6a149236..f460b8fe5 100644
--- a/bun.lock
+++ b/bun.lock
@@ -35,6 +35,7 @@
"@open-pencil/core": "workspace:*",
"@open-pencil/design-jsx": "workspace:*",
"@open-pencil/dom-css": "workspace:*",
+ "@open-pencil/feedback": "workspace:*",
"@open-pencil/fig": "workspace:*",
"@open-pencil/harness": "workspace:*",
"@open-pencil/kiwi": "workspace:*",
@@ -282,6 +283,7 @@
},
"devDependencies": {
"@open-pencil/brand-tools": "workspace:*",
+ "@open-pencil/feedback": "workspace:*",
"@shikijs/vitepress-twoslash": "^4.4.3",
"@tailwindcss/vite": "^4.3.3",
"vitepress": "^2.0.0-alpha.19",
diff --git a/desktop/src/lib.rs b/desktop/src/lib.rs
index c85e3cfae..b1fb1cbe4 100644
--- a/desktop/src/lib.rs
+++ b/desktop/src/lib.rs
@@ -72,6 +72,21 @@ fn webview_version() -> Option<String> {
tauri::webview_version().ok()
}
+/// Whether the environment turns off pings and usage stats: `OPENPENCIL_TELEMETRY` set to
+/// `0`, `false`, or `no`, or `DO_NOT_TRACK` set to anything but `0` or `false`.
+#[tauri::command]
+fn sharing_disabled_by_env() -> bool {
+ let is_off = |name: &str, off: &[&str]| {
+ std::env::var(name)
+ .map(|value| off.contains(&value.trim().to_ascii_lowercase().as_str()))
+ .unwrap_or(false)
+ };
+ let do_not_track = std::env::var("DO_NOT_TRACK")
+ .map(|value| !matches!(value.trim().to_ascii_lowercase().as_str(), "" | "0" | "false"))
+ .unwrap_or(false);
+ is_off("OPENPENCIL_TELEMETRY", &["0", "false", "no"]) || do_not_track
+}
+
#[tauri::command]
fn set_recent_files(app: tauri::AppHandle, paths: Vec<String>) -> Result<(), String> {
install_app_menu(&app, &paths).map_err(|error| error.to_string())
@@ -365,6 +380,7 @@ pub fn run() {
set_native_menu_checked,
take_pending_open,
take_pending_rooms,
+ sharing_disabled_by_env,
webview_version
])
.plugin(tauri_plugin_opener::init())
diff --git a/package.json b/package.json
index 1faa8648e..fae9d44aa 100644
--- a/package.json
+++ b/package.json
@@ -134,6 +134,7 @@
"@open-pencil/core": "workspace:*",
"@open-pencil/design-jsx": "workspace:*",
"@open-pencil/dom-css": "workspace:*",
+ "@open-pencil/feedback": "workspace:*",
"@open-pencil/fig": "workspace:*",
"@open-pencil/harness": "workspace:*",
"@open-pencil/kiwi": "workspace:*",
diff --git a/packages/docs/.vitepress/labels.ts b/packages/docs/.vitepress/labels.ts
index 946693c99..24af7cf71 100644
--- a/packages/docs/.vitepress/labels.ts
+++ b/packages/docs/.vitepress/labels.ts
@@ -24,6 +24,7 @@ export interface SidebarLabels {
architecture: string
techStack: string
comparison: string
+ privacy: string
figmaMatrix: string
}
@@ -177,6 +178,7 @@ export const EN: SidebarLabels = {
architecture: 'Architecture',
techStack: 'Tech Stack',
comparison: 'Comparison',
+ privacy: 'Privacy',
figmaMatrix: 'Figma Feature Matrix'
}
export const DE: SidebarLabels = {
@@ -205,6 +207,7 @@ export const DE: SidebarLabels = {
architecture: 'Architektur',
techStack: 'Tech-Stack',
comparison: 'Vergleich',
+ privacy: 'Datenschutz',
figmaMatrix: 'Figma-Funktionsmatrix'
}
export const IT: SidebarLabels = {
@@ -233,6 +236,7 @@ export const IT: SidebarLabels = {
architecture: 'Architettura',
techStack: 'Stack tecnologico',
comparison: 'Confronto',
+ privacy: 'Privacy',
figmaMatrix: 'Matrice funzionalità Figma'
}
export const FR: SidebarLabels = {
@@ -261,6 +265,7 @@ export const FR: SidebarLabels = {
architecture: 'Architecture',
techStack: 'Stack technique',
comparison: 'Comparaison',
+ privacy: 'Confidentialité',
figmaMatrix: 'Matrice des fonctionnalités Figma'
}
export const ES: SidebarLabels = {
@@ -289,6 +294,7 @@ export const ES: SidebarLabels = {
architecture: 'Arquitectura',
techStack: 'Stack tecnológico',
comparison: 'Comparación',
+ privacy: 'Privacidad',
figmaMatrix: 'Matriz de funcionalidades Figma'
}
export const PL: SidebarLabels = {
@@ -317,6 +323,7 @@ export const PL: SidebarLabels = {
architecture: 'Architektura',
techStack: 'Stack technologiczny',
comparison: 'Porównanie',
+ privacy: 'Prywatność',
figmaMatrix: 'Matryca funkcji Figma'
}
export const RU: SidebarLabels = {
@@ -345,5 +352,6 @@ export const RU: SidebarLabels = {
architecture: 'Архитектура',
techStack: 'Технологии',
comparison: 'Сравнение',
+ privacy: 'Конфиденциальность',
figmaMatrix: 'Матрица функций Figma'
}
diff --git a/packages/docs/.vitepress/sidebars.ts b/packages/docs/.vitepress/sidebars.ts
index be4127c10..2180c6dc8 100644
--- a/packages/docs/.vitepress/sidebars.ts
+++ b/packages/docs/.vitepress/sidebars.ts
@@ -8,6 +8,8 @@ export const guideSidebar = (prefix: string, labels: SidebarLabels): DefaultThem
{ text: labels.gettingStarted, link: `${prefix}/getting-started` },
{ text: labels.features, link: `${prefix}/overview/features` },
{ text: labels.comparison, link: `${prefix}/overview/comparison` },
+ // English only until translated; locales link to the canonical page.
+ { text: labels.privacy, link: '/overview/privacy' },
],
},
]
diff --git a/packages/docs/overview/privacy.md b/packages/docs/overview/privacy.md
new file mode 100644
index 000000000..517b23844
--- /dev/null
+++ b/packages/docs/overview/privacy.md
@@ -0,0 +1,95 @@
+---
+title: Privacy and Usage Stats
+description: What OpenPencil sends over the network, why it sends anonymous usage stats, and how to turn every part of it off.
+---
+
+<script setup>
+import { describeBuildFields, describePingFields, describeUsageEvents } from '@open-pencil/feedback/contract'
+
+const columns = [
+ { key: 'name', label: 'Field', kind: 'code' },
+ { key: 'values', label: 'Values', kind: 'description' }
+]
+
+function rows(fields) {
+ return fields.map((field) => ({
+ name: field.name,
+ description: field.description,
+ values: field.values.length > 0 ? field.values.join(', ') : 'A version number'
+ }))
+}
+
+const pingRows = rows(describePingFields())
+const buildFields = describeBuildFields()
+ .map((field) => field.name)
+ .join(', ')
+const events = describeUsageEvents()
+</script>
+
+# Privacy and Usage Stats
+
+- Your designs, file names, layer names, text, prompts, and keys never leave your device unless you share or sync them yourself.
+- Official builds send one anonymous ping a day, with no ID. You can turn it off.
+- Detailed usage stats are sent only if you say yes when asked, and you can stop at any time.
+
+## Why we collect anything
+
+OpenPencil is built by a small team. We need to know which platforms, file formats, and features people use so we can decide what to build next. We also need to show that OpenPencil is used, because that is what keeps the project funded. A count of active installs and a picture of which features matter answer both questions without knowing anything about you or your work.
+
+## The daily ping
+
+Once a day, an official build sends this to `feedback.openpencil.dev`:
+
+```http
+POST https://feedback.openpencil.dev/ping
+
+{ "version": "0.16.0", "platform": "macos", "arch": "arm64", "app": "desktop", "browser": "unknown", "usageStats": "denied" }
+```
+
+<SdkDataTable :columns="columns" :rows="pingRows" />
+
+It carries no ID, so pings from the same install cannot be linked. The answer to the usage stats question is the only way we learn how many people decline, since declining means nothing else is ever sent. The app stores only the date of its last ping, so it pings once a day. The server adds one to a counter for that day and build, and keeps nothing else. It does not log addresses, and it rejects a ping that carries any other field.
+
+The ping is on by default. Turn it off in **Settings → Privacy**.
+
+## Usage stats
+
+Usage stats are off until you agree. OpenPencil asks once, in a small prompt that appears after the welcome screen on first launch, or on a later launch if you have not answered, with two equal choices: **No thanks** and **Share stats**. Nothing is selected for you, and you can change your answer later in **Settings → Privacy**.
+
+When you agree, the app creates a random install ID on your device. It is not linked to an account, an email address, or anything else about you. Usage events are sent with it, together with the build fields above (<code>{{ buildFields }}</code>). When you stop sharing, the app deletes the ID; agreeing again creates a new one.
+
+These are all the events the app can send. The service at `feedback.openpencil.dev` checks every event against this list and rejects any event, property, or value that is not on it, so a modified app cannot send anything else through it either.
+
+<template v-for="event in events" :key="event.name">
+ <h3><code>{{ event.name }}</code></h3>
+ <p>{{ event.description }}</p>
+ <SdkDataTable v-if="event.properties.length" :columns="columns" :rows="rows(event.properties)" />
+</template>
+
+Accepted events go to [PostHog](https://posthog.com), a product analytics service, on its EU cloud. The request comes from our server, not your device, so PostHog never sees your address. Events create no person profiles and skip location lookups. We keep usage stats for 12 months.
+
+## Turning it all off
+
+- **Settings → Privacy** has a switch for the ping and one for usage stats.
+- In the desktop app, starting OpenPencil with `OPENPENCIL_TELEMETRY=0` or `DO_NOT_TRACK=1` in its environment turns off both.
+- Only official releases send anything. Development servers, self-built apps, and forks send nothing, because the switch that enables sending is set only when we build a release.
+
+## Cloud waitlist
+
+If you join the OpenPencil Cloud waitlist on this site, we store your email address and the optional note you add. We send one email to confirm the address and write again only when Cloud is ready for you. Addresses that are not confirmed are deleted after seven days, and every email has a link that removes yours.
+
+## Other network requests
+
+OpenPencil is local-first, but some features reach the network. The desktop app checks for updates on its own; everything else below connects only when you use that feature, and only to the service named.
+
+| Feature | Where it connects |
+| --- | --- |
+| Update checks (desktop) | GitHub Releases, for the latest version number |
+| AI chat and image tools | The provider you configure, with your own key; the model list comes from models.dev |
+| Collaboration rooms | Other people in the room directly; public brokers introduce peers, and a TURN relay carries traffic when a direct connection is not possible |
+| Cloud storage | The storage provider you configure |
+| Fonts | Google Fonts, which can supply a font a document uses that is not installed |
+| Icons | The Iconify API, when you search or insert icons |
+| Stock images | Unsplash or Pexels, when you search them |
+
+The app, the feedback service, and this page are open source. The event list lives in [`packages/feedback/src/contract`](https://github.com/open-pencil/open-pencil/tree/master/packages/feedback/src/contract), and the tables above are generated from it.
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 84550b42c..ecdb2b9af 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -16,6 +16,7 @@
},
"devDependencies": {
"@open-pencil/brand-tools": "workspace:*",
+ "@open-pencil/feedback": "workspace:*",
"@shikijs/vitepress-twoslash": "^4.4.3",
"@tailwindcss/vite": "^4.3.3",
"vitepress": "^2.0.0-alpha.19",
diff --git a/packages/vue/src/i18n/locales/de/diagnostics.json b/packages/vue/src/i18n/locales/de/diagnostics.json
index 3d49dc0b5..b7d45da4c 100644
--- a/packages/vue/src/i18n/locales/de/diagnostics.json
+++ b/packages/vue/src/i18n/locales/de/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "Laufzeit",
"noMatchingEvents": "Keine Ereignisse entsprechen diesen Filtern.",
"showMore": "Mehr anzeigen",
- "showingEvents": "{shown} von {total}"
+ "showingEvents": "{shown} von {total}",
+ "sharingTitle": "Mit OpenPencil teilen",
+ "sharingDescription": "Was diese App an das OpenPencil-Team sendet. Deine Designs, Dateinamen, Prompts und Schlüssel werden nie gesendet.",
+ "sharingPing": "Täglicher anonymer Ping",
+ "sharingPingDescription": "Einmal am Tag: App-Version, Betriebssystem und ob sie als Desktop- oder Web-App läuft. Keine ID.",
+ "sharingUsageStats": "Nutzungsstatistik",
+ "sharingUsageStatsDescription": "Welche Funktionen und Dateiformate genutzt werden, unter einer zufälligen ID, die keine Person nennt. Aus, solange du nicht zustimmst.",
+ "sharingDetails": "Was gesendet wird",
+ "sharingUnofficialBuild": "Dieser Build sendet nichts. Nur offizielle OpenPencil-Versionen senden Pings oder Nutzungsstatistik.",
+ "sharingDisabledByEnvironment": "Durch OPENPENCIL_TELEMETRY oder DO_NOT_TRACK in deiner Umgebung ausgeschaltet.",
+ "sharingQuestionTitle": "Hilfst du, OpenPencil zu verbessern?",
+ "sharingQuestionDescription": "Teile anonyme Nutzungsstatistik: App-Starts, Dateiformate und genutzte Funktionen. Nie deine Designs, Dateinamen oder Prompts. Sie zeigen uns, was wir als Nächstes bauen sollten und dass OpenPencil genutzt wird, was seine Finanzierung sichert.",
+ "sharingQuestionDecline": "Nein, danke",
+ "sharingQuestionAccept": "Statistik teilen",
+ "sharingQuestionAccepted": "Danke. Du kannst das in den Datenschutz-Einstellungen ändern.",
+ "sharingQuestionDeclined": "Die Nutzungsstatistik bleibt aus. Du kannst das in den Datenschutz-Einstellungen ändern.",
+ "sharingLocalData": "Nutzung und Diagnose speichern ihre Daten auf diesem Gerät und senden sie nie."
}
diff --git a/packages/vue/src/i18n/locales/de/settings.json b/packages/vue/src/i18n/locales/de/settings.json
index 2a6e34684..4a8e373b8 100644
--- a/packages/vue/src/i18n/locales/de/settings.json
+++ b/packages/vue/src/i18n/locales/de/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "KI und Agenten",
"usage": "Nutzung",
"diagnostics": "Diagnose",
+ "privacy": "Datenschutz",
"media": "Medien",
"mcp": "MCP",
"toolAccess": "Werkzeugzugriff",
diff --git a/packages/vue/src/i18n/locales/es/diagnostics.json b/packages/vue/src/i18n/locales/es/diagnostics.json
index 95fb10400..674bf338f 100644
--- a/packages/vue/src/i18n/locales/es/diagnostics.json
+++ b/packages/vue/src/i18n/locales/es/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "Ejecución",
"noMatchingEvents": "Ningún evento coincide con estos filtros.",
"showMore": "Mostrar más",
- "showingEvents": "{shown} de {total}"
+ "showingEvents": "{shown} de {total}",
+ "sharingTitle": "Compartir con OpenPencil",
+ "sharingDescription": "Lo que esta app envía al equipo de OpenPencil. Tus diseños, nombres de archivo, prompts y claves nunca se envían.",
+ "sharingPing": "Ping anónimo diario",
+ "sharingPingDescription": "Una vez al día: la versión de la app, el sistema operativo y si se ejecuta en escritorio o en la web. Sin ID.",
+ "sharingUsageStats": "Estadísticas de uso",
+ "sharingUsageStatsDescription": "Qué funciones y formatos de archivo se usan, con un ID aleatorio que no identifica a nadie. Desactivado salvo que aceptes.",
+ "sharingDetails": "Qué se envía",
+ "sharingUnofficialBuild": "Esta compilación no envía nada. Solo las versiones oficiales de OpenPencil envían pings o estadísticas de uso.",
+ "sharingDisabledByEnvironment": "Desactivado por OPENPENCIL_TELEMETRY o DO_NOT_TRACK en tu entorno.",
+ "sharingQuestionTitle": "¿Nos ayudas a mejorar OpenPencil?",
+ "sharingQuestionDescription": "Comparte estadísticas de uso anónimas: inicios de la app, formatos de archivo y funciones usadas. Nunca tus diseños, nombres de archivo ni prompts. Nos muestran qué construir a continuación y que OpenPencil se usa, lo que ayuda a financiarlo.",
+ "sharingQuestionDecline": "No, gracias",
+ "sharingQuestionAccept": "Compartir estadísticas",
+ "sharingQuestionAccepted": "Gracias. Puedes cambiarlo en los ajustes de Privacidad.",
+ "sharingQuestionDeclined": "Las estadísticas de uso seguirán desactivadas. Puedes cambiarlo en los ajustes de Privacidad.",
+ "sharingLocalData": "Uso y Diagnóstico guardan sus registros en este dispositivo y nunca los envían."
}
diff --git a/packages/vue/src/i18n/locales/es/settings.json b/packages/vue/src/i18n/locales/es/settings.json
index 5fe62d028..107405b8d 100644
--- a/packages/vue/src/i18n/locales/es/settings.json
+++ b/packages/vue/src/i18n/locales/es/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "IA y agentes",
"usage": "Uso",
"diagnostics": "Diagnóstico",
+ "privacy": "Privacidad",
"media": "Multimedia",
"mcp": "MCP",
"toolAccess": "Acceso a herramientas",
diff --git a/packages/vue/src/i18n/locales/fr/diagnostics.json b/packages/vue/src/i18n/locales/fr/diagnostics.json
index 26b4a7752..df38ae78b 100644
--- a/packages/vue/src/i18n/locales/fr/diagnostics.json
+++ b/packages/vue/src/i18n/locales/fr/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "Exécution",
"noMatchingEvents": "Aucun événement ne correspond à ces filtres.",
"showMore": "Afficher plus",
- "showingEvents": "{shown} sur {total}"
+ "showingEvents": "{shown} sur {total}",
+ "sharingTitle": "Partage avec OpenPencil",
+ "sharingDescription": "Ce que cette application envoie à l'équipe OpenPencil. Vos designs, noms de fichiers, prompts et clés ne sont jamais envoyés.",
+ "sharingPing": "Ping anonyme quotidien",
+ "sharingPingDescription": "Une fois par jour : la version de l'application, le système d'exploitation et s'il s'agit de l'application de bureau ou web. Aucun identifiant.",
+ "sharingUsageStats": "Statistiques d'utilisation",
+ "sharingUsageStatsDescription": "Les fonctionnalités et formats de fichier utilisés, sous un identifiant aléatoire qui ne désigne personne. Désactivé sauf accord de votre part.",
+ "sharingDetails": "Ce qui est envoyé",
+ "sharingUnofficialBuild": "Cette version n'envoie rien. Seules les versions officielles d'OpenPencil envoient des pings ou des statistiques d'utilisation.",
+ "sharingDisabledByEnvironment": "Désactivé par OPENPENCIL_TELEMETRY ou DO_NOT_TRACK dans votre environnement.",
+ "sharingQuestionTitle": "Aider à améliorer OpenPencil ?",
+ "sharingQuestionDescription": "Partagez des statistiques d'utilisation anonymes : lancements de l'application, formats de fichier et fonctionnalités utilisées. Jamais vos designs, noms de fichiers ou prompts. Elles nous montrent quoi construire ensuite et qu'OpenPencil est utilisé, ce qui contribue à son financement.",
+ "sharingQuestionDecline": "Non merci",
+ "sharingQuestionAccept": "Partager les statistiques",
+ "sharingQuestionAccepted": "Merci. Vous pouvez modifier ce choix dans les réglages Confidentialité.",
+ "sharingQuestionDeclined": "Les statistiques d'utilisation restent désactivées. Vous pouvez modifier ce choix dans les réglages Confidentialité.",
+ "sharingLocalData": "Utilisation et Diagnostics conservent leurs données sur cet appareil et ne les envoient jamais."
}
diff --git a/packages/vue/src/i18n/locales/fr/settings.json b/packages/vue/src/i18n/locales/fr/settings.json
index 3f5a86abe..0cf65dc09 100644
--- a/packages/vue/src/i18n/locales/fr/settings.json
+++ b/packages/vue/src/i18n/locales/fr/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "IA et agents",
"usage": "Utilisation",
"diagnostics": "Diagnostics",
+ "privacy": "Confidentialité",
"media": "Médias",
"mcp": "MCP",
"toolAccess": "Accès aux outils",
diff --git a/packages/vue/src/i18n/locales/it/diagnostics.json b/packages/vue/src/i18n/locales/it/diagnostics.json
index 35b36bd00..972d0ab81 100644
--- a/packages/vue/src/i18n/locales/it/diagnostics.json
+++ b/packages/vue/src/i18n/locales/it/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "Runtime",
"noMatchingEvents": "Nessun evento corrisponde a questi filtri.",
"showMore": "Mostra altro",
- "showingEvents": "{shown} di {total}"
+ "showingEvents": "{shown} di {total}",
+ "sharingTitle": "Condivisione con OpenPencil",
+ "sharingDescription": "Cosa invia questa app al team di OpenPencil. I tuoi design, nomi dei file, prompt e chiavi non vengono mai inviati.",
+ "sharingPing": "Ping anonimo giornaliero",
+ "sharingPingDescription": "Una volta al giorno: versione dell'app, sistema operativo e se è in esecuzione su desktop o sul web. Nessun ID.",
+ "sharingUsageStats": "Statistiche di utilizzo",
+ "sharingUsageStatsDescription": "Quali funzioni e formati di file vengono usati, con un ID casuale che non identifica nessuno. Disattivato finché non acconsenti.",
+ "sharingDetails": "Cosa viene inviato",
+ "sharingUnofficialBuild": "Questa build non invia nulla. Solo le versioni ufficiali di OpenPencil inviano ping o statistiche di utilizzo.",
+ "sharingDisabledByEnvironment": "Disattivato da OPENPENCIL_TELEMETRY o DO_NOT_TRACK nel tuo ambiente.",
+ "sharingQuestionTitle": "Vuoi aiutarci a migliorare OpenPencil?",
+ "sharingQuestionDescription": "Condividi statistiche di utilizzo anonime: avvii dell'app, formati di file e funzioni usate. Mai i tuoi design, nomi dei file o prompt. Ci mostrano cosa costruire dopo e che OpenPencil viene usato, il che aiuta a finanziarlo.",
+ "sharingQuestionDecline": "No, grazie",
+ "sharingQuestionAccept": "Condividi statistiche",
+ "sharingQuestionAccepted": "Grazie. Puoi cambiare questa scelta nelle impostazioni Privacy.",
+ "sharingQuestionDeclined": "Le statistiche di utilizzo restano disattivate. Puoi cambiare questa scelta nelle impostazioni Privacy.",
+ "sharingLocalData": "Utilizzo e Diagnostica conservano i dati su questo dispositivo e non li inviano mai."
}
diff --git a/packages/vue/src/i18n/locales/it/settings.json b/packages/vue/src/i18n/locales/it/settings.json
index 76c2fd6eb..38a2dfab9 100644
--- a/packages/vue/src/i18n/locales/it/settings.json
+++ b/packages/vue/src/i18n/locales/it/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "IA e agenti",
"usage": "Utilizzo",
"diagnostics": "Diagnostica",
+ "privacy": "Privacy",
"media": "Media",
"mcp": "MCP",
"toolAccess": "Accesso agli strumenti",
diff --git a/packages/vue/src/i18n/locales/ja/diagnostics.json b/packages/vue/src/i18n/locales/ja/diagnostics.json
index c418e5975..be8d7fdc3 100644
--- a/packages/vue/src/i18n/locales/ja/diagnostics.json
+++ b/packages/vue/src/i18n/locales/ja/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "ランタイム",
"noMatchingEvents": "このフィルターに一致するイベントはありません。",
"showMore": "さらに表示",
- "showingEvents": "{total} 件中 {shown} 件"
+ "showingEvents": "{total} 件中 {shown} 件",
+ "sharingTitle": "OpenPencil との共有",
+ "sharingDescription": "このアプリが OpenPencil チームに送信する内容です。デザイン、ファイル名、プロンプト、キーは送信されません。",
+ "sharingPing": "毎日の匿名 ping",
+ "sharingPingDescription": "1 日 1 回、アプリのバージョン、OS、デスクトップ版か Web 版かを送信します。ID は含みません。",
+ "sharingUsageStats": "利用統計",
+ "sharingUsageStatsDescription": "使われた機能とファイル形式を、個人を特定しないランダムな ID で送信します。同意しない限りオフです。",
+ "sharingDetails": "送信される内容",
+ "sharingUnofficialBuild": "このビルドは何も送信しません。ping や利用統計を送信するのは OpenPencil の公式リリースだけです。",
+ "sharingDisabledByEnvironment": "環境変数 OPENPENCIL_TELEMETRY または DO_NOT_TRACK によりオフになっています。",
+ "sharingQuestionTitle": "OpenPencil の改善に協力しませんか?",
+ "sharingQuestionDescription": "匿名の利用統計(アプリの起動、ファイル形式、使った機能)を共有します。デザイン、ファイル名、プロンプトは送信されません。次に作るべきものと OpenPencil が使われていることを示し、開発資金の確保に役立ちます。",
+ "sharingQuestionDecline": "共有しない",
+ "sharingQuestionAccept": "統計を共有",
+ "sharingQuestionAccepted": "ありがとうございます。プライバシーの設定でいつでも変更できます。",
+ "sharingQuestionDeclined": "利用統計はオフのままです。プライバシーの設定でいつでも変更できます。",
+ "sharingLocalData": "「使用状況」と「診断」の記録はこの端末に保存され、送信されることはありません。"
}
diff --git a/packages/vue/src/i18n/locales/ja/settings.json b/packages/vue/src/i18n/locales/ja/settings.json
index f55563868..b44ed31af 100644
--- a/packages/vue/src/i18n/locales/ja/settings.json
+++ b/packages/vue/src/i18n/locales/ja/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "AIとエージェント",
"usage": "使用状況",
"diagnostics": "診断",
+ "privacy": "プライバシー",
"media": "メディア",
"mcp": "MCP",
"toolAccess": "ツールへのアクセス",
diff --git a/packages/vue/src/i18n/locales/pl/diagnostics.json b/packages/vue/src/i18n/locales/pl/diagnostics.json
index c196d3b3a..7f735df24 100644
--- a/packages/vue/src/i18n/locales/pl/diagnostics.json
+++ b/packages/vue/src/i18n/locales/pl/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "Środowisko uruchomieniowe",
"noMatchingEvents": "Żadne zdarzenia nie pasują do tych filtrów.",
"showMore": "Pokaż więcej",
- "showingEvents": "{shown} z {total}"
+ "showingEvents": "{shown} z {total}",
+ "sharingTitle": "Udostępnianie OpenPencil",
+ "sharingDescription": "Co ta aplikacja wysyła zespołowi OpenPencil. Twoje projekty, nazwy plików, prompty i klucze nigdy nie są wysyłane.",
+ "sharingPing": "Codzienny anonimowy ping",
+ "sharingPingDescription": "Raz dziennie: wersja aplikacji, system operacyjny i to, czy działa na komputerze, czy w przeglądarce. Bez identyfikatora.",
+ "sharingUsageStats": "Statystyki użycia",
+ "sharingUsageStatsDescription": "Których funkcji i formatów plików używasz, pod losowym identyfikatorem, który nikogo nie wskazuje. Wyłączone, dopóki się nie zgodzisz.",
+ "sharingDetails": "Co jest wysyłane",
+ "sharingUnofficialBuild": "Ta kompilacja nic nie wysyła. Pingi i statystyki użycia wysyłają tylko oficjalne wydania OpenPencil.",
+ "sharingDisabledByEnvironment": "Wyłączone przez OPENPENCIL_TELEMETRY lub DO_NOT_TRACK w Twoim środowisku.",
+ "sharingQuestionTitle": "Pomożesz ulepszyć OpenPencil?",
+ "sharingQuestionDescription": "Udostępniaj anonimowe statystyki użycia: uruchomienia aplikacji, formaty plików i używane funkcje. Nigdy Twoje projekty, nazwy plików ani prompty. Pokazują nam, co budować dalej i że OpenPencil jest używany, co pomaga go finansować.",
+ "sharingQuestionDecline": "Nie, dziękuję",
+ "sharingQuestionAccept": "Udostępniaj statystyki",
+ "sharingQuestionAccepted": "Dziękujemy. Możesz to zmienić w ustawieniach prywatności.",
+ "sharingQuestionDeclined": "Statystyki użycia pozostaną wyłączone. Możesz to zmienić w ustawieniach prywatności.",
+ "sharingLocalData": "Użycie i Diagnostyka przechowują dane na tym urządzeniu i nigdy ich nie wysyłają."
}
diff --git a/packages/vue/src/i18n/locales/pl/settings.json b/packages/vue/src/i18n/locales/pl/settings.json
index e59794e5c..7c91d331b 100644
--- a/packages/vue/src/i18n/locales/pl/settings.json
+++ b/packages/vue/src/i18n/locales/pl/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "AI i agenci",
"usage": "Użycie",
"diagnostics": "Diagnostyka",
+ "privacy": "Prywatność",
"media": "Media",
"mcp": "MCP",
"toolAccess": "Dostęp do narzędzi",
diff --git a/packages/vue/src/i18n/locales/ru/diagnostics.json b/packages/vue/src/i18n/locales/ru/diagnostics.json
index 394369aab..0324f02f2 100644
--- a/packages/vue/src/i18n/locales/ru/diagnostics.json
+++ b/packages/vue/src/i18n/locales/ru/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "Среда выполнения",
"noMatchingEvents": "Нет событий, подходящих под эти фильтры.",
"showMore": "Показать ещё",
- "showingEvents": "{shown} из {total}"
+ "showingEvents": "{shown} из {total}",
+ "sharingTitle": "Передача данных OpenPencil",
+ "sharingDescription": "Что это приложение отправляет команде OpenPencil. Ваши макеты, имена файлов, промпты и ключи никогда не отправляются.",
+ "sharingPing": "Ежедневный анонимный пинг",
+ "sharingPingDescription": "Раз в день: версия приложения, операционная система и то, запущено ли оно на компьютере или в браузере. Без идентификатора.",
+ "sharingUsageStats": "Статистика использования",
+ "sharingUsageStatsDescription": "Какие функции и форматы файлов используются, под случайным идентификатором, который не указывает на человека. Выключено, пока вы не согласитесь.",
+ "sharingDetails": "Что отправляется",
+ "sharingUnofficialBuild": "Эта сборка ничего не отправляет. Пинги и статистику использования отправляют только официальные релизы OpenPencil.",
+ "sharingDisabledByEnvironment": "Отключено переменной OPENPENCIL_TELEMETRY или DO_NOT_TRACK в вашем окружении.",
+ "sharingQuestionTitle": "Поможете улучшить OpenPencil?",
+ "sharingQuestionDescription": "Делитесь анонимной статистикой использования: запуски приложения, форматы файлов и используемые функции. Никогда — ваши макеты, имена файлов или промпты. Она показывает нам, что делать дальше и что OpenPencil используют, а это помогает его финансировать.",
+ "sharingQuestionDecline": "Нет, спасибо",
+ "sharingQuestionAccept": "Делиться статистикой",
+ "sharingQuestionAccepted": "Спасибо. Это можно изменить в настройках конфиденциальности.",
+ "sharingQuestionDeclined": "Статистика использования останется выключенной. Это можно изменить в настройках конфиденциальности.",
+ "sharingLocalData": "Разделы «Использование» и «Диагностика» хранят данные на этом устройстве и никогда их не отправляют."
}
diff --git a/packages/vue/src/i18n/locales/ru/settings.json b/packages/vue/src/i18n/locales/ru/settings.json
index 7b349ff86..2d5086cc3 100644
--- a/packages/vue/src/i18n/locales/ru/settings.json
+++ b/packages/vue/src/i18n/locales/ru/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "ИИ и агенты",
"usage": "Использование",
"diagnostics": "Диагностика",
+ "privacy": "Конфиденциальность",
"media": "Медиа",
"mcp": "MCP",
"toolAccess": "Доступ к инструментам",
diff --git a/packages/vue/src/i18n/locales/zh-cn/diagnostics.json b/packages/vue/src/i18n/locales/zh-cn/diagnostics.json
index acc7a7a0c..ca43d66a0 100644
--- a/packages/vue/src/i18n/locales/zh-cn/diagnostics.json
+++ b/packages/vue/src/i18n/locales/zh-cn/diagnostics.json
@@ -64,5 +64,21 @@
"categoryRuntime": "运行时",
"noMatchingEvents": "没有符合这些筛选条件的事件。",
"showMore": "显示更多",
- "showingEvents": "{shown} / {total}"
+ "showingEvents": "{shown} / {total}",
+ "sharingTitle": "与 OpenPencil 共享",
+ "sharingDescription": "此应用发送给 OpenPencil 团队的内容。你的设计、文件名、提示词和密钥从不发送。",
+ "sharingPing": "每日匿名 ping",
+ "sharingPingDescription": "每天一次:应用版本、操作系统,以及运行在桌面端还是网页端。不含 ID。",
+ "sharingUsageStats": "使用统计",
+ "sharingUsageStatsDescription": "使用了哪些功能和文件格式,附带一个不指向任何人的随机 ID。除非你同意,否则关闭。",
+ "sharingDetails": "发送哪些内容",
+ "sharingUnofficialBuild": "此版本不发送任何内容。只有 OpenPencil 官方发布版会发送 ping 或使用统计。",
+ "sharingDisabledByEnvironment": "已被你环境中的 OPENPENCIL_TELEMETRY 或 DO_NOT_TRACK 关闭。",
+ "sharingQuestionTitle": "帮助改进 OpenPencil?",
+ "sharingQuestionDescription": "共享匿名使用统计:应用启动、文件格式和使用的功能。从不包含你的设计、文件名或提示词。它们告诉我们接下来该做什么,也证明 OpenPencil 有人在用,从而帮助它获得资金。",
+ "sharingQuestionDecline": "不用了",
+ "sharingQuestionAccept": "共享统计",
+ "sharingQuestionAccepted": "谢谢。你可以在隐私设置中更改此选项。",
+ "sharingQuestionDeclined": "使用统计将保持关闭。你可以在隐私设置中更改此选项。",
+ "sharingLocalData": "“使用情况”和“诊断”的记录保存在此设备上,从不发送。"
}
diff --git a/packages/vue/src/i18n/locales/zh-cn/settings.json b/packages/vue/src/i18n/locales/zh-cn/settings.json
index a2c1cc0cd..cb51364f2 100644
--- a/packages/vue/src/i18n/locales/zh-cn/settings.json
+++ b/packages/vue/src/i18n/locales/zh-cn/settings.json
@@ -18,6 +18,7 @@
"aiAndAgents": "AI 和代理",
"usage": "使用情况",
"diagnostics": "诊断",
+ "privacy": "隐私",
"media": "媒体",
"mcp": "MCP",
"toolAccess": "工具访问权限",
diff --git a/packages/vue/src/i18n/messages/diagnostics.ts b/packages/vue/src/i18n/messages/diagnostics.ts
index e70f85194..046aa4a17 100644
--- a/packages/vue/src/i18n/messages/diagnostics.ts
+++ b/packages/vue/src/i18n/messages/diagnostics.ts
@@ -69,7 +69,29 @@ export const diagnosticsMessageDefaults = {
clear: 'Clear',
clearDescription: 'This removes locally stored diagnostic events from this device.',
cleared: 'Diagnostics cleared.',
- copyFailed: 'Could not copy diagnostics to the clipboard.'
+ copyFailed: 'Could not copy diagnostics to the clipboard.',
+ sharingTitle: 'Sharing with OpenPencil',
+ sharingDescription:
+ 'What this app sends to the OpenPencil team. Your designs, file names, prompts, and keys are never sent.',
+ sharingPing: 'Daily anonymous ping',
+ sharingPingDescription:
+ 'Once a day: the app version, operating system, and whether it runs on desktop or the web. No ID.',
+ sharingUsageStats: 'Usage stats',
+ sharingUsageStatsDescription:
+ 'Which features and file formats are used, under a random ID that names no person. Off unless you agree.',
+ sharingDetails: 'What is sent',
+ sharingUnofficialBuild:
+ 'This build sends nothing. Only official OpenPencil releases send pings or usage stats.',
+ sharingDisabledByEnvironment:
+ 'Turned off by OPENPENCIL_TELEMETRY or DO_NOT_TRACK in your environment.',
+ sharingQuestionTitle: 'Help improve OpenPencil?',
+ sharingQuestionDescription:
+ 'Share anonymous usage stats: app launches, file formats, and features used. Never your designs, file names, or prompts. They show us what to build next and that OpenPencil is used, which keeps it funded.',
+ sharingQuestionDecline: 'No thanks',
+ sharingQuestionAccept: 'Share stats',
+ sharingQuestionAccepted: 'Thank you. You can change this in Privacy settings.',
+ sharingQuestionDeclined: 'Usage stats stay off. You can change this in Privacy settings.',
+ sharingLocalData: 'Usage and Diagnostics keep their records on this device and never send them.'
} as const
export const diagnosticsMessages = i18n('diagnostics', diagnosticsMessageDefaults)
diff --git a/packages/vue/src/i18n/messages/settings.ts b/packages/vue/src/i18n/messages/settings.ts
index e22fab7d3..758634be9 100644
--- a/packages/vue/src/i18n/messages/settings.ts
+++ b/packages/vue/src/i18n/messages/settings.ts
@@ -47,6 +47,7 @@ export const settingsMessageDefaults = {
aiAndAgents: 'AI & agents',
usage: 'Usage',
diagnostics: 'Diagnostics',
+ privacy: 'Privacy',
media: 'Media',
mcp: 'MCP',
toolAccess: 'Tool access',
diff --git a/src/App.vue b/src/App.vue
index 167e05ea3..0c2e934f8 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -22,6 +22,7 @@ import LibraryUpdateReviewDialog from '@/components/libraries/review/LibraryUpda
import RecoveryDialog from '@/components/recovery/RecoveryDialog.vue'
import AISetupDialog from '@/components/settings/ai-setup/AISetupDialog.vue'
import SettingsDialog from '@/components/settings/SettingsDialog.vue'
+import UsageStatsPrompt from '@/components/sharing/UsageStatsPrompt.vue'
import AppShell from '@/components/shell/AppShell.vue'
import Toaster from '@/components/shell/Toaster.vue'
import VoiceCallAudio from '@/components/voice-call/VoiceCallAudio.vue'
@@ -63,6 +64,7 @@ onMounted(() => {
<UnsavedChangesDialog />
<PublishLibraryDialog />
<LibraryUpdateReviewDialog />
+ <UsageStatsPrompt />
<Toaster />
<VoiceCallAudio />
</TooltipProvider>
diff --git a/src/app/ai/chat/transports.ts b/src/app/ai/chat/transports.ts
index 40532c244..d2bb1aa8c 100644
--- a/src/app/ai/chat/transports.ts
+++ b/src/app/ai/chat/transports.ts
@@ -35,6 +35,7 @@ import {
} from '@/app/diagnostics/events'
import type { AIDiagnosticContext } from '@/app/diagnostics/events/ai'
import type { getActiveEditorStore } from '@/app/editor/active-store'
+import { trackUsage } from '@/app/telemetry'
import { resumableTransport } from './history/continuation'
import { updateMessage } from './metadata'
@@ -255,6 +256,7 @@ export function createChatSessionManager({
if (isAbort) recordChatStopped(context)
else if (!isDisconnect && !isError) {
recordChatCompleted({ finishReason: finishReason ?? null }, context)
+ trackUsage({ name: 'ai_reply_finished', provider: providerID.value })
}
}
diff --git a/src/app/ai/models/settings/onboarding/dialog.ts b/src/app/ai/models/settings/onboarding/dialog.ts
index b989de4d9..f1e5b524f 100644
--- a/src/app/ai/models/settings/onboarding/dialog.ts
+++ b/src/app/ai/models/settings/onboarding/dialog.ts
@@ -22,14 +22,18 @@ export function closeAISetup(): void {
updateAISetupState('done')
}
-/** Offers the welcome to a fresh install; anyone who already configured AI never sees it. */
-export function offerAISetupOnFirstRun(): void {
+/**
+ * Offers the welcome to a fresh install; anyone who already configured AI never sees it.
+ * Returns whether the welcome opened.
+ */
+export function offerAISetupOnFirstRun(): boolean {
// The native test binary starts every run with an empty data store.
- if (import.meta.env.MODE === 'native-test') return
- if (appPreferences.value.onboarding.aiSetup === 'done') return
+ if (import.meta.env.MODE === 'native-test') return false
+ if (appPreferences.value.onboarding.aiSetup === 'done') return false
if (!isUnconfiguredModelSettings(aiModelSettings.value)) {
updateAISetupState('done')
- return
+ return false
}
openAISetup('welcome')
+ return true
}
diff --git a/src/app/document/export/create.ts b/src/app/document/export/create.ts
index bad1146e5..d362a9361 100644
--- a/src/app/document/export/create.ts
+++ b/src/app/document/export/create.ts
@@ -12,6 +12,7 @@ import {
type ExportedFile
} from '@/app/document/export/files'
import type { ExportOptions } from '@/app/document/export/types'
+import { trackDocumentFormat } from '@/app/telemetry'
type DownloadBlob = (data: Uint8Array, filename: string, mime: string) => void
@@ -57,8 +58,8 @@ export function createDocumentExportActions(
}
}
- async function saveExportFile(file: ExportedFile) {
- await saveExportedFile(
+ function saveExportFile(file: ExportedFile): Promise<boolean> {
+ return saveExportedFile(
file.bytes,
file.fileName,
file.format,
@@ -73,7 +74,9 @@ export function createDocumentExportActions(
formatId: string,
options?: ExportOptions
) {
- await saveExportFile(await renderExportFile(target, formatId, options))
+ if (await saveExportFile(await renderExportFile(target, formatId, options))) {
+ trackDocumentFormat('document_exported', formatId)
+ }
}
// Export a batch of targets. A single file downloads directly; multiple files
@@ -86,21 +89,22 @@ export function createDocumentExportActions(
files.push(await renderExportFile(request.target, request.formatId, request.options))
}
- if (files.length === 1) {
- await saveExportFile(files[0])
- return
- }
-
const baseNames = new Set(requests.map((r) => getExportBaseName(editor.graph, r.target)))
const zipBaseName = baseNames.size === 1 ? [...baseNames][0] : 'export'
- await saveExportedFile(
- bundleExportFiles(files),
- `${zipBaseName}.zip`,
- 'ZIP',
- '.zip',
- 'application/zip',
- downloadBlob
- )
+ const saved =
+ files.length === 1
+ ? await saveExportFile(files[0])
+ : await saveExportedFile(
+ bundleExportFiles(files),
+ `${zipBaseName}.zip`,
+ 'ZIP',
+ '.zip',
+ 'application/zip',
+ downloadBlob
+ )
+ // Counted once delivered, so a failed render or a cancelled save is not an export.
+ if (saved)
+ for (const { formatId } of requests) trackDocumentFormat('document_exported', formatId)
}
async function exportSelection(scale: number, formatId: BuiltinIOFormatId) {
diff --git a/src/app/document/export/files.ts b/src/app/document/export/files.ts
index 3ab342fd7..02e9b43e3 100644
--- a/src/app/document/export/files.ts
+++ b/src/app/document/export/files.ts
@@ -145,6 +145,7 @@ export async function writeTauriExportFile(path: string, data: Uint8Array) {
await tauriWrite(path, data)
}
+/** Saves an exported file and reports whether it was saved; `false` means the person cancelled. */
export async function saveExportedFile(
data: Uint8Array,
fileName: string,
@@ -152,12 +153,12 @@ export async function saveExportedFile(
ext: string,
mime: string,
downloadBlob: DownloadBlob
-) {
+): Promise<boolean> {
if (isTauri()) {
const path = await chooseTauriExportPath(fileName, format, ext)
- if (!path) return
+ if (!path) return false
await writeTauriExportFile(path, data)
- return
+ return true
}
if (supportsFileSystemAccess()) {
@@ -171,16 +172,16 @@ export async function saveExportedFile(
}
]
})
- if (handle) {
- const writable = await handle.createWritable()
- await writable.write(new Uint8Array(data))
- await writable.close()
- }
- return
+ if (!handle) return false
+ const writable = await handle.createWritable()
+ await writable.write(new Uint8Array(data))
+ await writable.close()
+ return true
} catch (e) {
- if ((e as Error).name === 'AbortError') return
+ if ((e as Error).name === 'AbortError') return false
}
}
downloadBlob(data, fileName, mime)
+ return true
}
diff --git a/src/app/document/io/source.ts b/src/app/document/io/source.ts
index e799a7ddf..e086a3bcc 100644
--- a/src/app/document/io/source.ts
+++ b/src/app/document/io/source.ts
@@ -15,6 +15,7 @@ import { createDocumentRecovery } from '@/app/document/recovery'
import { recoveryEnabled } from '@/app/document/recovery/preferences'
import type { StorageDocumentBinding, StorageProviderID } from '@/app/integrations/storage/types'
import { createCanvasId } from '@/app/storage/id'
+import { trackDocumentFormat } from '@/app/telemetry'
type DocumentSourceState = EditorState & {
documentName: string
@@ -130,6 +131,7 @@ export function createDocumentSourceActions({
setSourceIdentity({ handle: handle ?? null, path: path ?? null })
markDocumentSaved()
void recovery.markProtectedVersion(changes.capture())
+ trackDocumentFormat('document_opened', sourceFormat)
if (isFig && (handle || path)) {
void startWatchingFile()
}
diff --git a/src/app/settings/dialog.ts b/src/app/settings/dialog.ts
index 72bcc0aac..7c2586d62 100644
--- a/src/app/settings/dialog.ts
+++ b/src/app/settings/dialog.ts
@@ -6,6 +6,7 @@ export type SettingsSection =
| 'ai'
| 'usage'
| 'diagnostics'
+ | 'privacy'
| 'mcp'
| 'tools'
| 'media'
diff --git a/src/app/settings/preferences/store.ts b/src/app/settings/preferences/store.ts
index f08e4ac7b..cf0895a0d 100644
--- a/src/app/settings/preferences/store.ts
+++ b/src/app/settings/preferences/store.ts
@@ -53,6 +53,17 @@ export interface CommentPreferences {
sort: CommentSort
}
+/** Whether the person was asked to share usage stats, and what they answered. */
+export const USAGE_STATS_CONSENTS = ['unset', 'granted', 'denied'] as const
+export type UsageStatsConsent = (typeof USAGE_STATS_CONSENTS)[number]
+
+export interface SharingPreferences {
+ /** The daily anonymous ping, on unless turned off. */
+ dailyPing: boolean
+ /** Opt-in usage stats; nothing is sent until this is `granted`. */
+ usageStats: UsageStatsConsent
+}
+
/** Whether guided AI setup was offered and finished or skipped. */
export const AI_SETUP_STATES = ['pending', 'done'] as const
export type AISetupState = (typeof AI_SETUP_STATES)[number]
@@ -82,6 +93,7 @@ export interface AppPreferences {
onboarding: {
aiSetup: AISetupState
}
+ sharing: SharingPreferences
}
export const DEFAULT_APP_PREFERENCES: Readonly<AppPreferences> = {
@@ -107,7 +119,8 @@ export const DEFAULT_APP_PREFERENCES: Readonly<AppPreferences> = {
sort: 'newest'
},
toolbar: structuredClone(DEFAULT_TOOLBAR_LAYOUT),
- onboarding: { aiSetup: 'pending' }
+ onboarding: { aiSetup: 'pending' },
+ sharing: { dailyPing: true, usageStats: 'unset' }
}
const STORAGE_KEY = 'open-pencil:preferences:v1'
@@ -183,6 +196,10 @@ const appPreferencesSchema = section({
),
onboarding: section({
aiSetup: v.fallback(v.picklist(AI_SETUP_STATES), defaults.onboarding.aiSetup)
+ }),
+ sharing: section({
+ dailyPing: v.fallback(v.boolean(), defaults.sharing.dailyPing),
+ usageStats: v.fallback(v.picklist(USAGE_STATS_CONSENTS), defaults.sharing.usageStats)
})
})
@@ -221,6 +238,13 @@ export function updateAISetupState(aiSetup: AISetupState): void {
appPreferences.value = { ...appPreferences.value, onboarding: { aiSetup } }
}
+export function updateSharingPreferences(changes: Partial<SharingPreferences>): void {
+ appPreferences.value = {
+ ...appPreferences.value,
+ sharing: { ...appPreferences.value.sharing, ...changes }
+ }
+}
+
export function updateCanvasRenderingMode(canvasMode: CanvasRenderingMode): void {
appPreferences.value = {
...appPreferences.value,
diff --git a/src/app/telemetry/build.ts b/src/app/telemetry/build.ts
new file mode 100644
index 000000000..355be23d2
--- /dev/null
+++ b/src/app/telemetry/build.ts
@@ -0,0 +1,36 @@
+import type { Architecture, Build } from '@open-pencil/feedback/contract'
+
+import { APP_VERSION } from '@/app/runtime/version'
+import { describeEnvironment } from '@/app/shell/support/detect'
+import { IS_TAURI } from '@/constants'
+
+function architecture(arch: string): Architecture {
+ if (arch === 'aarch64') return 'arm64'
+ if (arch === 'x86_64') return 'x64'
+ return 'unknown'
+}
+
+async function detectBuild(): Promise<Build> {
+ const facts = { userAgent: navigator.userAgent, maxTouchPoints: navigator.maxTouchPoints }
+ if (!IS_TAURI) {
+ const { os, browser } = describeEnvironment(facts)
+ return { version: APP_VERSION, platform: os, arch: 'unknown', app: 'web', browser }
+ }
+ const { platform, arch } = await import('@tauri-apps/plugin-os')
+ const { os } = describeEnvironment(facts, { platform: platform() })
+ return {
+ version: APP_VERSION,
+ platform: os,
+ arch: architecture(arch()),
+ app: 'desktop',
+ browser: 'unknown'
+ }
+}
+
+let build: Promise<Build> | null = null
+
+/** The build fields every ping and usage batch carries; nothing else about the device is read. */
+export function currentBuild(): Promise<Build> {
+ build ??= detectBuild()
+ return build
+}
diff --git a/src/app/telemetry/client.ts b/src/app/telemetry/client.ts
new file mode 100644
index 000000000..2ed392b2d
--- /dev/null
+++ b/src/app/telemetry/client.ts
@@ -0,0 +1,120 @@
+import { useDebounceFn } from '@vueuse/core'
+import type { Ref } from 'vue'
+
+import {
+ DOCUMENT_FORMATS,
+ USAGE_BATCH_LIMIT,
+ type DocumentFormat,
+ type Build,
+ type Ping,
+ type UsageBatch,
+ type UsageEvent
+} from '@open-pencil/feedback/contract'
+
+import type { SharingPreferences } from '@/app/settings/preferences/store'
+
+import type { SharingState } from './state'
+
+type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never
+
+/** A usage event as callers report it; the time is added when it is recorded. */
+export type UsageEventInput = DistributiveOmit<UsageEvent, 'timestamp'>
+
+export interface SharingClientOptions {
+ /** Whether this build may send anything at all. */
+ enabled: boolean
+ preferences: () => SharingPreferences
+ state: Ref<SharingState>
+ build: () => Promise<Build>
+ disabledByEnvironment: () => Promise<boolean>
+ /** Sends to the feedback service and reports whether each request was accepted. */
+ send: {
+ ping: (ping: Ping) => Promise<boolean>
+ ingest: (batch: UsageBatch, options: { keepalive?: boolean }) => Promise<boolean>
+ }
+ now?: () => Date
+}
+
+const FLUSH_DELAY_MS = 5_000
+const FLUSH_MAX_WAIT_MS = 30_000
+
+const isDocumentFormat = (format: string): format is DocumentFormat =>
+ (DOCUMENT_FORMATS as readonly string[]).includes(format)
+
+export function createSharingClient(options: SharingClientOptions) {
+ const now = options.now ?? (() => new Date())
+ const pending: UsageEvent[] = []
+
+ function activeInstallId(): string | null {
+ if (!options.enabled || options.preferences().usageStats !== 'granted') return null
+ return options.state.value.installId
+ }
+
+ /**
+ * Sends today's anonymous ping unless this install already did, the person turned it off, or
+ * the build or environment sends nothing. A failed ping is retried on the next check.
+ */
+ async function sendDailyPing(): Promise<void> {
+ if (!options.enabled || !options.preferences().dailyPing) return
+ const day = now().toISOString().slice(0, 10)
+ if (options.state.value.lastPingDay === day) return
+ if (await options.disabledByEnvironment()) return
+ const build = await options.build()
+ // The person may have turned the ping off while the checks above were pending.
+ const { dailyPing, usageStats } = options.preferences()
+ if (!dailyPing) return
+ const ping: Ping = { ...build, usageStats }
+ if (await options.send.ping(ping)) {
+ options.state.value = { ...options.state.value, lastPingDay: day }
+ }
+ }
+
+ /** Sends what is queued; events that fail to send are dropped rather than piling up. */
+ async function flushUsage(flush: { keepalive?: boolean } = {}): Promise<void> {
+ if (await options.disabledByEnvironment()) {
+ pending.length = 0
+ return
+ }
+ while (pending.length > 0) {
+ const build = await options.build()
+ // Read after every wait, so stopping takes effect before the next request goes out.
+ const installId = activeInstallId()
+ if (!installId) {
+ pending.length = 0
+ return
+ }
+ const events = pending.splice(0, USAGE_BATCH_LIMIT)
+ const batch: UsageBatch = { ...build, installId, events }
+ await options.send.ingest(batch, flush)
+ }
+ }
+
+ const scheduleFlush = useDebounceFn(() => flushUsage(), FLUSH_DELAY_MS, {
+ maxWait: FLUSH_MAX_WAIT_MS
+ })
+
+ /** Records a usage event when the person agreed to share usage stats; otherwise does nothing. */
+ function trackUsage(event: UsageEventInput): void {
+ if (!activeInstallId()) return
+ pending.push({ ...event, timestamp: now().toISOString() })
+ void scheduleFlush()
+ }
+
+ /** Reports a file format by its IO format ID; formats off the shared list are not reported. */
+ function trackDocumentFormat(name: 'document_opened' | 'document_exported', format: string) {
+ if (isDocumentFormat(format)) trackUsage({ name, format })
+ }
+
+ return {
+ sendDailyPing,
+ flushUsage,
+ trackUsage,
+ trackDocumentFormat,
+ /** Forgets queued events, for when the person stops sharing. */
+ discardPendingUsage: () => {
+ pending.length = 0
+ }
+ }
+}
+
+export type SharingClient = ReturnType<typeof createSharingClient>
diff --git a/src/app/telemetry/config.ts b/src/app/telemetry/config.ts
new file mode 100644
index 000000000..4d56808ad
--- /dev/null
+++ b/src/app/telemetry/config.ts
@@ -0,0 +1,6 @@
+/**
+ * Whether this build may send anything. Only official release builds set the flag, so forks,
+ * self-built apps, dev servers, and tests send no pings or usage stats.
+ */
+export const FEEDBACK_ENABLED =
+ import.meta.env.PROD && import.meta.env.VITE_OPENPENCIL_FEEDBACK === 'on'
diff --git a/src/app/telemetry/consent.ts b/src/app/telemetry/consent.ts
new file mode 100644
index 000000000..ef4359f3d
--- /dev/null
+++ b/src/app/telemetry/consent.ts
@@ -0,0 +1,51 @@
+import { computed, ref } from 'vue'
+
+import type { ConsentSource } from '@open-pencil/feedback/contract'
+import { randomHex } from '@open-pencil/scene-graph/random'
+import { locale } from '@open-pencil/vue'
+
+import { appPreferences, updateSharingPreferences } from '@/app/settings/preferences/store'
+
+import { FEEDBACK_ENABLED } from './config'
+import { sharingClient } from './instance'
+import { sharingDisabledByEnvironment, sharingState } from './state'
+
+/** Whether this build asks about usage stats at all: official builds, environment permitting. */
+const askable = ref(false)
+
+/**
+ * Where the question is open, or `null`: `welcome` right after the first-run welcome closes,
+ * `prompt` on a later launch, for installs that updated or never answered.
+ */
+export const usageStatsPrompt = ref<Exclude<ConsentSource, 'settings'> | null>(null)
+
+export const usageStatsConsent = computed(() => appPreferences.value.sharing.usageStats)
+
+/**
+ * Starting to share makes a new random ID and records where the person agreed; stopping deletes
+ * the ID and anything queued.
+ */
+export function setUsageStatsConsent(granted: boolean, source: ConsentSource): void {
+ updateSharingPreferences({ usageStats: granted ? 'granted' : 'denied' })
+ sharingState.value = {
+ ...sharingState.value,
+ installId: granted ? (sharingState.value.installId ?? randomHex(16)) : null
+ }
+ usageStatsPrompt.value = null
+ if (!granted) {
+ sharingClient.discardPendingUsage()
+ return
+ }
+ sharingClient.trackUsage({ name: 'usage_stats_enabled', source })
+ sharingClient.trackUsage({ name: 'app_opened', locale: locale.get() })
+}
+
+/** Opens the question unless this build or environment sends nothing, or it was answered. */
+export function offerUsageStatsPrompt(source: Exclude<ConsentSource, 'settings'>): void {
+ if (!askable.value || usageStatsConsent.value !== 'unset') return
+ usageStatsPrompt.value = source
+}
+
+export async function resolveUsageStatsQuestion(): Promise<void> {
+ askable.value = FEEDBACK_ENABLED && !(await sharingDisabledByEnvironment())
+}
diff --git a/src/app/telemetry/index.ts b/src/app/telemetry/index.ts
new file mode 100644
index 000000000..75d3e900a
--- /dev/null
+++ b/src/app/telemetry/index.ts
@@ -0,0 +1,33 @@
+import { useEventListener, useIntervalFn } from '@vueuse/core'
+
+import { locale } from '@open-pencil/vue'
+
+import { resolveUsageStatsQuestion } from './consent'
+import { sharingClient } from './instance'
+
+export {
+ offerUsageStatsPrompt,
+ setUsageStatsConsent,
+ usageStatsConsent,
+ usageStatsPrompt
+} from './consent'
+export type { UsageEventInput } from './client'
+
+export const { trackUsage, trackDocumentFormat } = sharingClient
+
+/** An app left open for days still pings once per day it is open. */
+const PING_CHECK_INTERVAL_MS = 60 * 60 * 1000
+
+let started = false
+
+/** Starts the daily ping and records the launch; call once when the editor opens. */
+export async function startSharing(): Promise<void> {
+ if (started) return
+ started = true
+ await resolveUsageStatsQuestion()
+ void sharingClient.sendDailyPing()
+ useIntervalFn(() => void sharingClient.sendDailyPing(), PING_CHECK_INTERVAL_MS)
+ // Closing the window sends what is queued instead of waiting for the next batch.
+ useEventListener(window, 'pagehide', () => void sharingClient.flushUsage({ keepalive: true }))
+ trackUsage({ name: 'app_opened', locale: locale.get() })
+}
diff --git a/src/app/telemetry/instance.ts b/src/app/telemetry/instance.ts
new file mode 100644
index 000000000..d117dbe0e
--- /dev/null
+++ b/src/app/telemetry/instance.ts
@@ -0,0 +1,34 @@
+import { createFeedbackClient } from '@open-pencil/feedback/client'
+
+import { appPreferences } from '@/app/settings/preferences/store'
+
+import { currentBuild } from './build'
+import { createSharingClient } from './client'
+import { FEEDBACK_ENABLED } from './config'
+import { sharingDisabledByEnvironment, sharingState } from './state'
+
+/**
+ * The browser's own `fetch`, taken when the app loads. Core's web-font loader swaps the global
+ * `fetch` while providers load and refuses hosts other than font CDNs, which would drop a ping
+ * sent at startup (`browser-fetch.ts` takes it the same way).
+ */
+const feedback = createFeedbackClient({ fetch: globalThis.fetch.bind(globalThis) })
+
+async function accepted(request: Promise<Response>): Promise<boolean> {
+ const response = await request.catch(() => null)
+ return response?.ok ?? false
+}
+
+/** The app's one sharing client, sending to the feedback service when the build allows. */
+export const sharingClient = createSharingClient({
+ enabled: FEEDBACK_ENABLED,
+ preferences: () => appPreferences.value.sharing,
+ state: sharingState,
+ build: currentBuild,
+ disabledByEnvironment: sharingDisabledByEnvironment,
+ send: {
+ ping: (ping) => accepted(feedback.ping.$post({ json: ping })),
+ ingest: (batch, { keepalive }) =>
+ accepted(feedback.ingest.$post({ json: batch }, { init: { keepalive } }))
+ }
+})
diff --git a/src/app/telemetry/settings.ts b/src/app/telemetry/settings.ts
new file mode 100644
index 000000000..6473d2927
--- /dev/null
+++ b/src/app/telemetry/settings.ts
@@ -0,0 +1,28 @@
+import { computed, onMounted, ref } from 'vue'
+
+import { appPreferences, updateSharingPreferences } from '@/app/settings/preferences/store'
+
+import { FEEDBACK_ENABLED } from './config'
+import { setUsageStatsConsent } from './consent'
+import { sharingDisabledByEnvironment } from './state'
+
+/** The Sharing section's switches, and why nothing is sent when nothing can be. */
+export function useSharingSettings() {
+ const disabledByEnvironment = ref(false)
+ onMounted(async () => {
+ disabledByEnvironment.value = await sharingDisabledByEnvironment()
+ })
+
+ return {
+ dailyPing: computed({
+ get: () => appPreferences.value.sharing.dailyPing,
+ set: (dailyPing: boolean) => updateSharingPreferences({ dailyPing })
+ }),
+ usageStats: computed({
+ get: () => appPreferences.value.sharing.usageStats === 'granted',
+ set: (granted: boolean) => setUsageStatsConsent(granted, 'settings')
+ }),
+ unofficialBuild: !FEEDBACK_ENABLED,
+ disabledByEnvironment
+ }
+}
diff --git a/src/app/telemetry/state.ts b/src/app/telemetry/state.ts
new file mode 100644
index 000000000..f46e29835
--- /dev/null
+++ b/src/app/telemetry/state.ts
@@ -0,0 +1,53 @@
+import { useLocalStorage } from '@vueuse/core'
+import * as v from 'valibot'
+
+import { IS_TAURI } from '@/constants'
+
+/** Device state behind sharing, kept apart from preferences because people never edit it. */
+export interface SharingState {
+ /** Random ID made when the person agreed to usage stats, removed when they stop. */
+ installId: string | null
+ /** UTC day of the last delivered ping, so an install pings once a day. */
+ lastPingDay: string | null
+}
+
+const SharingStateSchema = v.object({
+ installId: v.fallback(v.nullable(v.pipe(v.string(), v.regex(/^[0-9a-f]{32}$/))), null),
+ lastPingDay: v.fallback(v.nullable(v.pipe(v.string(), v.isoDate())), null)
+})
+
+export const sharingState = useLocalStorage<SharingState>(
+ 'open-pencil:sharing:v1',
+ { installId: null, lastPingDay: null },
+ {
+ mergeDefaults: (stored) =>
+ v.parse(
+ v.fallback(SharingStateSchema, () => v.parse(SharingStateSchema, {})),
+ stored
+ )
+ }
+)
+
+/** How long the desktop app waits to learn whether its environment turns sharing off. */
+const ENVIRONMENT_CHECK_TIMEOUT_MS = 2_000
+
+let disabledByEnvironment: Promise<boolean> | null = null
+
+async function readDesktopEnvironment(): Promise<boolean> {
+ const { invoke } = await import('@tauri-apps/api/core')
+ const timeout = new Promise<boolean>((resolve) => {
+ setTimeout(() => resolve(true), ENVIRONMENT_CHECK_TIMEOUT_MS)
+ })
+ return Promise.race([invoke<boolean>('sharing_disabled_by_env'), timeout])
+}
+
+/**
+ * `OPENPENCIL_TELEMETRY=0` or `DO_NOT_TRACK` in the desktop app's environment turns sharing off.
+ * A check that fails or does not answer counts as off, so nothing is sent against the person's wish.
+ */
+export function sharingDisabledByEnvironment(): Promise<boolean> {
+ disabledByEnvironment ??= IS_TAURI
+ ? readDesktopEnvironment().catch(() => true)
+ : Promise.resolve(false)
+ return disabledByEnvironment
+}
diff --git a/src/components/settings/SettingsDialog.vue b/src/components/settings/SettingsDialog.vue
index d8cb54841..de8976741 100644
--- a/src/components/settings/SettingsDialog.vue
+++ b/src/components/settings/SettingsDialog.vue
@@ -19,6 +19,7 @@ import SettingsPage from '@/components/settings/layout/SettingsPage.vue'
import MCPWorkspacePanel from '@/components/settings/mcp/MCPWorkspacePanel.vue'
import MediaSettingsPanel from '@/components/settings/media/MediaSettingsPanel.vue'
import ModelsPanel from '@/components/settings/models/ModelsPanel.vue'
+import PrivacySettingsPanel from '@/components/settings/privacy/PrivacySettingsPanel.vue'
import StorageSettingsPanel from '@/components/settings/storage/StorageSettingsPanel.vue'
import ToolAccessSettingsPanel from '@/components/settings/tool-access/ToolAccessSettingsPanel.vue'
import ToolbarSettingsPanel from '@/components/settings/toolbar/ToolbarSettingsPanel.vue'
@@ -49,6 +50,7 @@ const sections = computed(
{ value: 'ai', label: settings.value.aiAndAgents },
{ value: 'usage', label: settings.value.usage },
{ value: 'diagnostics', label: settings.value.diagnostics },
+ { value: 'privacy', label: settings.value.privacy },
{ value: 'mcp', label: settings.value.mcp },
{ value: 'tools', label: settings.value.toolAccess },
{ value: 'media', label: settings.value.media },
@@ -121,6 +123,10 @@ function onOpenChange(open: boolean): void {
<template #leading><icon-lucide-activity class="size-3.5" /></template>
{{ settings.diagnostics }}
</AppTabsTrigger>
+ <AppTabsTrigger value="privacy" data-test-id="settings-section-privacy">
+ <template #leading><icon-lucide-shield class="size-3.5" /></template>
+ {{ settings.privacy }}
+ </AppTabsTrigger>
<AppTabsTrigger value="mcp" data-test-id="settings-section-mcp">
<template #leading><icon-lucide-plug class="size-3.5" /></template>
{{ settings.mcp }}
@@ -158,6 +164,9 @@ function onOpenChange(open: boolean): void {
<AppTabsContent value="diagnostics" as-child>
<SettingsPage><DiagnosticsSettingsPanel /></SettingsPage>
</AppTabsContent>
+ <AppTabsContent value="privacy" as-child>
+ <SettingsPage><PrivacySettingsPanel /></SettingsPage>
+ </AppTabsContent>
<AppTabsContent value="mcp" as-child>
<MCPWorkspacePanel />
</AppTabsContent>
diff --git a/src/components/settings/privacy/PrivacySettingsPanel.vue b/src/components/settings/privacy/PrivacySettingsPanel.vue
new file mode 100644
index 000000000..ba9d0ff34
--- /dev/null
+++ b/src/components/settings/privacy/PrivacySettingsPanel.vue
@@ -0,0 +1,45 @@
+<script setup lang="ts">
+import { useI18n } from '@open-pencil/vue'
+
+import { useSharingSettings } from '@/app/telemetry/settings'
+import SettingsGroup from '@/components/settings/layout/SettingsGroup.vue'
+import SettingsLink from '@/components/settings/layout/SettingsLink.vue'
+import SettingsRow from '@/components/settings/layout/SettingsRow.vue'
+import SettingsSection from '@/components/settings/layout/SettingsSection.vue'
+import AppAlert from '@/components/ui/feedback/AppAlert.vue'
+import AppSwitch from '@/components/ui/toggle/AppSwitch.vue'
+import { PRIVACY_URL } from '@/constants'
+
+const { diagnostics } = useI18n()
+const { dailyPing, usageStats, unofficialBuild, disabledByEnvironment } = useSharingSettings()
+</script>
+
+<template>
+ <SettingsSection data-test-id="settings-privacy-panel">
+ <template #title>{{ diagnostics.sharingTitle }}</template>
+ <template #description>{{ diagnostics.sharingDescription }}</template>
+ <template #actions>
+ <SettingsLink :href="PRIVACY_URL">{{ diagnostics.sharingDetails }}</SettingsLink>
+ </template>
+ <AppAlert v-if="unofficialBuild" :heading="diagnostics.sharingUnofficialBuild" />
+ <AppAlert
+ v-else-if="disabledByEnvironment"
+ :heading="diagnostics.sharingDisabledByEnvironment"
+ />
+ <SettingsGroup>
+ <SettingsRow
+ :label="diagnostics.sharingPing"
+ :description="diagnostics.sharingPingDescription"
+ >
+ <AppSwitch v-model="dailyPing" :label="diagnostics.sharingPing" />
+ </SettingsRow>
+ <SettingsRow
+ :label="diagnostics.sharingUsageStats"
+ :description="diagnostics.sharingUsageStatsDescription"
+ >
+ <AppSwitch v-model="usageStats" :label="diagnostics.sharingUsageStats" />
+ </SettingsRow>
+ </SettingsGroup>
+ <p class="text-[11px] text-muted">{{ diagnostics.sharingLocalData }}</p>
+ </SettingsSection>
+</template>
diff --git a/src/components/sharing/UsageStatsPrompt.vue b/src/components/sharing/UsageStatsPrompt.vue
new file mode 100644
index 000000000..7cf54d6fc
--- /dev/null
+++ b/src/components/sharing/UsageStatsPrompt.vue
@@ -0,0 +1,23 @@
+<script setup lang="ts">
+import { tv } from 'tailwind-variants'
+import { useId } from 'vue'
+
+import { usageStatsPrompt } from '@/app/telemetry'
+import theme from '@/theme/sharing/prompt'
+
+import UsageStatsQuestion from './UsageStatsQuestion.vue'
+
+const styles = tv(theme)()
+const headingId = useId()
+</script>
+
+<template>
+ <aside
+ v-if="usageStatsPrompt"
+ :class="styles.root()"
+ :aria-labelledby="headingId"
+ data-test-id="usage-stats-prompt"
+ >
+ <UsageStatsQuestion :source="usageStatsPrompt" :heading-id="headingId" />
+ </aside>
+</template>
diff --git a/src/components/sharing/UsageStatsQuestion.stories.ts b/src/components/sharing/UsageStatsQuestion.stories.ts
new file mode 100644
index 000000000..08a46e0d7
--- /dev/null
+++ b/src/components/sharing/UsageStatsQuestion.stories.ts
@@ -0,0 +1,63 @@
+import type { Meta, StoryObj } from '@storybook/vue3-vite'
+import { expect, userEvent, within } from 'storybook/test'
+
+import {
+ appPreferences,
+ updateSharingPreferences,
+ type UsageStatsConsent
+} from '@/app/settings/preferences/store'
+import { usageStatsPrompt } from '@/app/telemetry'
+
+import UsageStatsPrompt from './UsageStatsPrompt.vue'
+import UsageStatsQuestion from './UsageStatsQuestion.vue'
+
+interface Args {
+ consent: UsageStatsConsent
+ source: 'welcome' | 'prompt'
+}
+
+const meta = {
+ title: 'App/Settings/Sharing/Usage Stats Question',
+ component: UsageStatsQuestion,
+ args: { consent: 'unset', source: 'welcome' },
+ render: (args) => ({
+ components: { UsageStatsQuestion },
+ setup() {
+ updateSharingPreferences({ usageStats: args.consent })
+ return { args }
+ },
+ template: '<div class="max-w-80"><UsageStatsQuestion :source="args.source" /></div>'
+ })
+} satisfies Meta<Args>
+
+export default meta
+type Story = StoryObj<typeof meta>
+
+export const Asking: Story = {}
+
+export const Accepted: Story = { args: { consent: 'granted' } }
+
+export const Declined: Story = { args: { consent: 'denied' } }
+
+/** Answering replaces the choices with the answer and where to change it. */
+export const Answering: Story = {
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement)
+ await userEvent.click(canvas.getByRole('button', { name: 'Share stats' }))
+ await expect(canvas.getByRole('status')).toHaveTextContent('Thank you.')
+ await expect(appPreferences.value.sharing.usageStats).toBe('granted')
+ }
+}
+
+/** The card shown once the first-run welcome closes, and on a later launch until answered. */
+export const Prompt: Story = {
+ render: () => ({
+ components: { UsageStatsPrompt },
+ setup() {
+ updateSharingPreferences({ usageStats: 'unset' })
+ usageStatsPrompt.value = 'welcome'
+ return {}
+ },
+ template: '<UsageStatsPrompt />'
+ })
+}
diff --git a/src/components/sharing/UsageStatsQuestion.vue b/src/components/sharing/UsageStatsQuestion.vue
new file mode 100644
index 000000000..3555d4f47
--- /dev/null
+++ b/src/components/sharing/UsageStatsQuestion.vue
@@ -0,0 +1,44 @@
+<script setup lang="ts">
+import { tv } from 'tailwind-variants'
+
+import { useI18n } from '@open-pencil/vue'
+
+import { setUsageStatsConsent, usageStatsConsent } from '@/app/telemetry'
+import ExternalLink from '@/components/links/ExternalLink.vue'
+import AppButton from '@/components/ui/button/AppButton.vue'
+import { PRIVACY_URL } from '@/constants'
+import theme from '@/theme/sharing/question'
+
+const { source, headingId } = defineProps<{
+ /** Right after the first-run welcome, or on a later launch. */
+ source: 'welcome' | 'prompt'
+ headingId?: string
+}>()
+const { diagnostics } = useI18n()
+const styles = tv(theme)()
+</script>
+
+<template>
+ <section :class="styles.root()" data-test-id="usage-stats-question">
+ <h3 :id="headingId" :class="styles.heading()">{{ diagnostics.sharingQuestionTitle }}</h3>
+ <p :class="styles.text()">{{ diagnostics.sharingQuestionDescription }}</p>
+ <ExternalLink :href="PRIVACY_URL" :ui="{ base: 'text-[11px]' }">{{
+ diagnostics.sharingDetails
+ }}</ExternalLink>
+ <p v-if="usageStatsConsent !== 'unset'" :class="styles.answer()" role="status">
+ {{
+ usageStatsConsent === 'granted'
+ ? diagnostics.sharingQuestionAccepted
+ : diagnostics.sharingQuestionDeclined
+ }}
+ </p>
+ <div v-else :class="styles.actions()">
+ <AppButton variant="outline" @click="setUsageStatsConsent(false, source)">
+ {{ diagnostics.sharingQuestionDecline }}
+ </AppButton>
+ <AppButton color="primary" variant="solid" @click="setUsageStatsConsent(true, source)">
+ {{ diagnostics.sharingQuestionAccept }}
+ </AppButton>
+ </div>
+ </section>
+</template>
diff --git a/src/constants.ts b/src/constants.ts
index 04fd57bda..c603d8092 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -78,6 +78,8 @@ export const ROOM_UNREACHABLE_MS = 20_000
export const ROOM_STATUS_TICK_MS = 500
export const WEB_APP_ORIGIN = 'https://app.openpencil.dev'
+/** The privacy page: every request the app makes, and every usage event and field. */
+export const PRIVACY_URL = 'https://openpencil.dev/overview/privacy'
/** Where the desktop app's installers are published. */
export const DESKTOP_DOWNLOAD_URL = 'https://github.com/open-pencil/open-pencil/releases/latest'
export const NODE_DOWNLOAD_URL = 'https://nodejs.org/en/download'
diff --git a/src/env.d.ts b/src/env.d.ts
index 08bfbd4a1..984902e73 100644
--- a/src/env.d.ts
+++ b/src/env.d.ts
@@ -2,6 +2,11 @@
/// <reference types="vite-plugin-pwa/vanillajs" />
/// <reference types="unplugin-icons/types/vue" />
+interface ImportMetaEnv {
+ /** `on` only in official release builds; without it the app sends no pings or usage stats. */
+ readonly VITE_OPENPENCIL_FEEDBACK?: string
+}
+
declare const __OPENPENCIL_APP_VERSION__: string
declare const __OPENPENCIL_LOCAL_AUTOMATION_TOKEN__: string | null
declare const __OPENPENCIL_LOCAL_AUTOMATION_URL__: string
diff --git a/src/theme/sharing/prompt.ts b/src/theme/sharing/prompt.ts
new file mode 100644
index 000000000..090009aea
--- /dev/null
+++ b/src/theme/sharing/prompt.ts
@@ -0,0 +1,5 @@
+export default {
+ slots: {
+ root: 'fixed right-4 bottom-4 z-50 w-80 max-w-[calc(100vw-2rem)] rounded-xl bg-panel p-4 text-surface shadow-[0_0_0_1px_var(--color-border),0_8px_30px_rgb(0_0_0/0.4)] motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2'
+ }
+}
diff --git a/src/theme/sharing/question.ts b/src/theme/sharing/question.ts
new file mode 100644
index 000000000..34bb4bc0d
--- /dev/null
+++ b/src/theme/sharing/question.ts
@@ -0,0 +1,9 @@
+export default {
+ slots: {
+ root: 'flex flex-col gap-2',
+ heading: 'text-sm font-semibold text-surface',
+ text: 'text-xs leading-relaxed text-muted',
+ actions: 'flex flex-wrap items-center justify-end gap-2 pt-1',
+ answer: 'text-xs leading-relaxed text-surface'
+ }
+}
diff --git a/src/views/WorkspaceView.vue b/src/views/WorkspaceView.vue
index 8101c5719..76db35300 100644
--- a/src/views/WorkspaceView.vue
+++ b/src/views/WorkspaceView.vue
@@ -1,12 +1,15 @@
<script setup lang="ts">
import { useHead } from '@unhead/vue'
-import { useEventListener } from '@vueuse/core'
+import { useEventListener, whenever } from '@vueuse/core'
import { onMounted, onUnmounted, provide, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from '@open-pencil/vue'
-import { offerAISetupOnFirstRun } from '@/app/ai/models/settings/onboarding/dialog'
+import {
+ aiSetupDialogOpen,
+ offerAISetupOnFirstRun
+} from '@/app/ai/models/settings/onboarding/dialog'
import { exposeAutomationTestRequests } from '@/app/automation/bridge/test-hooks'
import { startMCPRuntime, stopMCPRuntime } from '@/app/automation/mcp/runtime'
import { startWebMCP } from '@/app/automation/webmcp/runtime'
@@ -37,6 +40,7 @@ import {
type Tab
} from '@/app/tabs'
import { isTauri } from '@/app/tauri/env'
+import { offerUsageStatsPrompt, startSharing } from '@/app/telemetry'
import ColorSpaceBanner from '@/components/canvas/ColorSpaceBanner.vue'
import CommandPalette from '@/components/commands/CommandPalette.vue'
import EditorWorkspace from '@/components/editor/EditorWorkspace.vue'
@@ -84,8 +88,23 @@ function openFirstTab(): Tab {
}
}
-if (createdInitialTab && route.path === '/' && !appRuntimeConfig.test && !route.meta.demo) {
- offerAISetupOnFirstRun()
+const welcomeShown =
+ createdInitialTab && route.path === '/' && !appRuntimeConfig.test && !route.meta.demo
+ ? offerAISetupOnFirstRun()
+ : false
+const sharingStarted = startSharing()
+// One question per surface: a first run is asked about usage stats once the welcome closes.
+if (welcomeShown) {
+ whenever(
+ () => !aiSetupDialogOpen.value,
+ async () => {
+ await sharingStarted
+ offerUsageStatsPrompt('welcome')
+ },
+ { once: true }
+ )
+} else {
+ void sharingStarted.then(() => offerUsageStatsPrompt('prompt'))
}
useHead({ title: route.meta.demo ? 'Demo' : undefined })
diff --git a/tests/app/settings/preferences/store.test.ts b/tests/app/settings/preferences/store.test.ts
index 5b04df946..fb92fddf4 100644
--- a/tests/app/settings/preferences/store.test.ts
+++ b/tests/app/settings/preferences/store.test.ts
@@ -9,6 +9,16 @@ describe('parseAppPreferences', () => {
}
})
+ test('pings by default and treats an unreadable usage stats answer as never asked', () => {
+ expect(DEFAULT_APP_PREFERENCES.sharing).toEqual({ dailyPing: true, usageStats: 'unset' })
+ expect(
+ parseAppPreferences({ sharing: { dailyPing: false, usageStats: 'maybe' } }).sharing
+ ).toEqual({
+ dailyPing: false,
+ usageStats: 'unset'
+ })
+ })
+
test('keeps valid choices and defaults only the fields that are not', () => {
const preferences = parseAppPreferences({
appearance: { animations: 'off' },
diff --git a/tests/app/telemetry/client.test.ts b/tests/app/telemetry/client.test.ts
new file mode 100644
index 000000000..792a8b1f0
--- /dev/null
+++ b/tests/app/telemetry/client.test.ts
@@ -0,0 +1,217 @@
+import { describe, expect, test } from 'bun:test'
+
+import { ref } from 'vue'
+
+import type { Build } from '@open-pencil/feedback/contract'
+
+import { createDeferred } from '@/app/runtime/deferred'
+import type { SharingPreferences } from '@/app/settings/preferences/store'
+import { createSharingClient, type SharingClientOptions } from '@/app/telemetry/client'
+import type { SharingState } from '@/app/telemetry/state'
+
+const BUILD: Build = {
+ version: '0.16.0',
+ platform: 'linux',
+ arch: 'x64',
+ app: 'desktop',
+ browser: 'unknown'
+}
+const INSTALL_ID = '0123456789abcdef0123456789abcdef'
+
+function setup(overrides: Partial<SharingClientOptions> = {}) {
+ const posts: { route: string; body: unknown; keepalive?: boolean }[] = []
+ const preferences = ref<SharingPreferences>({ dailyPing: true, usageStats: 'unset' })
+ const state = ref<SharingState>({ installId: null, lastPingDay: null })
+ const clock = { now: new Date('2026-10-12T09:00:00.000Z') }
+ let accept = true
+ const client = createSharingClient({
+ enabled: true,
+ preferences: () => preferences.value,
+ state,
+ build: async () => BUILD,
+ disabledByEnvironment: async () => false,
+ send: {
+ async ping(body) {
+ posts.push({ route: '/ping', body, keepalive: undefined })
+ return accept
+ },
+ async ingest(body, { keepalive }) {
+ posts.push({ route: '/ingest', body, keepalive })
+ return accept
+ }
+ },
+ now: () => clock.now,
+ ...overrides
+ })
+ return {
+ client,
+ posts,
+ preferences,
+ state,
+ clock,
+ rejectPosts: () => {
+ accept = false
+ },
+ acceptPosts: () => {
+ accept = true
+ }
+ }
+}
+
+function sharingUsage(context: ReturnType<typeof setup>) {
+ context.preferences.value = { ...context.preferences.value, usageStats: 'granted' }
+ context.state.value = { ...context.state.value, installId: INSTALL_ID }
+}
+
+describe('daily ping', () => {
+ test('sends only the build, once a day', async () => {
+ const context = setup()
+
+ await context.client.sendDailyPing()
+ await context.client.sendDailyPing()
+ context.clock.now = new Date('2026-10-13T01:00:00.000Z')
+ await context.client.sendDailyPing()
+
+ const ping = { ...BUILD, usageStats: 'unset' }
+ expect(context.posts).toEqual([
+ { route: '/ping', body: ping, keepalive: undefined },
+ { route: '/ping', body: ping, keepalive: undefined }
+ ])
+ expect(context.state.value.lastPingDay).toBe('2026-10-13')
+ })
+
+ test('reports how the install answered the usage stats question', async () => {
+ const context = setup()
+ context.preferences.value = { ...context.preferences.value, usageStats: 'denied' }
+ await context.client.sendDailyPing()
+
+ expect(context.posts).toEqual([
+ { route: '/ping', body: { ...BUILD, usageStats: 'denied' }, keepalive: undefined }
+ ])
+ })
+
+ test('tries again on the next check when a ping fails', async () => {
+ const context = setup()
+ context.rejectPosts()
+ await context.client.sendDailyPing()
+ expect(context.state.value.lastPingDay).toBeNull()
+
+ context.acceptPosts()
+ await context.client.sendDailyPing()
+ expect(context.posts).toHaveLength(2)
+ expect(context.state.value.lastPingDay).toBe('2026-10-12')
+ })
+
+ test('sends no ping when it is turned off while the build is being read', async () => {
+ const build = createDeferred<Build>()
+ const context = setup({ build: () => build.promise })
+ const pinging = context.client.sendDailyPing()
+ await Promise.resolve()
+ context.preferences.value = { ...context.preferences.value, dailyPing: false }
+ build.resolve(BUILD)
+ await pinging
+
+ expect(context.posts).toEqual([])
+ })
+
+ test('sends nothing when turned off, from a build that may not send, or when the environment says so', async () => {
+ const off = setup()
+ off.preferences.value = { ...off.preferences.value, dailyPing: false }
+ await off.client.sendDailyPing()
+
+ const unofficial = setup({ enabled: false })
+ await unofficial.client.sendDailyPing()
+
+ const environment = setup({ disabledByEnvironment: async () => true })
+ await environment.client.sendDailyPing()
+
+ expect([...off.posts, ...unofficial.posts, ...environment.posts]).toEqual([])
+ })
+})
+
+describe('usage stats', () => {
+ test('records nothing until the person agrees', async () => {
+ const context = setup()
+ context.client.trackUsage({ name: 'app_opened', locale: 'en' })
+ sharingUsage(context)
+ await context.client.flushUsage()
+
+ expect(context.posts).toEqual([])
+ })
+
+ test('sends recorded events with the build and the random install ID', async () => {
+ const context = setup()
+ sharingUsage(context)
+ context.client.trackUsage({ name: 'app_opened', locale: 'fr' })
+ context.client.trackDocumentFormat('document_exported', 'svg')
+ await context.client.flushUsage({ keepalive: true })
+
+ expect(context.posts).toEqual([
+ {
+ route: '/ingest',
+ keepalive: true,
+ body: {
+ ...BUILD,
+ installId: INSTALL_ID,
+ events: [
+ { name: 'app_opened', locale: 'fr', timestamp: '2026-10-12T09:00:00.000Z' },
+ { name: 'document_exported', format: 'svg', timestamp: '2026-10-12T09:00:00.000Z' }
+ ]
+ }
+ }
+ ])
+ })
+
+ test('leaves out file formats that are not on the shared list', async () => {
+ const context = setup()
+ sharingUsage(context)
+ context.client.trackDocumentFormat('document_opened', 'sketch')
+ await context.client.flushUsage()
+
+ expect(context.posts).toEqual([])
+ })
+
+ test('sends long queues in batches the service accepts', async () => {
+ const context = setup()
+ sharingUsage(context)
+ for (let index = 0; index < 120; index += 1) {
+ context.client.trackUsage({ name: 'document_opened', format: 'fig' })
+ }
+ await context.client.flushUsage()
+
+ expect(
+ context.posts.map(({ body }) =>
+ typeof body === 'object' && body !== null && 'events' in body && Array.isArray(body.events)
+ ? body.events.length
+ : 0
+ )
+ ).toEqual([50, 50, 20])
+ })
+
+ test('sends nothing when the person stops sharing while a batch is being prepared', async () => {
+ const build = createDeferred<Build>()
+ const context = setup({ build: () => build.promise })
+ sharingUsage(context)
+ context.client.trackUsage({ name: 'app_opened', locale: 'en' })
+ const flushing = context.client.flushUsage()
+ await Promise.resolve()
+ context.preferences.value = { ...context.preferences.value, usageStats: 'denied' }
+ build.resolve(BUILD)
+ await flushing
+
+ expect(context.posts).toEqual([])
+ })
+
+ test('drops what is queued when the person stops sharing before it is sent', async () => {
+ const context = setup()
+ sharingUsage(context)
+ context.client.trackUsage({ name: 'app_opened', locale: 'en' })
+ context.preferences.value = { ...context.preferences.value, usageStats: 'denied' }
+ await context.client.flushUsage()
+
+ context.preferences.value = { ...context.preferences.value, usageStats: 'granted' }
+ await context.client.flushUsage()
+
+ expect(context.posts).toEqual([])
+ })
+})
diff --git a/tests/app/telemetry/consent.test.ts b/tests/app/telemetry/consent.test.ts
new file mode 100644
index 000000000..a57230ec5
--- /dev/null
+++ b/tests/app/telemetry/consent.test.ts
@@ -0,0 +1,38 @@
+import { beforeEach, describe, expect, test } from 'bun:test'
+
+import { appPreferences, DEFAULT_APP_PREFERENCES } from '@/app/settings/preferences/store'
+import { offerUsageStatsPrompt, setUsageStatsConsent, usageStatsPrompt } from '@/app/telemetry'
+import { sharingState } from '@/app/telemetry/state'
+
+beforeEach(() => {
+ appPreferences.value = structuredClone(DEFAULT_APP_PREFERENCES)
+ sharingState.value = { installId: null, lastPingDay: null }
+})
+
+describe('usage stats consent', () => {
+ test('agreeing makes a random install ID that stays across answers', () => {
+ setUsageStatsConsent(true, 'welcome')
+ const { installId } = sharingState.value
+
+ expect(appPreferences.value.sharing.usageStats).toBe('granted')
+ expect(installId).toMatch(/^[0-9a-f]{32}$/)
+ setUsageStatsConsent(true, 'welcome')
+ expect(sharingState.value.installId).toBe(installId)
+ })
+
+ test('stopping deletes the install ID, so agreeing again starts a new one', () => {
+ setUsageStatsConsent(true, 'welcome')
+ const first = sharingState.value.installId
+ setUsageStatsConsent(false, 'welcome')
+
+ expect(appPreferences.value.sharing.usageStats).toBe('denied')
+ expect(sharingState.value.installId).toBeNull()
+ setUsageStatsConsent(true, 'welcome')
+ expect(sharingState.value.installId).not.toBe(first)
+ })
+
+ test('a build that sends nothing never asks', () => {
+ offerUsageStatsPrompt('welcome')
+ expect(usageStatsPrompt.value).toBeNull()
+ })
+})
diff --git a/tools/checks/i18n/mixed-script-baseline.txt b/tools/checks/i18n/mixed-script-baseline.txt
index 034e568ff..745a5e9fa 100644
--- a/tools/checks/i18n/mixed-script-baseline.txt
+++ b/tools/checks/i18n/mixed-script-baseline.txt
@@ -140,6 +140,15 @@ ja:diagnostics.mcpFailed
ja:diagnostics.preparationDomImport
ja:diagnostics.usageDescription
ja:diagnostics.usageHistoryDescription
+ja:diagnostics.sharingTitle
+ja:diagnostics.sharingDescription
+ja:diagnostics.sharingPing
+ja:diagnostics.sharingPingDescription
+ja:diagnostics.sharingUsageStatsDescription
+ja:diagnostics.sharingUnofficialBuild
+ja:diagnostics.sharingDisabledByEnvironment
+ja:diagnostics.sharingQuestionTitle
+ja:diagnostics.sharingQuestionDescription
ja:editor.showUI
ja:files.browserFileAPINotSupported
ja:files.clipboardImageFetchFailed
@@ -342,6 +351,15 @@ zh-cn:diagnostics.mcpFailed
zh-cn:diagnostics.preparationDomImport
zh-cn:diagnostics.usageDescription
zh-cn:diagnostics.usageHistoryDescription
+zh-cn:diagnostics.sharingTitle
+zh-cn:diagnostics.sharingDescription
+zh-cn:diagnostics.sharingPing
+zh-cn:diagnostics.sharingPingDescription
+zh-cn:diagnostics.sharingUsageStatsDescription
+zh-cn:diagnostics.sharingUnofficialBuild
+zh-cn:diagnostics.sharingDisabledByEnvironment
+zh-cn:diagnostics.sharingQuestionTitle
+zh-cn:diagnostics.sharingQuestionDescription
zh-cn:files.browserFileAPINotSupported
zh-cn:files.clipboardImageFetchFailed
zh-cn:files.clipboardImagesFetchFailed
diff --git a/tools/checks/i18n/translation-baseline.txt b/tools/checks/i18n/translation-baseline.txt
index 60db14ae2..aa6e03bf4 100644
--- a/tools/checks/i18n/translation-baseline.txt
+++ b/tools/checks/i18n/translation-baseline.txt
@@ -225,6 +225,7 @@ it:panels.shader
it:rendering.settingsTitle
it:settings.mcp
it:settings.media
+it:settings.privacy
it:storage.bucket
it:storage.endpoint
it:storage.providerAmazonS3
diff --git a/tsconfig.json b/tsconfig.json
index 8ff2a66f7..61cb451bd 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -46,6 +46,9 @@
"@open-pencil/harness": [
"./packages/harness/src/index.ts"
],
+ "#feedback/*": [
+ "./packages/feedback/src/*"
+ ],
"#dom-css/*": [
"./packages/dom-css/src/*"
],
diff --git a/tsconfig.tests.json b/tsconfig.tests.json
index 655aefdff..9f5311674 100644
--- a/tsconfig.tests.json
+++ b/tsconfig.tests.json
@@ -46,6 +46,9 @@
"@open-pencil/harness": [
"./packages/harness/src/index.ts"
],
+ "#feedback/*": [
+ "./packages/feedback/src/*"
+ ],
"#dom-css/*": [
"./packages/dom-css/src/*"
],