Skip to content

Conversation

@asithade
Copy link
Contributor

@asithade asithade commented Jan 13, 2026

Summary

  • Add dev toolbar for persona switching during development
  • Refactor mailing list components to align with CLAUDE.md patterns
  • Update health metrics query to support foundation and project levels

Changes

Dev Toolbar & UI Improvements (LFXV2-979)

  • Add new dev toolbar component for persona switching
  • Update main layout to integrate dev toolbar
  • Update sidebar to use centralized persona state
  • Minor UI improvements to my-meetings and my-activity components

Mailing List Components Refactor (LFXV2-978)

  • Align mailing list components with CLAUDE.md patterns
  • Move computed signals from constructor to private init functions
  • Create FilterOption interface in shared package
  • Standardize component structure across mailing list module
  • Update manage-member-modal to use computed signal for isEditMode

Health Metrics Query Update (LFXV2-980)

  • Update ProjectHealthMetricsDailyRow interface with new schema columns
  • Add HealthMetricsAggregatedRow interface for foundation-level aggregated results
  • Update getHealthMetricsDaily with conditional SQL queries:
    • Foundation: AVG(HEALTH_SCORE) grouped by date
    • Project: Direct HEALTH_SCORE
  • Update transformHealthMetricsDaily to handle both data types with dynamic tooltip labels

Files Changed

  • 29 files changed, 660 insertions(+), 453 deletions(-)

🤖 Generated with Claude Code

- Add dev-toolbar component with clear cache functionality
- Move clear cache from sidebar to dev toolbar
- Improve relative-due-date pipe with detailed date info
- Temporarily disable core-developer persona option
- UI adjustments to my-meetings, surveys-table, votes-table

LFXV2-978

Signed-off-by: Asitha de Silva <[email protected]>
- Add FilterOption interface to shared package
- Refactor MailingListDashboardComponent: move computed signals to init functions
- Refactor MailingListViewComponent: move computed signals to init functions
- Refactor MailingListManageComponent: move computed signals to init functions
- Update ManageMemberModalComponent: use computed signal for isEditMode
- Update MailingListMembersComponent: remove console.error calls
- Update MailingListTableComponent: use FilterOption interface

LFXV2-979

Signed-off-by: Asitha de Silva <[email protected]>
- Update ProjectHealthMetricsDailyRow interface with new schema columns
- Add HealthMetricsAggregatedRow interface for foundation-level results
- Update getHealthMetricsDaily with different queries based on entityType
- Update transformHealthMetricsDaily to handle both data types
- Remove experience label from dev toolbar

LFXV2-980

Signed-off-by: Asitha de Silva <[email protected]>
@asithade asithade requested a review from jordane as a code owner January 13, 2026 20:53
Copilot AI review requested due to automatic review settings January 13, 2026 20:53
@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

This PR introduces a new development toolbar component with persona selector and cache clearing functionality, refactors multiple mailing list dashboard components using Angular signals pattern, updates health metrics logic to support entity-type aware queries, migrates from ViewChild decorator to viewChild function in my-meetings, adds tracking IDs for meetings, removes tooltip dependencies from activity tables, and updates shared interfaces including FilterOption type and analytics data shapes.

Changes

Cohort / File(s) Summary
Dev Toolbar Component (New)
apps/lfx-one/src/app/layouts/dev-toolbar/*
Introduces new development toolbar with persona selector dropdown, clear cache button, fixed positioning, conditional rendering based on feature flag, and reactive form binding to PersonaService
Main Layout Integration
apps/lfx-one/src/app/layouts/main-layout/main-layout.component.*
Integrates dev toolbar component, adds conditional top padding for main content, applies dynamic top offset to sidebar and mobile menu based on toolbar visibility
Mailing Lists Dashboard Refactoring
apps/lfx-one/src/app/modules/mailing-lists/mailing-list-dashboard/...
Major signal-based refactoring: replaces WritableSignal with Signal, restructures initialization logic into private init methods, introduces servicesLoaded and hasNoServices signals, updates FilterOption types, changes mailing list retrieval pipeline
Mailing Lists Manage Refactoring
apps/lfx-one/src/app/modules/mailing-lists/mailing-list-manage/...
Extensive signal refactoring: introduces currentStep, selectedService, needsSharedServiceCreation, and related signals via private init methods, refactors navigation logic and form state management, updates step/stepper integration
Mailing Lists View Refactoring
apps/lfx-one/src/app/modules/mailing-lists/mailing-list-view/...
Replaces WritableSignal with signal for error/loading, converts constructor initialization to private init methods, introduces readonly signals for derived data (breadcrumbItems, emailAddress, memberCount, etc.)
Mailing Lists Supporting Components
apps/lfx-one/src/app/modules/mailing-lists/components/mailing-list-*/*, manage-member-modal/...
Table component: updates filter option input types to FilterOption; Members component: simplifies error handling; Modal component: converts isEditMode to computed signal
My Meetings Component
apps/lfx-one/src/app/modules/dashboards/components/my-meetings/...
Migrates from ViewChild decorator to viewChild function, introduces computed properties for shadow visibility (showTopShadow, showBottomShadow), adds trackId metadata to MeetingWithOccurrence items combining meeting uid and occurrence id
Recent Progress Component
apps/lfx-one/src/app/modules/dashboards/components/recent-progress/...
Updates health metrics logic to support entity-type aware queries: transformHealthMetricsDaily now accepts entityType parameter, adapts health score field selection and tooltip labels based on foundation vs. project context
Activity Tables Simplification
apps/lfx-one/src/app/modules/my-activity/components/{surveys,votes}-table/...
Removes TooltipModule dependency and pTooltip bindings from both survey and vote table components, simplifies due-date rendering to class binding only
Sidebar Component Cleanup
apps/lfx-one/src/app/shared/components/sidebar/...
Removes persona selector and clear cache button UI elements, eliminates FeatureFlagService and CookieRegistryService dependencies, removes PersonaSelectorComponent import
Select Button Component
apps/lfx-one/src/app/shared/components/select-button/...
Changes default value of unselectable input from false to true
Relative Due Date Pipe
apps/lfx-one/src/app/shared/pipes/relative-due-date.pipe.ts
Refactors date formatting logic with improved thresholds: returns formatted date with relative intervals for past-due/today, within days/weeks/months ranges with singular/plural handling
Health Metrics Server Logic
apps/lfx-one/src/server/services/project.service.ts
Updates health metrics daily retrieval to support entityType parameter: foundation path returns aggregated HealthMetricsAggregatedRow[], project path returns ProjectHealthMetricsDailyRow[], removes FoundationHealthMetricsDailyRow import
Shared Interfaces & Constants
packages/shared/src/interfaces/analytics-data.interface.ts, meeting.interface.ts, filter.interface.ts
Adds FilterOption generic interface; expands ProjectHealthMetricsDailyRow with new fields (PROJECT_NAME, FOUNDATION_ID, FOUNDATION_SLUG) and restructures metric fields; adds HealthMetricsAggregatedRow; adds trackId to MeetingWithOccurrence
Persona Constants
packages/shared/src/constants/persona.constants.ts
Comments out core-developer option from PERSONA_OPTIONS array

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • feat(analytics): add foundation health metrics integration #181: Overlapping modifications to health metrics query logic and data shapes in packages/shared/src/interfaces/analytics-data.interface.ts and apps/lfx-one/src/server/services/project.service.ts, particularly around HealthMetricsAggregatedRow and entity-type support.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/LFXV2-978

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

@asithade asithade changed the title feat(analytics): update health metrics for foundation/project feat(ui): add dev toolbar, mailing list refactor, health metrics update Jan 13, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the health metrics analytics implementation to support different data shapes for foundation vs project-level queries, and includes UI improvements by consolidating dev tools into a new toolbar component.

Changes:

  • Modified health metrics queries to use PROJECT_HEALTH_METRICS_DAILY table with conditional aggregation: foundation queries aggregate AVG(HEALTH_SCORE) grouped by date, while project queries return direct HEALTH_SCORE values
  • Introduced HealthMetricsAggregatedRow interface for foundation-level results and updated ProjectHealthMetricsDailyRow with new schema columns
  • Added dev toolbar component with persona selector and cache clearing functionality, removing these features from the sidebar
  • Refactored multiple mailing list components to use initializer functions for better code organization
  • Various minor improvements including updated due date formatting, ViewChild to viewChild migration, and cleanup of unused imports

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/shared/src/interfaces/meeting.interface.ts Added trackId field to MeetingWithOccurrence for unique tracking
packages/shared/src/interfaces/index.ts Exported new filter.interface module
packages/shared/src/interfaces/filter.interface.ts New generic FilterOption interface for dropdowns
packages/shared/src/interfaces/analytics-data.interface.ts Updated health metrics interfaces with new schema and HealthMetricsAggregatedRow
packages/shared/src/constants/persona.constants.ts Commented out core-developer persona option
apps/lfx-one/src/server/services/project.service.ts Refactored health metrics query with conditional logic for foundation vs project
apps/lfx-one/src/app/shared/pipes/relative-due-date.pipe.ts Enhanced date formatting with explicit day/week/month counts
apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.* Removed persona selector and clear cache features
apps/lfx-one/src/app/shared/components/select-button/select-button.component.ts Changed default unselectable value to true
apps/lfx-one/src/app/modules/my-activity/components/-table/ Removed tooltip module and usage for cleaner due date display
apps/lfx-one/src/app/modules/mailing-lists/**/*.ts Refactored components with initializer functions and improved type usage
apps/lfx-one/src/app/modules/dashboards/components/recent-progress/recent-progress.component.ts Updated health metrics transformation to handle both data types with dynamic tooltip labels
apps/lfx-one/src/app/modules/dashboards/components/my-meetings/my-meetings.component.* Migrated to viewChild API and added trackId for meetings
apps/lfx-one/src/app/layouts/main-layout/main-layout.component.* Integrated dev toolbar with conditional positioning
apps/lfx-one/src/app/layouts/dev-toolbar/dev-toolbar.component.* New dev toolbar component with persona selector and cache management

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@asithade asithade merged commit 016a258 into main Jan 13, 2026
13 checks passed
@asithade asithade deleted the feat/LFXV2-978 branch January 13, 2026 21:11
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.

3 participants