feat(signals): analytics dashboard facelift (BETON-350)#66
Draft
feat(signals): analytics dashboard facelift (BETON-350)#66
Conversation
…tion Implements the signal analytics facelift (BETON-350) covering: - Migration 025: signal_analytics_snapshots, signal_cohort_retention, signal_conversion_curves, posthog_property_mappings, attio_deal_mappings tables with RLS policies and triggers - Signal definitions: add conversion_type and retention_event_name columns - Analytics API: GET /api/signals/[id]/analytics with window/range filtering - PostHog property mappings API: GET/PUT /api/integrations/posthog/mappings - Attio deal mappings API: GET/PUT /api/integrations/attio/deal-mappings - Canvas chart components: RevenueChart, DualLineChart, AreaChart, RetentionTable - Signal detail page facelift: 4 KPI cards, 6 chart types, cohort retention heatmap, time-to-conversion curves, filter controls - Demo mode mock analytics data matching design sketch Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Signal list page: enhanced stats cards with top signal, confidence count, and contextual sub-labels - Analytics computation engine: pure functions for computing monthly snapshots, cohort retention (M0-M8), and time-to-conversion curves - Chi-squared statistical significance testing with p-value computation - Supports all 5 conversion windows + no-limit mode Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 tests covering: - Chi-squared test: empty/zero tables, significant/non-significant differences, symmetry, large samples - p-value to significance conversion: edge cases, clamping - Monthly snapshots: window filtering, occurrence counting, conversion rate computation, statistical significance - Cohort retention: all tab/stat combinations, user tracking - Conversion curves: period/cumulative consistency, normalization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the Signal Analytics Facelift epic (BETON-350) — a complete rebuild of the signal detail page with rich analytics and the foundation for pre-computed signal insights.
What changed
signal_analytics_snapshots,signal_cohort_retention,signal_conversion_curves,posthog_property_mappings,attio_deal_mappings) with full RLS policiesconversion_type(posthog_event/attio_deal_won/either) andretention_event_namecolumns/api/signals/[id]/analytics), PostHog property mappings, Attio deal mappingsTasks completed
Remaining tasks (follow-up PRs)
Test plan
npm run buildpassesvitest run src/lib/heuristics/analytics/)/signals/sig_001)🤖 Generated with Claude Code