Repository navigation
feat(dashboards): wire north star into ED dashboard - #350
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (51)
Disabled knowledge base sources:
WalkthroughAdds North Star metrics and related drawer drilldowns to the Executive Director dashboard, refactors many drawers to lazy-load data with loading states and OnPush detection, centralizes chart/options and number-format utilities, updates persona handling, extends analytics backend/routes/services, and adds Playwright E2E coverage and test infra updates. Changes
Sequence Diagram(s)sequenceDiagram
participant Browser as Browser (Marketing Overview)
participant Client as AnalyticsService (client)
participant Server as AnalyticsController (server)
participant DB as ProjectService / Snowflake
Browser->>Client: request North Star metric (e.g. getMemberRetention)
Client->>Server: HTTP GET /api/analytics/member-retention?foundationSlug=...
Server->>Server: validate foundationSlug / foundationName
Server->>DB: query ANALYTICS.PLATINUM_LFX_ONE view
DB-->>Server: metric rows or fallback defaults
Server-->>Client: 200 JSON response
Client-->>Browser: resolved metric data (render metric card / open drawer)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🚀 Deployment StatusYour branch has been deployed to: https://ui-pr-350.dev.v2.cluster.linuxfound.info Deployment Details:
The deployment will be automatically removed when this PR is closed. |
There was a problem hiding this comment.
Pull request overview
Wires the previously added North Star metrics section into the Executive Director (ED) dashboard shell, using Angular deferred loading with a skeleton placeholder to keep initial render lightweight.
Changes:
- Import
NorthStarMetricsComponentinto the ED dashboard standalone component imports. - Render the north star metrics section in the ED dashboard template inside
@defer (on idle)with a 4-card skeleton placeholder.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/lfx-one/src/app/modules/dashboards/executive-director/executive-director-dashboard.component.ts | Adds NorthStarMetricsComponent to the component’s imports so it can be used in the ED dashboard template. |
| apps/lfx-one/src/app/modules/dashboards/executive-director/executive-director-dashboard.component.html | Adds a deferred North Star metrics section with a skeleton placeholder, placed above the marketing overview section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d63a5c5 to
d991cd6
Compare
90fc956 to
669c68e
Compare
d991cd6 to
7e3e507
Compare
669c68e to
8a0b361
Compare
7e3e507 to
7ddb0e8
Compare
8a0b361 to
e2f6b01
Compare
7ddb0e8 to
ba5164f
Compare
e2f6b01 to
c3d765b
Compare
ba5164f to
21e08f9
Compare
c3d765b to
9637775
Compare
LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
Fixes ~30 review blockers from MRashad26: - Extract formatNumber/formatCurrency to shared number.utils.ts (was 9-file dupe) - Replace hexToRgba manual patterns with shared utility in 6 files - Replace raw <button> with lfx-button in 8 drawer components - Replace raw <span> badges with lfx-tag in 9 components - Replace raw <div> stat cards with lfx-card in 8 drawers - Replace Key Insights card with lfx-card in marketing-overview - Replace Flywheel Pulse raw buttons with lfx-metric-card - Extract ~19 duplicated ChartOptions to shared chart.constants.ts - Fix roasKpiQuery: QUALIFY ROW_NUMBER replaces correlated subquery - Move platformIconMap from backend to social-media-drawer frontend - Make iconClass optional on SocialMediaPlatform interface - Add JSDoc to getSocialReach controller method - Document foundationSlug vs foundationName parameter naming - Document channelGroups hardcoded zeros (Snowflake column gap) - Document Snowflake schema split (PLATINUM vs PLATINUM_LFX_ONE) - Document drawer [visible] binding pattern (matches codebase convention) - Revert pullPolicy to IfNotPresent in Helm values - Replace raw table with lfx-table in social-media-drawer - Replace raw Sample Data badge with lfx-tag in north-star-metrics LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
Replace raw <button> "View details" with lfx-button component and add ButtonComponent import to marketing-overview. Addresses remaining MRashad26 review comment on raw HTML elements. LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
Use raw <button> for drawer close (matching existing pattern), add styleUrl + scss files, remove formatNumber template calls in favor of pipes/pre-computed properties, and remove unused browserReady/afterNextRender from marketing-overview. LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
This reverts commit e689e72. Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
All 8 drawer components were missing styleUrl in their @component decorator and had no corresponding scss file. Adds empty scss files with license headers to match the component convention. LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
Switch all 9 marketing Snowflake queries from ANALYTICS.PLATINUM.* to ANALYTICS.PLATINUM_LFX_ONE.PLATINUM_LFX_ONE_* to align with the consolidated dbt views merged in lf-dbt#2243. LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
Wire all 4 North Star metrics (member retention, member acquisition, engaged community, flywheel conversion) to real Snowflake data via backend endpoints. Remove all mock data and sample data indicators. - Add 4 Snowflake query methods in project.service.ts - Add 4 controller methods and routes for North Star endpoints - Add 4 HTTP methods in analytics.service.ts - Update marketing-overview to fetch real data via forkJoin - Update interfaces: certifiedIndividuals, newMemberRevenue, optional fields - Update member-acquisition-drawer: CAC → revenue terminology - Update engaged-community-drawer: add certified individuals segment - Fix persona.service: remove deep link destruction, add isBoardScoped - Fix paid-social-reach-drawer: nullish coalescing for optional fields - Delete unused north-star-metrics standalone component LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
- Add OnPush change detection to all 9 dashboard components - Add finalize safety net on marketing-overview data pipeline - Use centralized isBoardScoped in sidebar, change to protected - Add strict input validation (slug pattern, name length) on all analytics controller endpoints LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 - Fix double-prefix Snowflake view names (24 occurrences) - Show total members instead of quarterly new on Member Growth card - Add sparkline charts to all 3 North Star cards - Add total members trend chart to member acquisition drawer - Fix Email CTR campaign chart duplicate labels - Remove Flywheel Pulse wrapper, cards as individual carousel items - Add styleClass input to metric-card for width override - Always render chart area div to prevent card height collapse - Remove Impressions by Channel (data quality issue) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 - Remove unused channelChartData, channelChartOptions, formatChannelName, initChannelChartData from paid-social drawer - Remove dead channelGroups ROAS comparison logic (never populated) - Remove unused optional fields from SocialReachChannelGroup - Fix JSDoc table references to use PLATINUM_LFX_ONE schema - Fix JSDoc param descriptions to match actual Snowflake columns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 Add 32 E2E test cases covering the Executive Director marketing dashboard: overview section, North Star cards, marketing metric cards, and all 7 drill-down drawers (open/close, stats, charts). Also fixes: - Align playwright to 1.58.0 (match @playwright/test) - Fix global-setup.ts dotenv loading for test credentials - Add Auth0 consent page handling in auth helper - Auto-create playwright/.auth directory Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 - Add isBoardScopedPersona() utility to shared package, replacing duplicated inline checks across 5 files (persona service, dev toolbar, main layout, persona selector, sidebar) - Remove forced router.navigate(['/']) on project change that destroyed deep links - Replace raw <button> carousel nav with lfx-button wrapper components - Remove iconClass from SocialMediaPlatform interface (UI concern handled by frontend platformIconMap) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
- Replace iconClass in MarketingRecommendedAction with semantic actionType and component-level MARKETING_ACTION_ICON_MAP lookup - Add toast notifications on API catchError instead of silent defaults - Hide ROAS stat cards and chart when no spend/revenue data exists - Fix float precision on chart Y-axis ticks (email CTR, flywheel) - Fix misleading warning classification for dominant segment insight - Rename "Total Members" to "Total Engaged" in community drawer - Replace newsletter subscribers with newsletter opens metric - Remove unused Revenue Trend and Renewal Rate Trend charts - Add 8 Playwright API response validation tests LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
- Fix NRR thresholds: <90% high, 90-98% medium, ≥98% no flag - Fix revenue-per-member: add 5% minimum decline threshold - Remove newsletter engagement from all KPIs (unreliable data) - Fix Engaged Community card trend color (was hardcoded green) LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
- Recompute engaged community totals excluding newsletter (unreliable) - Email CTR: use vs-6-month-avg instead of volatile MoM comparison - Rewrite key insights to surface top movers across all metrics - Remove hardcoded 85% target from retention drawers - Replace target card with growth trend card in drawers LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
- Fix formatNumber/formatCurrency edge cases (NaN, Infinity, negatives) - Per-call catchError in forkJoin so one failure doesn't zero dashboard - Drawer foundation context: combineLatest([visible$, foundation$]) so data reloads when foundation changes while drawer is open - Parallelize sequential Snowflake queries in getMemberAcquisition LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
REVENUE → FIRST_TOUCH_REVENUE and ROAS → FIRST_TOUCH_ROAS to match PLATINUM_LFX_ONE view schema. LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
…etons - Use deep merge in chart option factories to preserve nested defaults (legend, tooltip) when callers pass overrides - Add loading skeleton UI to all 4 marketing drawers (email CTR, paid social, social media, website visits) using drawerLoading signal LFXV2-1220 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org>
🧹 Deployment RemovedThe deployment for PR #350 has been removed. |
Summary
NorthStarMetricsComponentinto ED dashboard shell@defer (on idle)section with skeleton placeholder for north star metrics gridContext
PR 5 of 5 — the "flip the switch" PR. Trivial wiring only (34 lines changed).
Depends on: #349 (north star metrics)
PR sequence: #345 → #346 → #347 → #348 → #349 → PR 5 (this)
Build safety
@defer (on idle)) with skeleton placeholdersTest plan
yarn buildpassesyarn lintpassesLFXV2-1220
🤖 Generated with Claude Code