Skip to content

The agent that grows with you

fix(desktop): onboarding metrics follow the intro removal

teknium1226eeeb4c21c
diff --git a/apps/desktop/src/app/contrib/hooks/desktop-onboarding-metrics.ts b/apps/desktop/src/app/contrib/hooks/desktop-onboarding-metrics.ts
index 72491670e52..d652294743e 100644
--- a/apps/desktop/src/app/contrib/hooks/desktop-onboarding-metrics.ts
+++ b/apps/desktop/src/app/contrib/hooks/desktop-onboarding-metrics.ts
@@ -84,12 +84,6 @@ export function guidePhaseTransition(prev: OnboardingPhase, next: OnboardingPhas
return
}
- if (next === 'cinematic') {
- recordOnboarding('intro', 'reached')
- } else if (prev === 'cinematic') {
- recordOnboarding('intro', 'completed')
- }
-
if (next === 'guided') {
recordOnboarding('guide', 'reached')
} else if (next === 'skipped') {
diff --git a/apps/desktop/src/components/shared-metrics/consent-dialog.tsx b/apps/desktop/src/components/shared-metrics/consent-dialog.tsx
index a7d13ac0f0a..71704a4f696 100644
--- a/apps/desktop/src/components/shared-metrics/consent-dialog.tsx
+++ b/apps/desktop/src/components/shared-metrics/consent-dialog.tsx
@@ -14,7 +14,6 @@ import {
import { useI18n } from '@/i18n'
import { ChevronDown } from '@/lib/icons'
import { cn } from '@/lib/utils'
-import { $introReveal } from '@/store/intro-reveal'
import { notifyError } from '@/store/notifications'
import { $desktopOnboarding } from '@/store/onboarding'
import { $onboardingSurfaces } from '@/store/onboarding-presence'
@@ -54,7 +53,6 @@ export function SharedMetricsConsentDialog({ enabled, profile, requestGateway }:
const { t } = useI18n()
const copy = t.sharedMetrics
const onboarding = useStore($desktopOnboarding)
- const intro = useStore($introReveal)
const surfaces = useStore($onboardingSurfaces)
const detailsId = useId()
const consent = useStore($sharedMetricsConsent)
@@ -62,13 +60,12 @@ export function SharedMetricsConsentDialog({ enabled, profile, requestGateway }:
const [expanded, setExpanded] = useState(true)
const [saving, setSaving] = useState(false)
- // Never over the provider picker, the free-tier welcome, the intro film or
- // the guided chat: the question belongs to the moment after setup.
+ // Never over the provider picker, the free-tier welcome or the guided chat:
+ // the question belongs to the moment after setup.
const onboardingSettled =
(onboarding.configured === true || onboarding.firstRunSkipped) &&
!onboarding.manual &&
!onboarding.freeTierReady &&
- intro.phase === 'hidden' &&
surfaces.size === 0
const ready = enabled && onboardingSettled
diff --git a/apps/desktop/src/store/desktop-metrics.test.ts b/apps/desktop/src/store/desktop-metrics.test.ts
index 82acbdbf1a5..53e353e3903 100644
--- a/apps/desktop/src/store/desktop-metrics.test.ts
+++ b/apps/desktop/src/store/desktop-metrics.test.ts
@@ -503,8 +503,8 @@ describe('per profile, per window', () => {
bindDesktopMetrics(request)
setDesktopMetricsGate('off', false) // first-run offer not answered yet
- recordOnboarding('intro', 'reached')
- recordOnboarding('intro', 'completed')
+ recordOnboarding('guide', 'reached')
+ recordOnboarding('guide', 'completed')
recordOnboarding('provider_oauth', 'reached')
closeOnboardingStep('provider_oauth')
await flush()
@@ -513,7 +513,7 @@ describe('per profile, per window', () => {
setDesktopMetricsGate('on')
await flush()
- expect(calls.map(([, p]) => `${p.step}:${p.event}`)).toEqual(['intro:reached', 'intro:completed', 'provider_oauth:reached'])
+ expect(calls.map(([, p]) => `${p.step}:${p.event}`)).toEqual(['guide:reached', 'guide:completed', 'provider_oauth:reached'])
expect(JSON.parse(stored()!).onboarding.open).toEqual({})
setDesktopMetricsGate('off')
diff --git a/apps/desktop/src/store/desktop-metrics.ts b/apps/desktop/src/store/desktop-metrics.ts
index 398c433bc0d..1a39b3291f3 100644
--- a/apps/desktop/src/store/desktop-metrics.ts
+++ b/apps/desktop/src/store/desktop-metrics.ts
@@ -255,7 +255,6 @@ export type DesktopOnboardingStep =
| 'guide_layout'
| 'guide_look'
| 'guide_skip'
- | 'intro'
| 'model_pick'
| 'provider_api_key'
| 'provider_local'
diff --git a/hermes_cli/observability/schemas/hermes.shared_metrics.v3.schema.json b/hermes_cli/observability/schemas/hermes.shared_metrics.v3.schema.json
index cfda0b8df4f..ab1d04383eb 100644
--- a/hermes_cli/observability/schemas/hermes.shared_metrics.v3.schema.json
+++ b/hermes_cli/observability/schemas/hermes.shared_metrics.v3.schema.json
@@ -3759,7 +3759,6 @@
"guide_layout",
"guide_look",
"guide_skip",
- "intro",
"model_pick",
"provider_api_key",
"provider_local",
diff --git a/hermes_cli/observability/shared_metrics_contract.py b/hermes_cli/observability/shared_metrics_contract.py
index edb0ff52f77..23e677e6bef 100644
--- a/hermes_cli/observability/shared_metrics_contract.py
+++ b/hermes_cli/observability/shared_metrics_contract.py
@@ -515,7 +515,7 @@ DESKTOP_FRICTION_DETAIL_VALUES = frozenset().union(*DESKTOP_FRICTION_DETAILS.val
# answer and the first message.
DESKTOP_ONBOARDING_STEPS = frozenset({
"choose_later", "consent", "first_message", "free_tier_ready", "guide", "guide_connectors",
- "guide_first_build", "guide_layout", "guide_look", "guide_skip", "intro", "model_pick", "provider_api_key",
+ "guide_first_build", "guide_layout", "guide_look", "guide_skip", "model_pick", "provider_api_key",
"provider_local", "provider_oauth", "provider_setup", "sign_in",
})
DESKTOP_ONBOARDING_EVENTS = frozenset({"abandoned", "completed", "reached"})
diff --git a/tests/hermes_cli/test_shared_metrics_desktop.py b/tests/hermes_cli/test_shared_metrics_desktop.py
index 1aaeacb7281..d243dfaaa6a 100644
--- a/tests/hermes_cli/test_shared_metrics_desktop.py
+++ b/tests/hermes_cli/test_shared_metrics_desktop.py
@@ -96,9 +96,9 @@ def test_onboarding_is_once_per_step_event_across_processes(marks, monkeypatch):
def test_turning_collection_off_drops_the_onboarding_latches(marks):
- _rpc("shared_metrics.desktop_onboarding", step="intro", event="reached")
+ _rpc("shared_metrics.desktop_onboarding", step="guide", event="reached")
latches = marks.home / "telemetry" / "shared_metrics" / desktop.ONBOARDING_LATCH_DIRNAME
- assert (latches / "intro.reached").exists()
+ assert (latches / "guide.reached").exists()
assert _rpc("shared_metrics.set", enabled=False)["result"]["enabled"] is False
assert not latches.exists()