Skip to content

Conversation

@asithade
Copy link
Contributor

@asithade asithade commented Sep 23, 2025

Summary

  • Refactored getMeetingById to use direct endpoint calls instead of query service
  • Updated meeting type parameters to use plural forms (meetings/past_meetings)
  • Simplified error handling and removed redundant warnings
  • NEW: Added PastMeeting interface and improved type safety
  • NEW: Fixed past meeting time display in meeting cards
  • NEW: Created shared utility for meeting occurrence logic

Related JIRA

Changes Made

Original Changes

  • Replace query service calls with direct endpoint calls to /{meetingType}/{uid}
  • Update meeting type parameters from meeting/past_meeting to meetings/past_meetings
  • Simplify error handling by checking meeting.uid instead of resources array
  • Remove redundant multiple meeting warnings since direct endpoint calls return single objects
  • Maintain backward compatibility with access control and committee data fetching

New Changes

  • Type Safety: Create MeetingSession and PastMeeting interfaces in shared package
  • Past Meeting Display: Fix missing time/date in past meeting cards by handling scheduled_start_time field
  • Code Reuse: Extract getCurrentOrNextOccurrence utility to shared package following DRY principle
  • Better Types: Update services and components to use PastMeeting type instead of Meeting with 'as any' casts
  • Occurrence Logic: Implement proper occurrence priority (explicit input > current occurrence > null)

Files Modified

Original Files

  • apps/lfx-one/src/server/services/meeting.service.ts
  • apps/lfx-one/src/server/routes/past-meetings.route.ts

New Files

  • packages/shared/src/interfaces/meeting.interface.ts - Added MeetingSession and PastMeeting interfaces
  • packages/shared/src/utils/meeting.utils.ts - New shared utility for occurrence logic
  • apps/lfx-one/src/app/shared/services/meeting.service.ts - Updated to use PastMeeting type
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts - Added proper typing
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts - Fixed time display
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html - Updated template
  • apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts - Updated types
  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts - Uses shared utility

Test Plan

  • Verify existing meeting retrieval functionality works correctly
  • Test both authenticated and public meeting access paths
  • Validate error handling for non-existent meetings
  • Confirm committee data is still properly fetched when present
  • NEW: [x] Verify past meeting cards display correct time and date
  • NEW: [x] Confirm regular meeting cards still work correctly
  • NEW: [x] Test occurrence priority logic in meeting cards
  • NEW: [x] Validate shared utility function works across components

🤖 Generated with Claude Code

- Replace query service calls with direct endpoint calls to /{meetingType}/{uid}
- Update meeting type parameters from 'meeting'/'past_meeting' to 'meetings'/'past_meetings'
- Simplify error handling by checking meeting.uid instead of resources array
- Remove redundant multiple meeting warnings since direct endpoint calls return single objects
- Maintain backward compatibility with access control and committee data fetching

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 September 23, 2025 16:14
Copilot AI review requested due to automatic review settings September 23, 2025 16:14
@coderabbitai
Copy link

coderabbitai bot commented Sep 23, 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

Server meeting retrieval now fetches single meetings via /{meetingType}/{uid} with plural defaults; UI templates migrated to new @if syntax, member form added a cross-field organization validator, button tooltip input renamed, and several layout/message elements set to full-width/flex spacing.

Changes

Cohort / File(s) Summary
Server meeting fetch & types
apps/lfx-one/src/server/services/meeting.service.ts, apps/lfx-one/src/server/controllers/public-meeting.controller.ts, apps/lfx-one/src/server/controllers/past-meeting.controller.ts, packages/shared/src/interfaces/meeting.interface.ts
getMeetingById now defaults to plural meetings and GETs /{meetingType}/{uid} returning a single Meeting; controllers updated to pass plural types; PastMeeting and MeetingSession interfaces added and controller/service casts updated.
Shared meeting utilities & usage
packages/shared/src/utils/meeting.utils.ts, apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts, apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts, apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts, apps/lfx-one/src/app/shared/services/meeting.service.ts
Added getCurrentOrNextOccurrence util; components now import/use it and accept PastMeeting where applicable; past-meetings service and dashboard/components updated to use PastMeeting types.
Member form logic & template
apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts, apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.html, apps/lfx-one/src/app/modules/project/committees/components/committee-form/committee-form.component.html
Added cross-field ValidatorFn enforcing organization ↔ organization_url pairing; templates migrated from *ngIf to @if blocks and error/required indicator markup adjusted.
Button tooltip API & usages
apps/lfx-one/src/app/shared/components/button/button.component.ts, apps/lfx-one/src/app/shared/components/button/button.component.html, apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html
Renamed ButtonComponent input from pTooltiptooltip and updated template bindings; meeting-card copy button now hidden for past meetings and several buttons use tooltip binding.
Layout and message width changes
apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.html, apps/lfx-one/src/app/shared/components/message/message.component.html, apps/lfx-one/src/app/app.component.scss
Replaced vertical spacing with flex flex-col gap-3, added w-full to lfx-message containers and message templates; SCSS now forces .p-message-content and .p-message-text to full width.
Misc. meeting-card template/time display
apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html, apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts
Conditional rendering changes (copy button hidden for past meetings), date/time display refactored to use meetingStartTime()/derived signals and occurrence-aware logic; input types widened to `Meeting

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Controller as Public/Past Controller
  participant Service as MeetingService
  participant API as Backend API

  User->>Controller: GET /.../meetings/:uid
  Controller->>Service: getMeetingById(req, uid, meetingType='meetings', access=true)
  Service->>API: GET /{meetingType}/{uid}
  API-->>Service: Meeting
  alt Meeting has committees
    Service->>API: GET /meetings/{uid}/committees
    API-->>Service: Committees
    Service->>Service: Merge committees into meeting
  end
  alt access augmentation enabled
    Service->>Service: addAccessToResource(meeting, 'meeting', 'organizer')
  end
  Service-->>Controller: Meeting
  Controller-->>User: 200 OK + Meeting
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately captures the primary changes in the diff—refactoring to use direct endpoint calls—and also references the important secondary change of fixing past meeting display; it is concise, specific, and relevant to the modified files and PR objectives. It is a single clear sentence that conveys the main developer intent without noise.
Description Check ✅ Passed The description clearly summarizes the refactor, type additions, occurrence utility, file-level changes, related JIRA tickets, and includes a concrete test plan, all of which match the provided changeset and objectives; it is therefore related and informative rather than off-topic or overly vague.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/LFXV2-561

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 refactors the getMeetingById service method to use direct endpoint calls instead of query service calls, improving simplicity and performance. The changes update meeting type parameters to use plural forms and simplify error handling.

Key changes:

  • Replace query service calls with direct API endpoint calls (/{meetingType}/{uid})
  • Update meeting type parameters from singular to plural forms (meetingmeetings, past_meetingpast_meetings)
  • Simplify error handling and remove redundant multiple meeting warnings

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
meeting.service.ts Core refactoring to use direct endpoint calls and simplified error handling
public-meeting.controller.ts Updated meeting type parameter from 'meeting' to 'meetings'
past-meeting.controller.ts Updated meeting type parameter from 'past_meeting' to 'past_meetings'
message.component.html Added w-full class for better layout
button.component.ts/html Renamed tooltip property from pTooltip to tooltip
meeting-card.component.html Updated tooltip property usage and conditional rendering
member-form.component.ts/html Added cross-field validation and modernized template syntax
committee-form.component.html Modernized template syntax from *ngIf to @if
meeting-join.component.html Updated CSS classes from space-y-* to flex flex-col gap-*
app.component.scss Added CSS rules for message component width

Tip: Customize your code reviews with copilot-instructions.md. Create the file or 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: 2

🧹 Nitpick comments (7)
apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html (2)

41-51: Gate copy action to non‑past meetings: confirm product intent and add accessible label

  • Confirm UX: hiding “Copy Meeting” for past meetings is intentional.
  • Icon‑only button lacks an accessible name. Add aria label.

Apply:

         <lfx-button
           icon="fa-light fa-copy"
           [text]="true"
           [rounded]="true"
           size="small"
           severity="secondary"
           data-testid="copy-meeting-button"
           (click)="copyMeetingLink()"
-          tooltip="Copy Meeting"></lfx-button>
+          tooltip="Copy Meeting"
+          [ariaLabel]="'Copy Meeting'"></lfx-button>

If lfx-button doesn’t expose ariaLabel, please add it in the component and forward it to the underlying button’s aria-label.


70-71: Add aria label to icon‑only Edit button

Ensure screen readers announce the action meaningfully.

-            tooltip="Edit Meeting"
+            tooltip="Edit Meeting"
+            [ariaLabel]="'Edit Meeting'"
             [routerLink]="['/project', project()!.slug, 'meetings', meeting().uid, 'edit']"></lfx-button>
apps/lfx-one/src/app/shared/components/button/button.component.ts (1)

64-64: Narrow tooltipPosition type to prevent typos

Constrain to allowed values for better type safety.

Apply this diff:

-  public readonly tooltipPosition = input<string>('top');
+  public readonly tooltipPosition = input<'top' | 'bottom' | 'left' | 'right'>('top');
apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts (1)

180-206: Trim values in cross-field validator to avoid whitespace false-positives

Whitespace-only inputs currently pass the “provided” checks.

Apply this diff:

-      const organization = control.get('organization')?.value;
-      const organizationUrl = control.get('organization_url')?.value;
+      const organization = (control.get('organization')?.value ?? '').toString().trim();
+      const organizationUrl = (control.get('organization_url')?.value ?? '').toString().trim();
apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.html (1)

203-204: Use (onClick) output from lfx-button, not (click)

Binding to (click) on lfx-button can bypass ButtonComponent’s click gating and naming consistency.

Apply this diff at both sites:

-                            (click)="onJoinMeeting()"></lfx-button>
+                            (onClick)="onJoinMeeting()"></lfx-button>

Also applies to: 312-313

apps/lfx-one/src/server/services/meeting.service.ts (1)

69-71: Defensively normalize/validate meetingType (support singular aliases)

Prevent accidental calls to non-existent endpoints and ease migration by mapping singular → plural.

   public async getMeetingById(req: Request, meetingUid: string, meetingType: string = 'meetings', access: boolean = true): Promise<Meeting> {
+    // Normalize legacy types
+    if (meetingType === 'meeting') meetingType = 'meetings';
+    if (meetingType === 'past_meeting') meetingType = 'past_meetings';

Optionally, introduce an enum (MeetingEntityPath) for allowed values to avoid stringly-typed calls.

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

206-206: Drop redundant await on return

Minor cleanup: returning the Promise directly is fine here.

-    return await this.meetingService.getMeetingById(req, id, 'meetings', false);
+    return this.meetingService.getMeetingById(req, id, 'meetings', false);
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 956af0d and 062b82f.

📒 Files selected for processing (12)
  • apps/lfx-one/src/app/app.component.scss (1 hunks)
  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.html (3 hunks)
  • apps/lfx-one/src/app/modules/project/committees/components/committee-form/committee-form.component.html (4 hunks)
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.html (2 hunks)
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts (3 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html (3 hunks)
  • apps/lfx-one/src/app/shared/components/button/button.component.html (2 hunks)
  • apps/lfx-one/src/app/shared/components/button/button.component.ts (1 hunks)
  • apps/lfx-one/src/app/shared/components/message/message.component.html (1 hunks)
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts (1 hunks)
  • apps/lfx-one/src/server/controllers/public-meeting.controller.ts (1 hunks)
  • apps/lfx-one/src/server/services/meeting.service.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Use TypeScript interfaces instead of union types for better maintainability
When defining PrimeNG-related types, reference the official PrimeNG component interfaces

Files:

  • apps/lfx-one/src/server/controllers/public-meeting.controller.ts
  • apps/lfx-one/src/app/shared/components/button/button.component.ts
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts
  • apps/lfx-one/src/server/services/meeting.service.ts
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts
**/*.{ts,tsx,js,jsx,mjs,cjs,html,css,scss}

📄 CodeRabbit inference engine (CLAUDE.md)

Include required license headers on all source files

Files:

  • apps/lfx-one/src/server/controllers/public-meeting.controller.ts
  • apps/lfx-one/src/app/modules/project/committees/components/committee-form/committee-form.component.html
  • apps/lfx-one/src/app/shared/components/message/message.component.html
  • apps/lfx-one/src/app/shared/components/button/button.component.ts
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts
  • apps/lfx-one/src/server/services/meeting.service.ts
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.html
  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.html
  • apps/lfx-one/src/app/shared/components/button/button.component.html
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html
  • apps/lfx-one/src/app/app.component.scss
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not nest ternary expressions

Files:

  • apps/lfx-one/src/server/controllers/public-meeting.controller.ts
  • apps/lfx-one/src/app/shared/components/button/button.component.ts
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts
  • apps/lfx-one/src/server/services/meeting.service.ts
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts
apps/lfx-one/src/**/*.html

📄 CodeRabbit inference engine (CLAUDE.md)

apps/lfx-one/src/**/*.html: Always add data-testid attributes when creating new Angular components for reliable test targeting
Use data-testid naming convention [section]-[component]-[element]

Files:

  • apps/lfx-one/src/app/modules/project/committees/components/committee-form/committee-form.component.html
  • apps/lfx-one/src/app/shared/components/message/message.component.html
  • apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.html
  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.html
  • apps/lfx-one/src/app/shared/components/button/button.component.html
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html
🧬 Code graph analysis (1)
apps/lfx-one/src/server/services/meeting.service.ts (1)
packages/shared/src/interfaces/meeting.interface.ts (1)
  • Meeting (75-148)
⏰ 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: Code Quality Checks
🔇 Additional comments (12)
apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html (1)

60-60: Add accessible name to icon-only Share button & verify tooltip API migration

  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html (≈ line 60): add an accessible name and confirm tooltip API rename.
-            tooltip="Share Meeting"></lfx-button>
+            tooltip="Share Meeting"
+            [ariaLabel]="'Share Meeting'"></lfx-button>
  • Verify no remaining pTooltip usages (run locally):
rg -n -P '<lfx-button\b[^>]*\bpTooltip=' --hidden --glob '!**/node_modules/**'
apps/lfx-one/src/app/shared/components/button/button.component.html (1)

21-21: Tooltip binding alignment LGTM

Binding [pTooltip]="tooltip()" correctly maps the renamed input to PrimeNG’s directive in both branches.

Also applies to: 52-52

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

22-22: Full-width message containers LGTM

Adding w-full to the inner containers is consistent with the layout updates.

Also applies to: 29-29

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

63-63: Input rename LGTM

Renaming pTooltiptooltip keeps the public API clear and avoids confusion with PrimeNG’s directive input.

apps/lfx-one/src/app/app.component.scss (1)

114-120: Enable full-width message content LGTM

The applied Tailwind utilities match the intent and are scoped via ::ng-deep appropriately.

apps/lfx-one/src/app/modules/project/committees/components/committee-form/committee-form.component.html (1)

24-26: Control-flow syntax migration and validations LGTM

@if blocks/readability improve without changing behavior. Validation conditions and messages look correct.

Also applies to: 40-42, 122-134, 172-174

apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.ts (1)

156-175: Cross-field validator wiring LGTM

Validator is attached at the FormGroup level with clear control defs and patterns.

apps/lfx-one/src/app/modules/project/committees/components/member-form/member-form.component.html (1)

12-14: Error rendering and dynamic required indicators LGTM

Messages are correctly scoped to touched state, and cross-field errors align with the new validator.

Also applies to: 21-23, 31-36, 50-55, 63-65, 70-75, 83-88

apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.html (1)

150-150: Layout updates LGTM

Switching to flex flex-col gap-* and widening messages (w-full) improves consistency.

Also applies to: 173-173, 250-250, 253-253

apps/lfx-one/src/server/services/meeting.service.ts (2)

85-91: LGTM: access augmentation matches the new single-object flow

Using addAccessToResource for the single Meeting object aligns with the refactor.


69-71: Quick audit: find getMeetingById calls still passing singular 'meeting'/'past_meeting'

Sandbox search couldn't verify (ripgrep skipped files). Run locally to locate and fix call sites:

rg -n -C2 -uu --pcre2 "getMeetingById\s*(\s*[^,]+,\s*[^,]+,\s*(?:'meeting'|'past_meeting'|"meeting"|"past_meeting")" --glob '!node_modules/**'

Replace matches with the plural resource types ('meetings' / 'past_meetings') where appropriate.

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

206-206: LGTM: correct use of pluralized endpoint type

Passing 'meetings' aligns with the new service contract.

@github-actions
Copy link

github-actions bot commented Sep 23, 2025

✅ E2E Tests Passed

Browser: chromium
Status: passed

All E2E tests passed successfully.

Test Configuration

- Create MeetingSession and PastMeeting interfaces for proper typing
- Fix past meeting time display by handling scheduled_start_time field
- Add shared getCurrentOrNextOccurrence utility to follow DRY principle
- Update services and components to use PastMeeting type instead of Meeting
- Remove 'as any' casts for better type safety
- Implement proper occurrence priority logic in meeting cards

Related JIRA:
- LFXV2-564: Add PastMeeting interface and improve type safety
- LFXV2-565: Fix past meeting time display in meeting cards
- LFXV2-566: Create shared utility for meeting occurrence logic

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

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Asitha de Silva <asithade@gmail.com>
@asithade asithade changed the title fix(meetings): use direct endpoint calls in getMeetingById fix(meetings): use direct endpoint calls and fix past meeting display Sep 23, 2025
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: 0

🧹 Nitpick comments (4)
apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts (1)

149-153: Good: delegate occurrence selection to shared helper

Switching initializeCurrentOccurrence to use getCurrentOrNextOccurrence is correct. Consider also simplifying initializeCanJoinMeeting to rely solely on currentOccurrence to avoid duplicating the join-window calculation.

apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts (1)

64-65: Avoid union array type for filteredMeetings

PastMeeting extends Meeting, so you can type this as Signal<Meeting[]> to simplify.

Apply this diff:

-  public filteredMeetings: Signal<Meeting[] | PastMeeting[]>;
+  public filteredMeetings: Signal<Meeting[]>;
apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts (2)

73-76: Consider a type guard instead of repeating Meeting | PastMeeting unions

To align with maintainability guidance, keep meeting typed as Meeting and narrow via a type guard when needed for PastMeeting-only fields.

Example:

function isPastMeeting(m: Meeting | PastMeeting): m is PastMeeting {
  return 'scheduled_start_time' in m;
}

Use isPastMeeting(this.meeting()) where accessing scheduled_start_time.


81-81: Union on meeting signal mirrors input union

Acceptable; can be simplified with the type guard approach above if desired.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 062b82f and 3cac7b8.

📒 Files selected for processing (8)
  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts (2 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html (4 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts (5 hunks)
  • apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts (3 hunks)
  • apps/lfx-one/src/app/shared/services/meeting.service.ts (4 hunks)
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts (3 hunks)
  • packages/shared/src/interfaces/meeting.interface.ts (1 hunks)
  • packages/shared/src/utils/meeting.utils.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Use TypeScript interfaces instead of union types for better maintainability
When defining PrimeNG-related types, reference the official PrimeNG component interfaces

Files:

  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts
  • apps/lfx-one/src/app/shared/services/meeting.service.ts
  • apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts
  • packages/shared/src/interfaces/meeting.interface.ts
  • packages/shared/src/utils/meeting.utils.ts
**/*.{ts,tsx,js,jsx,mjs,cjs,html,css,scss}

📄 CodeRabbit inference engine (CLAUDE.md)

Include required license headers on all source files

Files:

  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts
  • apps/lfx-one/src/app/shared/services/meeting.service.ts
  • apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts
  • packages/shared/src/interfaces/meeting.interface.ts
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html
  • packages/shared/src/utils/meeting.utils.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

Do not nest ternary expressions

Files:

  • apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts
  • apps/lfx-one/src/app/shared/services/meeting.service.ts
  • apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts
  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts
  • apps/lfx-one/src/server/controllers/past-meeting.controller.ts
  • packages/shared/src/interfaces/meeting.interface.ts
  • packages/shared/src/utils/meeting.utils.ts
packages/shared/src/interfaces/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Place all TypeScript interfaces in the shared package at packages/shared/src/interfaces

Files:

  • packages/shared/src/interfaces/meeting.interface.ts
apps/lfx-one/src/**/*.html

📄 CodeRabbit inference engine (CLAUDE.md)

apps/lfx-one/src/**/*.html: Always add data-testid attributes when creating new Angular components for reliable test targeting
Use data-testid naming convention [section]-[component]-[element]

Files:

  • apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.html
🧠 Learnings (1)
📚 Learning: 2025-09-16T03:32:46.518Z
Learnt from: CR
PR: linuxfoundation/lfx-v2-ui#0
File: CLAUDE.md:0-0
Timestamp: 2025-09-16T03:32:46.518Z
Learning: All PrimeNG components are wrapped in LFX components to keep UI library independence

Applied to files:

  • apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts
🧬 Code graph analysis (6)
apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts (1)
packages/shared/src/utils/meeting.utils.ts (1)
  • getCurrentOrNextOccurrence (111-138)
apps/lfx-one/src/app/shared/services/meeting.service.ts (1)
packages/shared/src/interfaces/meeting.interface.ts (1)
  • PastMeeting (500-513)
apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts (1)
packages/shared/src/interfaces/meeting.interface.ts (2)
  • PastMeeting (500-513)
  • Meeting (75-148)
apps/lfx-one/src/app/modules/project/meetings/components/meeting-card/meeting-card.component.ts (2)
packages/shared/src/interfaces/meeting.interface.ts (3)
  • Meeting (75-148)
  • PastMeeting (500-513)
  • MeetingOccurrence (154-165)
packages/shared/src/utils/meeting.utils.ts (1)
  • getCurrentOrNextOccurrence (111-138)
apps/lfx-one/src/server/controllers/past-meeting.controller.ts (1)
packages/shared/src/interfaces/meeting.interface.ts (1)
  • PastMeeting (500-513)
packages/shared/src/utils/meeting.utils.ts (1)
packages/shared/src/interfaces/meeting.interface.ts (2)
  • Meeting (75-148)
  • MeetingOccurrence (154-165)
⏰ 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: E2E Tests / Playwright E2E Tests
🔇 Additional comments (21)
apps/lfx-one/src/server/controllers/past-meeting.controller.ts (3)

6-6: Strong typing to PastMeeting is appropriate

Importing PastMeeting here aligns controller responses with the new shared interface.


25-28: Cast to PastMeeting[] is fine (list path stays on query service)

The list endpoint still uses meetingType 'past_meeting'. The cast ensures downstream code sees PastMeeting fields.


76-78: Comment drift: update to 'past_meetings'

The comment says 'past_meeting' while the code calls getMeetingById with 'past_meetings'.

Apply this diff:

-      // Get the past meeting by ID using meetingType 'past_meeting'
+      // Get the past meeting by ID using meetingType 'past_meetings'
packages/shared/src/interfaces/meeting.interface.ts (1)

483-514: PastMeeting and MeetingSession additions look good

Interfaces are clear, documented, and placed in shared as per guidelines.

apps/lfx-one/src/app/modules/meeting/meeting-join/meeting-join.component.ts (1)

18-18: Imports updated to use shared helper

Importing getCurrentOrNextOccurrence centralizes occurrence logic.

packages/shared/src/utils/meeting.utils.ts (2)

106-138: Helper is correct and side‑effect free

Logic for joinable vs next future occurrence matches existing usage and defaults early_join_time_minutes sensibly.


5-6: No action needed — helper already re-exported from shared barrel

getCurrentOrNextOccurrence is exported in packages/shared/src/utils/meeting.utils.ts and re‑exported via packages/shared/src/utils/index.ts (and packages/shared/src/index.ts), so imports from @lfx-one/shared resolve.

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

41-51: Hide copy button for past meetings + use tooltip input: LGTM

Conditional render and use of tooltip on lfx-button align with wrapper component usage.

Confirm lfx-button supports a tooltip input consistently across the app.


96-100: Switch to meetingStartTime(): LGTM

Using computed meetingStartTime in the header centralizes date/time source selection.

apps/lfx-one/src/app/modules/project/meetings/meeting-dashboard/meeting-dashboard.component.ts (3)

15-16: PastMeeting import: LGTM

Type import aligns with new past-meetings data shape.


60-61: Type pastMeetings as PastMeeting[]: LGTM

Keeps past meetings strongly typed.


190-201: Initialize past meetings with PastMeeting[]: LGTM

Return type and service call match the new interface.

apps/lfx-one/src/app/shared/services/meeting.service.ts (4)

18-20: Import PastMeeting: LGTM

Preps service methods to return PastMeeting responses.


44-51: getPastMeetings returns PastMeeting[]: LGTM

Endpoint and error handling unchanged; typed result adds clarity.


82-90: getPastMeetingsByProject: LGTM

Typed to PastMeeting[] and delegates to getPastMeetings.


102-109: getPastMeeting returns PastMeeting: LGTM

Also updates shared meeting signal via tap; compatible since PastMeeting extends Meeting.

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

18-27: Shared imports addition: LGTM

Consolidates helpers and types from @lfx-one/shared.


103-105: Add currentOccurrence and meetingStartTime signals: LGTM

Good separation of concerns for rendering logic.


118-127: Occurrence selection precedence is sound

Explicit occurrenceInput > computed for upcoming > null for past keeps behavior predictable.


627-632: Use shared helper for current occurrence: LGTM

Keeps logic consistent with other components.


634-664: Past meeting start-time precedence: prefer scheduled_start_time first

For PastMeeting display, scheduled_start_time is typically the canonical scheduled value. Recommend checking it before start_time to avoid inconsistencies.

Apply this diff:

-      } else {
-        // For past meetings, use occurrence input or fallback to scheduled_start_time/start_time
+      } else {
+        // For past meetings, use occurrence input or fallback to scheduled_start_time/start_time
         const occurrence = this.occurrence();
         if (occurrence?.start_time) {
           return occurrence.start_time;
         }
-        if (meeting?.start_time) {
-          return meeting.start_time;
-        }
-        // Handle past meetings that use scheduled_start_time (type-safe check)
-        if ('scheduled_start_time' in meeting && meeting.scheduled_start_time) {
+        // Prefer the scheduled start time if present (PastMeeting)
+        if ('scheduled_start_time' in meeting && meeting.scheduled_start_time) {
           return meeting.scheduled_start_time;
         }
+        if (meeting?.start_time) {
+          return meeting.start_time;
+        }
       }

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