Skip to content

fix(wizard): record per-step completion/skip for Spec 046 funnel - #448

Merged
Dumbris merged 1 commit into
mainfrom
fix/wizard-funnel-step-tracking
May 5, 2026
Merged

Dumbris merged 1 commit into
mainfrom
fix/wizard-funnel-step-tracking

Conversation

@Dumbris

@Dumbris Dumbris commented May 4, 2026

Copy link
Copy Markdown
Member

Summary

The first-run onboarding wizard only ever called markEngaged() on dismiss — it never invoked markConnect* or markServer*. Production telemetry on telemetry.mcpproxy.app confirmed the gap: every install that engaged the wizard reported wizard_engaged=true with wizard_connect_step / wizard_server_step still NULL, so the funnel queries documented in Spec 046 SC-012/SC-013 were dead on arrival.

Backend (internal/httpapi/onboarding.go), OnboardingState storage, telemetry payload (internal/telemetry/telemetry.go), and the Cloudflare Worker schema were already correct. The bug was purely a frontend wiring gap in OnboardingWizard.vue.

Fix

Wired four call sites in frontend/src/components/OnboardingWizard.vue:

Trigger Call added
connectOne() success markConnectCompleted()
onServerAdded() (single server) markServerCompleted()
onBulkImport() with totalImported > 0 markServerCompleted()
dismiss() (per step still empty) markConnectSkipped() / markServerSkipped() before markEngaged()

Each guarded so it only fires once per install (no re-firing if a status is already 'completed' / 'skipped').

Evidence the data was broken

After applying migration 0005_add_onboarding_funnel.sql to the prod D1 and backfilling existing rows from payload_json:

{wizard_engaged: None, connect_step: None, server_step: None, installs: 10}
{wizard_engaged: 1,    connect_step: None, server_step: None, installs: 5}

Every engaged install had both step columns NULL — no install ever made it past step 0 in our funnel reporting, even though the data shows users were clearly using the wizard.

Test plan

  • npx vue-tsc --noEmit passes
  • npm run build succeeds
  • Manual: open wizard, click Connect on a client → verify connect_step_status='completed' via GET /api/v1/onboarding/state
  • Manual: open wizard, add a server via the modal → verify server_step_status='completed'
  • Manual: open wizard, click "Close for now" without acting → verify both step statuses become 'skipped' and engaged=true
  • Manual: re-open wizard after a completed step, dismiss again → verify already-recorded step status is preserved (not overwritten to 'skipped')

Related

  • Spec 046: local-first onboarding (specs/046-local-first-onboarding/)
  • Telemetry worker prod deploy with v4 INSERT path: smart-mcp-proxy/mcpproxy-telemetry@a0f69ac

🤖 Generated with Claude Code

The first-run wizard only ever called markEngaged() on dismiss — it
never invoked markConnectCompleted/Skipped or markServerCompleted/
Skipped. Production telemetry (D1) confirmed the gap: every install
that engaged the wizard recorded wizard_engaged=true with
wizard_connect_step / wizard_server_step still NULL, making the
funnel queries documented in Spec 046 SC-012/SC-013 unusable.

Wire the four missing call sites:
  - connectOne() success → markConnectCompleted()
  - onServerAdded() (single) → markServerCompleted()
  - onBulkImport() (>0 imported) → markServerCompleted()
  - dismiss() → mark each unfilled step as skipped before markEngaged

Each guarded against re-firing once a status is recorded. Backend,
storage, telemetry payload, and worker schema were already correct;
the bug was purely in the frontend wiring.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

📦 Build Artifacts

Workflow Run: View Run
Branch: fix/wizard-funnel-step-tracking

Available Artifacts

  • archive-darwin-amd64 (26 MB)
  • archive-darwin-arm64 (23 MB)
  • archive-linux-amd64 (15 MB)
  • archive-linux-arm64 (13 MB)
  • archive-windows-amd64 (26 MB)
  • archive-windows-arm64 (23 MB)
  • frontend-dist-pr (0 MB)
  • installer-dmg-darwin-amd64 (19 MB)
  • installer-dmg-darwin-arm64 (18 MB)

How to Download

Option 1: GitHub Web UI (easiest)

  1. Go to the workflow run page linked above
  2. Scroll to the bottom "Artifacts" section
  3. Click on the artifact you want to download

Option 2: GitHub CLI

gh run download 25332403345 --repo smart-mcp-proxy/mcpproxy-go

Note: Artifacts expire in 14 days.

@Dumbris
Dumbris merged commit 09b7b36 into main May 5, 2026
24 checks passed
@Dumbris
Dumbris deleted the fix/wizard-funnel-step-tracking branch May 5, 2026 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants