Skip to content

feat(admin): deduplicate onboarding charts by user - #3107

Open
WcaleNieWolny wants to merge 10 commits into
mainfrom
wolny/dedupe-onboarding-controls
Open

feat(admin): deduplicate onboarding charts by user#3107
WcaleNieWolny wants to merge 10 commits into
mainfrom
wolny/dedupe-onboarding-controls

Conversation

@WcaleNieWolny

@WcaleNieWolny WcaleNieWolny commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Add one furthest-reaching onboarding attempt per PostHog person as an alternate analytics response.
  • Let Daily onboarding attempts and Frontend onboarding funnel (v3) switch independently to de-duplicated data.
  • Keep both controls local, default-off, accessible, and instant.

Attempts rank by Setup → Organization → App details → Intent within the existing 24-hour window. Equal stages use the latest Intent timestamp. Daily attempts compete across v1/v2/v3; the v3 funnel competes only among v3 attempts.

The existing PostHog query, endpoint, raw analytics, and every other chart remain unchanged.

Test plan

  • bunx vitest run tests/frontend-onboarding-analytics-model.unit.test.ts tests/frontend-onboarding-analytics.unit.test.ts tests/admin-frontend-onboarding-dashboard.unit.test.ts tests/admin-chart-card-collapse.unit.test.ts — 85 passed
  • bun run lint:backend
  • bun run lint
  • bun run typecheck
  • CHOKIDAR_USEPOLLING=true bun run build
  • git diff --check

Screenshots

The checkbox design was reviewed locally on the admin onboarding dashboard. The backend-driven values depend on production PostHog data.

Checklist

  • My code follows the code style of this project and passes bun run lint:backend && bun run lint.
  • My change requires a change to the external documentation.
  • I have updated the external documentation accordingly.
  • My change has adequate E2E test coverage.
  • I have tested my code locally, and the reproduction steps are listed above.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

@codspeed-hq

codspeed-hq Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing wolny/dedupe-onboarding-controls (54900e5) with main (4dadd25)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 5 minutes

Limit details: You’ve used all 2 included reviews currently available under your plan. You completed 57 included PR reviews in the past 7 days; at that activity level, included reviews refill at 2 reviews per hour.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7b06e559-0add-4c36-b73b-28218f2372f7

📥 Commits

Reviewing files that changed from the base of the PR and between 4dadd25 and 54900e5.

📒 Files selected for processing (11)
  • docs/superpowers/plans/2026-08-17-onboarding-user-deduplication.md
  • docs/superpowers/specs/2026-08-17-onboarding-user-deduplication-design.md
  • messages/en.context.json
  • messages/en.json
  • src/components.d.ts
  • src/components/admin/AdminChartDeduplicateControl.vue
  • src/pages/admin/dashboard/frontend-onboarding.vue
  • src/services/adminFrontendOnboarding.ts
  • supabase/functions/_backend/utils/frontend_onboarding_analytics_model.ts
  • tests/admin-frontend-onboarding-dashboard.unit.test.ts
  • tests/frontend-onboarding-analytics-model.unit.test.ts

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@WcaleNieWolny
WcaleNieWolny force-pushed the wolny/dedupe-onboarding-controls branch from de9fe99 to ee50ea9 Compare August 17, 2026 18:09
@sonarqubecloud

Copy link
Copy Markdown

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.

1 participant