Skip to content

Conversation

@asithade
Copy link
Contributor

@asithade asithade commented Nov 12, 2025

Summary

This PR implements a comprehensive foundation project selector system with hierarchical context management across dashboards and meetings, along with analytics API refactoring and database schema updates.

Related JIRA Tickets

  • LFXV2-723: Foundation project selector with hierarchical context
  • LFXV2-724: Analytics API refactoring with required parameters
  • LFXV2-725: Dashboard foundation context integration
  • LFXV2-726: Meetings child project selection support

Changes Overview

1. Foundation Project Selector (LFXV2-723)

  • New Component: Created ProjectSelectorComponent with PrimeNG dropdown UI
  • Service Enhancement: Enhanced ProjectContextService with separate selectedFoundation signal
  • Sidebar Integration: Conditional rendering of foundation selector in sidebar
  • Persistence: Foundation and sub-project selections stored separately in localStorage
  • Backward Compatibility: Maintains existing selectedProject signal functionality

Files:

  • apps/lfx-one/src/app/shared/components/project-selector/ (NEW)
  • apps/lfx-one/src/app/shared/components/sidebar/
  • apps/lfx-one/src/app/layouts/main-layout/
  • apps/lfx-one/src/app/shared/services/project-context.service.ts

2. Analytics API Refactoring (LFXV2-724)

  • Breaking Changes: accountId and projectSlug now required in board member dashboard API
  • Feature Removal: Removed board meeting attendance tracking
  • Database Updates: Using PROJECT_SLUG instead of PROJECT_ID for joins
  • Field Renames: CURRENT_MEMBERSHIP_START_DATESTART_DATE, etc.
  • Schema Migration: Updated database references to DEV_ADESILVA_PLATINUM_LFX_ONE

Files:

  • apps/lfx-one/src/server/controllers/analytics.controller.ts
  • apps/lfx-one/src/server/services/organization.service.ts
  • apps/lfx-one/src/app/shared/services/analytics.service.ts
  • packages/shared/src/interfaces/analytics-data.interface.ts

3. Dashboard Foundation Context (LFXV2-725)

  • Foundation Headers: All dashboards now display selected foundation name
  • Context Integration: Inject ProjectContextService into Board Member, Core Developer, and Maintainer dashboards
  • Error Handling: Organization involvement shows "No Foundation Selected" state
  • Data Loading: Foundation-aware data loading with graceful degradation
  • Test IDs: Added data-testid="foundation-project" for E2E testing

Files:

  • apps/lfx-one/src/app/modules/dashboards/board-member/
  • apps/lfx-one/src/app/modules/dashboards/core-developer/
  • apps/lfx-one/src/app/modules/dashboards/maintainer/
  • apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/

4. Meetings Child Project Selection (LFXV2-726)

  • Create Meeting Button: Added to meetings dashboard for quick access
  • Child Project Selector: New dropdown in meeting creation flow
  • Project Loading: Filters by foundation's parent_uid tag
  • Cross-Project Creation: Create meetings for any child project within foundation
  • Form Control: Added selectedProjectUid to meeting type selection

Files:

  • apps/lfx-one/src/app/modules/meetings/meetings-dashboard/
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-manage/
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/

Testing

  • ✅ Build passes successfully
  • ✅ Lint checks pass
  • ✅ Type checks pass
  • ✅ Pre-commit hooks pass
  • ⚠️ Manual testing recommended for:
    • Foundation project selector UI flow
    • Dashboard foundation context display
    • Organization involvement error states
    • Meeting creation for child projects
    • Analytics API with new required parameters

Breaking Changes

Analytics APIs:

  • Board member dashboard API now requires both accountId AND projectSlug (previously optional)
  • Events overview API now requires accountId (was optional)
  • Removed boardMeetingAttendance from board member dashboard response
  • Removed projectId from events overview response

Migration Required:

  • Update all API consumers to pass required parameters explicitly
  • Remove references to boardMeetingAttendance
  • Update any code expecting projectId in events responses

Commit Details

24 files changed, 440 insertions(+), 132 deletions(-)

  • 3 new files created (ProjectSelectorComponent)
  • 21 files modified across dashboards, meetings, analytics

Generated with Claude Code

This change implements a comprehensive foundation project selector system with
hierarchical context management across dashboards and meetings.

Related JIRA tickets:
- LFXV2-723: Foundation project selector with hierarchical context
- LFXV2-724: Analytics API refactoring with required parameters
- LFXV2-725: Dashboard foundation context integration
- LFXV2-726: Meetings child project selection support

Changes included:
- New ProjectSelectorComponent with dropdown UI for foundation selection
- Enhanced ProjectContextService with separate foundation/sub-project signals
- Foundation context display across all dashboard types
- Analytics API refactoring to require projectSlug parameter
- Removed board meeting attendance feature
- Organization involvement component with graceful error handling
- Meeting creation for child projects within foundation context
- Database schema updates and field name changes

Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Asitha de Silva <asithade@gmail.com>
@asithade asithade requested a review from jordane as a code owner November 12, 2025 23:32
Copilot AI review requested due to automatic review settings November 12, 2025 23:32
@coderabbitai
Copy link

coderabbitai bot commented Nov 12, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds foundation-level project selection and UI: new ProjectSelector component, sidebar integration, project/foundation state in ProjectContextService, dashboard bindings to selected foundation, meeting selection support, and analytics/controller/service updates to accept foundation/project slug and remove attendance metrics.

Changes

Cohort / File(s) Summary
Layout / Sidebar
apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html, apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.html, apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.ts
Passes [showProjectSelector]="true" to sidebar; sidebar gains showProjectSelector input, loads projects, computes selectedProject from ProjectContextService, and handles onProjectChange to set foundation.
Project Selector (new)
apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.ts, .../project-selector.component.html, .../project-selector.component.scss
New standalone ProjectSelectorComponent with inputs/outputs, popover UI for multi-projects, single-project display mode, project selection handlers and styling.
Project Context Service
apps/lfx-one/src/app/shared/services/project-context.service.ts
Adds foundation-level state: selectedFoundation signal, setFoundation, separate storage keys and helpers (loadFromStorage/persistToStorage), getFoundationId, adjusts project storage logic (removes legacy single-project helpers).
Dashboards — foundation header & wiring
apps/lfx-one/src/app/modules/dashboards/*/board-member-dashboard.component.{ts,html}, .../core-developer-dashboard.component.{ts,html}, .../maintainer-dashboard.component.{ts,html}
Inserts "Foundation Project" header showing selectedFoundation()?.name; components inject ProjectContextService and expose selectedFoundation computed signals.
Organization Involvement
apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/organization-involvement.component.ts, .../organization-involvement.component.html
Integrates ProjectContextService; adds hasFoundationSelected computed; changes data flow to combineLatest on account + foundation slug and returns empty stub when no foundation selected; HTML adds a "No Foundation Selected" branch.
Meetings (dashboard & meeting flow)
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.{ts,html}, apps/lfx-one/src/app/modules/project/meetings/components/meeting-manage/meeting-manage.component.ts, apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.{ts,html}
Meetings dashboard header replaced with title + Create Meeting button using project slug; components wired to ProjectContextService exposing project signal; meeting-manage uses formValue.selectedProjectUid fallback for project_uid; meeting-type-selection fetches child projects, exposes childProjects and projectOptions, and adds a Select Project control.
Analytics service / backend adjustments
apps/lfx-one/src/app/shared/services/analytics.service.ts, apps/lfx-one/src/server/controllers/analytics.controller.ts, apps/lfx-one/src/server/services/organization.service.ts, packages/shared/src/interfaces/analytics-data.interface.ts
Frontend AnalyticsService signatures updated (required accountId, added projectSlug param for board member dashboard, removed projectId from events). Controller validates required accountId and projectSlug. Backend organization service switched from projectId → projectSlug, removed board meeting attendance metrics and renamed membership date fields; shared interfaces updated to match removed/renamed fields.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant Sidebar as Sidebar Component
    participant Selector as ProjectSelector
    participant Context as ProjectContextService
    participant Dashboard as Dashboard Component
    participant Analytics as AnalyticsService
    participant Backend

    User->>Sidebar: open/choose project selector
    Sidebar->>Selector: render projects (projects())
    User->>Selector: select foundation
    Selector->>Context: setFoundation(selected)
    Context-->>Context: persist foundation to storage

    Dashboard->>Context: selectedFoundation()
    Dashboard->>Dashboard: render foundation header
    Dashboard->>Analytics: getBoardMemberDashboard(accountId, foundationSlug)
    Analytics->>Backend: request with accountId & projectSlug
    Backend-->>Analytics: filtered data (attendance removed)
    Analytics-->>Dashboard: return data
    Dashboard->>Dashboard: update UI
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

  • Pay special attention to analytics signature changes across frontend service, controller, and backend service to ensure all call sites were updated.
  • Verify SQL changes and field renames in organization.service.ts match the updated shared interface and that removal of attendance metrics won't break consumers.
  • Confirm ProjectContextService storage keys and persistence logic are correct and migrations from legacy storage are handled or documented.

Possibly related PRs

Suggested labels

deploy-preview

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: foundation project selector implementation and analytics refactoring, which are the primary objectives addressed in this PR.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, covering all four linked issues (LFXV2-723 through LFXV2-726) with detailed explanations of changes, files modified, and breaking changes.
Linked Issues check ✅ Passed The PR successfully addresses all four linked issues: LFXV2-723 (ProjectSelectorComponent with hierarchical context), LFXV2-724 (analytics API refactoring with required parameters), LFXV2-725 (dashboard foundation context integration), and LFXV2-726 (child project selection for meetings).
Out of Scope Changes check ✅ Passed All code changes are directly aligned with the four linked issues. No out-of-scope modifications detected; changes focus exclusively on foundation project selector, analytics refactoring, dashboard context integration, and meeting creation enhancements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/LFXV2-723

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c656c7f and d515cc5.

📒 Files selected for processing (3)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.ts (3 hunks)
  • apps/lfx-one/src/app/shared/services/analytics.service.ts (3 hunks)
  • apps/lfx-one/src/server/controllers/analytics.controller.ts (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.ts
🧰 Additional context used
🧬 Code graph analysis (2)
apps/lfx-one/src/server/controllers/analytics.controller.ts (1)
apps/lfx-one/src/server/errors/index.ts (1)
  • ServiceValidationError (7-7)
apps/lfx-one/src/app/shared/services/analytics.service.ts (1)
packages/shared/src/interfaces/analytics-data.interface.ts (3)
  • OrganizationContributionsOverviewResponse (248-282)
  • BoardMemberDashboardResponse (288-316)
  • OrganizationEventsOverviewResponse (324-339)
🔇 Additional comments (6)
apps/lfx-one/src/server/controllers/analytics.controller.ts (3)

6-6: LGTM! Consistent error handling pattern adopted.

The addition of ServiceValidationError import enables standardized validation error handling across all endpoints, addressing previous review comments about error consistency.


159-165: Excellent validation implementation!

All parameter validation blocks now use ServiceValidationError.forField() with proper field names, clear error messages, and operation context. This provides consistent error handling across the API and addresses all previous review comments about standardized error responses.

Also applies to: 197-207, 238-242, 293-295, 328-330


188-225: Breaking API changes correctly implemented.

The method now requires both accountId and projectSlug as mandatory parameters, correctly implementing the LFXV2-724 refactoring. The updated logging (line 215) properly references project_slug, and the comment (line 209) accurately notes the removal of board meeting attendance metrics.

apps/lfx-one/src/app/shared/services/analytics.service.ts (3)

103-103: Documentation accurately reflects required parameters.

All JSDoc comments have been updated to clearly indicate that accountId and projectSlug are required parameters, addressing previous review feedback about documentation accuracy.

Also applies to: 133-134, 163-163


137-139: All previous review comments addressed!

The method signature and implementation are now correct:

  • Both accountId and projectSlug are required parameters (string, not string | undefined)
  • Params object always includes both fields without conditional checks
  • Signature matches the backend API contract that mandates both parameters

This fully addresses all previous review feedback about making accountId required and removing conditional parameter handling.


106-107: API signatures correctly updated for required parameters.

Both methods now properly require accountId as a non-optional parameter and always include it in the HTTP request. The signatures align with the backend API contract per LFXV2-724.

Also applies to: 166-167


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

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 implements a comprehensive foundation project selector system with hierarchical context management and refactors analytics APIs to use required parameters and project slugs instead of IDs.

Key Changes:

  • Added foundation-level project selector with separate state management from sub-project selection
  • Refactored analytics APIs to require accountId and projectSlug parameters, removing board meeting attendance tracking
  • Integrated foundation context display across all dashboards with graceful error handling
  • Enhanced meeting creation flow to support child project selection within foundations

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
packages/shared/src/interfaces/analytics-data.interface.ts Updated interfaces to remove board meeting attendance fields and rename date fields
apps/lfx-one/src/server/services/organization.service.ts Refactored to use projectSlug instead of projectId, updated database schema references
apps/lfx-one/src/server/controllers/analytics.controller.ts Added required parameter validation for accountId and projectSlug
apps/lfx-one/src/app/shared/services/analytics.service.ts Updated API calls to match new required parameter signatures
apps/lfx-one/src/app/shared/services/project-context.service.ts Enhanced with separate foundation and project state management using localStorage
apps/lfx-one/src/app/shared/components/sidebar/* Integrated new project selector component with foundation selection
apps/lfx-one/src/app/shared/components/project-selector/* New component for foundation project selection with PrimeNG Popover UI
apps/lfx-one/src/app/modules/project/meetings/components/* Added child project selector to meeting creation flow
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/* Added create meeting button with foundation context integration
apps/lfx-one/src/app/modules/dashboards/board-member/* Integrated foundation context display and updated data loading
apps/lfx-one/src/app/modules/dashboards/core-developer/* Added foundation header display
apps/lfx-one/src/app/modules/dashboards/maintainer/* Added foundation header display
apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/* Added foundation selection validation with empty state handling
apps/lfx-one/src/app/layouts/main-layout/* Enabled project selector in sidebar for both desktop and mobile views

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (9)
apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.html (2)

4-53: Consider adding keyboard navigation support.

The interactive dropdown works well with mouse interaction, but the clickable div (line 6-8) may not be fully accessible via keyboard. Consider adding tabindex="0", role="button", and keyboard event handlers (Enter/Space) to ensure keyboard users can activate the dropdown.

Example enhancement:

  <div
    class="box-border content-stretch flex gap-3 items-center overflow-clip p-3 relative w-full cursor-pointer hover:bg-gray-50 transition-colors rounded-lg"
    (click)="togglePanel($event, popover)"
+   (keydown.enter)="togglePanel($event, popover)"
+   (keydown.space)="togglePanel($event, popover); $event.preventDefault()"
+   tabindex="0"
+   role="button"
+   [attr.aria-expanded]="popover.visible"
    data-testid="project-selector">

33-48: Consider adding keyboard navigation for project options.

Similar to the dropdown trigger, the project option divs should support keyboard interaction for full accessibility.

Example enhancement:

        <div
          class="flex items-center gap-3 p-2 hover:bg-gray-100 rounded-lg cursor-pointer transition-colors"
          (click)="selectProject(project, popover)"
+         (keydown.enter)="selectProject(project, popover)"
+         (keydown.space)="selectProject(project, popover); $event.preventDefault()"
+         tabindex="0"
+         role="option"
          [attr.data-testid]="'project-option-' + project.slug">
apps/lfx-one/src/app/modules/dashboards/board-member/board-member-dashboard.component.html (1)

5-8: Consider handling the no-foundation-selected state.

The Foundation Project header displays {{ selectedFoundation()?.name }} but provides no fallback when a foundation hasn't been selected yet. This results in an empty or incomplete header on initial load.

Consider adding conditional rendering or a placeholder message:

-  <div class="mb-6 flex items-center gap-4" data-testid="foundation-project">
-    <h1 class="text-2xl font-serif font-semibold text-gray-900">{{ selectedFoundation()?.name }} Overview</h1>
-  </div>
+  @if (selectedFoundation()) {
+    <div class="mb-6 flex items-center gap-4" data-testid="foundation-project">
+      <h1 class="text-2xl font-serif font-semibold text-gray-900">{{ selectedFoundation()?.name }} Overview</h1>
+    </div>
+  } @else {
+    <div class="mb-6 flex items-center gap-4" data-testid="foundation-project">
+      <h1 class="text-2xl font-serif font-semibold text-gray-900">No Foundation Selected</h1>
+    </div>
+  }
apps/lfx-one/src/app/modules/dashboards/core-developer/core-developer-dashboard.component.html (1)

5-8: Consider handling the no-foundation-selected state.

Similar to the board member dashboard, this header will display an incomplete label when no foundation is selected.

Add conditional rendering or a placeholder:

-  <div class="mb-6 flex items-center gap-4" data-testid="foundation-project">
-    <h1 class="text-2xl font-serif font-semibold text-gray-900">{{ selectedFoundation()?.name }} Overview</h1>
-  </div>
+  @if (selectedFoundation()) {
+    <div class="mb-6 flex items-center gap-4" data-testid="foundation-project">
+      <h1 class="text-2xl font-serif font-semibold text-gray-900">{{ selectedFoundation()?.name }} Overview</h1>
+    </div>
+  } @else {
+    <div class="mb-6 flex items-center gap-4" data-testid="foundation-project">
+      <h1 class="text-2xl font-serif font-semibold text-gray-900">No Foundation Selected</h1>
+    </div>
+  }
apps/lfx-one/src/app/modules/dashboards/maintainer/maintainer-dashboard.component.ts (1)

28-28: Consider adding explicit typing for type safety.

The selectedFoundation signal is implicitly typed, which may result in Signal<any> based on the ProjectContextService return type. For better type safety and IDE support, consider adding an explicit type annotation.

-  public readonly selectedFoundation = computed(() => this.projectContextService.selectedFoundation());
+  public readonly selectedFoundation: Signal<ProjectContext | null> = computed(() => this.projectContextService.selectedFoundation());

Note: Ensure ProjectContext is imported from the appropriate location if not already available.

apps/lfx-one/src/app/modules/dashboards/core-developer/core-developer-dashboard.component.ts (1)

4-5: Consider adding explicit typing for type safety.

The implementation correctly integrates ProjectContextService, but the selectedFoundation signal lacks explicit typing.

-  public readonly selectedFoundation = computed(() => this.projectContextService.selectedFoundation());
+  public readonly selectedFoundation: Signal<ProjectContext | null> = computed(() => this.projectContextService.selectedFoundation());

Ensure ProjectContext is imported if not already available.

Also applies to: 19-23

apps/lfx-one/src/app/modules/dashboards/board-member/board-member-dashboard.component.ts (1)

31-31: Consider adding explicit typing for type safety.

The selectedFoundation signal lacks explicit type annotation, resulting in Signal<any> based on inference.

-  public readonly selectedFoundation = computed(() => this.projectContextService.selectedFoundation());
+  public readonly selectedFoundation: Signal<ProjectContext | null> = computed(() => this.projectContextService.selectedFoundation());

Ensure ProjectContext is imported from @lfx-one/shared/interfaces if not already available.

apps/lfx-one/src/server/controllers/analytics.controller.ts (1)

153-164: Update service method signature to reflect backend requirement.

The verification found that the single consumer (organization-involvement.component.ts:129) correctly passes accountId. However, the service method signature declares the parameter as optional (accountId?: string), creating a mismatch with the backend's now-required validation. Update the service signature in analytics.service.ts:106 from accountId?: string to accountId: string to enforce the requirement at the type level and prevent future callers from accidentally omitting it.

apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.ts (1)

34-36: Remove the console logging from the projects signal

tap(console.log) dumps the full project list for every user hitting the sidebar. That’s noisy and leaks data in production logs. Please drop the debug tap before merging.

Apply this diff:

-  protected readonly projects = toSignal(this.projectService.getProjects().pipe(tap(console.log)), {
+  protected readonly projects = toSignal(this.projectService.getProjects(), {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 2f38465 and c656c7f.

📒 Files selected for processing (24)
  • apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html (2 hunks)
  • apps/lfx-one/src/app/modules/dashboards/board-member/board-member-dashboard.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/board-member/board-member-dashboard.component.ts (2 hunks)
  • apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/organization-involvement.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/organization-involvement.component.ts (3 hunks)
  • apps/lfx-one/src/app/modules/dashboards/core-developer/core-developer-dashboard.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/core-developer/core-developer-dashboard.component.ts (2 hunks)
  • apps/lfx-one/src/app/modules/dashboards/maintainer/maintainer-dashboard.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/dashboards/maintainer/maintainer-dashboard.component.ts (1 hunks)
  • apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts (4 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-manage/meeting-manage.component.ts (2 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.html (1 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.ts (3 hunks)
  • apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.html (1 hunks)
  • apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.scss (1 hunks)
  • apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.ts (1 hunks)
  • apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.html (1 hunks)
  • apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.ts (2 hunks)
  • apps/lfx-one/src/app/shared/services/analytics.service.ts (2 hunks)
  • apps/lfx-one/src/app/shared/services/project-context.service.ts (1 hunks)
  • apps/lfx-one/src/server/controllers/analytics.controller.ts (3 hunks)
  • apps/lfx-one/src/server/services/organization.service.ts (4 hunks)
  • packages/shared/src/interfaces/analytics-data.interface.ts (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-21T21:19:13.599Z
Learnt from: andrest50
Repo: linuxfoundation/lfx-v2-ui PR: 125
File: apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts:345-350
Timestamp: 2025-10-21T21:19:13.599Z
Learning: In the Angular meeting card component (apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts), when selecting between `summary.summary_data.edited_content` and `summary.summary_data.content`, the logical OR operator (`||`) is intentionally used instead of nullish coalescing (`??`) because empty string edited_content should fall back to the original content rather than being displayed as empty.

Applied to files:

  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.html
  • apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/organization-involvement.component.html
  • apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts
  • apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/organization-involvement.component.ts
  • apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.html
  • apps/lfx-one/src/app/modules/dashboards/board-member/board-member-dashboard.component.ts
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-manage/meeting-manage.component.ts
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.ts
🧬 Code graph analysis (8)
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts (1)
packages/shared/src/interfaces/project.interface.ts (1)
  • ProjectContext (167-174)
apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.ts (3)
apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.ts (1)
  • Component (25-134)
apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.ts (1)
  • Component (11-46)
packages/shared/src/interfaces/project.interface.ts (2)
  • Project (54-103)
  • ProjectContext (167-174)
apps/lfx-one/src/app/shared/services/project-context.service.ts (1)
packages/shared/src/interfaces/project.interface.ts (1)
  • ProjectContext (167-174)
apps/lfx-one/src/app/shared/services/analytics.service.ts (1)
packages/shared/src/interfaces/analytics-data.interface.ts (2)
  • BoardMemberDashboardResponse (288-316)
  • OrganizationEventsOverviewResponse (324-339)
apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.ts (2)
apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.ts (1)
  • Component (15-73)
packages/shared/src/interfaces/project.interface.ts (1)
  • Project (54-103)
apps/lfx-one/src/app/modules/dashboards/board-member/board-member-dashboard.component.ts (1)
packages/shared/src/interfaces/account.interface.ts (1)
  • Account (8-13)
apps/lfx-one/src/server/services/organization.service.ts (1)
packages/shared/src/interfaces/analytics-data.interface.ts (3)
  • BoardMemberDashboardResponse (288-316)
  • OrganizationEventsOverviewResponse (324-339)
  • BoardMemberDashboardConsolidatedRow (205-219)
apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.ts (1)
packages/shared/src/interfaces/project.interface.ts (1)
  • Project (54-103)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🔇 Additional comments (10)
apps/lfx-one/src/app/modules/dashboards/components/organization-involvement/organization-involvement.component.html (1)

34-42: LGTM! Well-structured empty state for foundation selection.

The new "No Foundation Selected" state provides clear user guidance with an appropriate icon and instructions. The control flow hierarchy (no foundation → loading → content) is logical and user-friendly.

apps/lfx-one/src/app/shared/components/project-selector/project-selector.component.scss (1)

1-25: LGTM! Clean styling for the project selector.

The use of ::ng-deep is appropriate for styling PrimeNG popover components, and the Tailwind utility classes maintain consistency with the design system.

apps/lfx-one/src/app/modules/project/meetings/components/meeting-manage/meeting-manage.component.ts (2)

318-318: LGTM! Enables cross-project meeting creation.

The fallback logic formValue.selectedProjectUid || project.uid properly supports both the new cross-project meeting creation flow and maintains backward compatibility with the existing single-project workflow.


667-667: LGTM! Form control properly initialized.

The selectedProjectUid form control is correctly initialized as an optional field (empty string default) to support the project selection feature in the meeting creation flow.

apps/lfx-one/src/app/modules/project/meetings/components/meeting-type-selection/meeting-type-selection.component.html (1)

5-20: LGTM! Well-implemented project selector in meeting creation flow.

The conditional rendering, clear labeling, and optional selection pattern ([showClear]="true") align well with the user experience goals. The placement before meeting type selection is logical.

apps/lfx-one/src/app/shared/components/sidebar/sidebar.component.html (1)

13-18: LGTM! Clean integration of project selector into sidebar.

The conditional rendering, input/output binding, and visual separation are well-implemented. The positioning at the top of the sidebar is intuitive for users.

apps/lfx-one/src/app/modules/dashboards/maintainer/maintainer-dashboard.component.html (1)

5-8: LGTM! Consistent foundation context display.

The Foundation Project header uses proper optional chaining and maintains consistency with other dashboards in the PR. The data-testid facilitates testing.

apps/lfx-one/src/app/layouts/main-layout/main-layout.component.html (1)

7-7: LGTM! Consistent project selector integration.

The showProjectSelector input is properly wired to both desktop and mobile sidebars, enabling the foundation project selector UI across the application.

Also applies to: 26-26

apps/lfx-one/src/server/controllers/analytics.controller.ts (2)

227-241: LGTM! Consistent required parameter validation across all consumers.

The required accountId validation follows the same pattern as other updated endpoints. All identified consumers already pass the accountId parameter:

  • Frontend service layer (analytics.service.ts) requires accountId as a parameter
  • Component (organization-involvement.component.ts) properly supplies accountId from selectedAccountId$
  • Route (analytics.route.ts) correctly binds to the controller method

No breaking changes detected.


187-208: Add error handling for 400 responses in organization-involvement.component.ts

The endpoint migration to require both accountId and projectSlug is complete and all consumers are using the new signature. However, the component calls the service without error handling—when the endpoint returns a 400 error for missing/invalid parameters, the request fails silently.

Update the observable pipe at line 178 to include a catchError handler to gracefully handle 400 responses:

return this.analyticsService.getBoardMemberDashboard(accountId, foundationSlug).pipe(
  catchError(() => of(/* return empty/default state */)),
  finalize(() => this.dashboardLoading.set(false))
);

- Replace plain JSON error responses with ServiceValidationError for consistent error handling
- Make required parameters non-optional in analytics service methods
- Eliminate unnecessary API call in meeting-type-selection when no current project

LFXV2-723

Signed-off-by: Asitha de Silva <asithade@gmail.com>
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