-
Notifications
You must be signed in to change notification settings - Fork 0
fix(meetings): use consistent meeting identifier for v1/v2 compatibility #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
LFXV2-891 - Update dashboard-meeting-card to use meetingIdentifier() for attachments - Update meeting-card to use meetingIdentifier() for attachments and join URL - Add joinQueryParams computed signal for proper v1 query param handling - Add parseToInt utility for v1 meetings that return numeric fields as strings - Fix duration parsing in user.service for v1 meeting compatibility - Refactor recurrence-summary.pipe to use shared parseToInt utility - Refactor dashboard-meeting-card to use init function pattern Signed-off-by: Asitha De Silva <[email protected]> Signed-off-by: Asitha de Silva <[email protected]>
WalkthroughThis pull request refactors component property declarations from inline computed signals to private initializer methods, introduces shared Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring attention:
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this 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 (1)
apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts (1)
253-259: Verify signal dependency resolution.The
initMeetingIdentifier()method callsthis.isLegacyMeeting()internally, butisLegacyMeetingis declared on Line 59 aftermeetingIdentifieron Line 60. Since Angular'scomputed()uses lazy evaluation, this should work correctly at runtime - the dependency will be resolved whenmeetingIdentifieris first accessed. However, for clarity and to avoid potential confusion, consider reordering the declarations soisLegacyMeetingappears beforemeetingIdentifier.// TODO(v1-migration): Remove once all meetings are migrated to V2 public readonly isLegacyMeeting: Signal<boolean> = this.initIsLegacyMeeting(); + // TODO(v1-migration): Simplify to use V2 uid only once all meetings are migrated to V2 public readonly meetingIdentifier: Signal<string> = this.initMeetingIdentifier(); + // TODO(v1-migration): Remove V1 parameter handling once all meetings are migrated to V2 public readonly meetingDetailUrl: Signal<string> = this.initMeetingDetailUrl(); - // TODO(v1-migration): Simplify to use V2 uid only once all meetings are migrated to V2 - public readonly meetingIdentifier: Signal<string> = this.initMeetingIdentifier();
📜 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.
📒 Files selected for processing (7)
apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.html(2 hunks)apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts(2 hunks)apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.html(2 hunks)apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.ts(2 hunks)apps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.ts(2 hunks)apps/lfx-one/src/server/services/user.service.ts(3 hunks)packages/shared/src/utils/string.utils.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Always use direct imports for standalone components - no barrel exports
Use TypeScript interfaces instead of union types for better maintainability
Do not nest ternary expressions
Prefer interface for defining object shapes in TypeScript
Use path mappings and import aliases as configured in tsconfig.json for imports
Files:
packages/shared/src/utils/string.utils.tsapps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.tsapps/lfx-one/src/server/services/user.service.tsapps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.tsapps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
**/*.{html,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Always add data-testid attributes when creating new components for reliable test targeting
Files:
packages/shared/src/utils/string.utils.tsapps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.tsapps/lfx-one/src/server/services/user.service.tsapps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.tsapps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.htmlapps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.htmlapps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx,js,jsx}: License headers are required on all source files
Prepend 'Generated with Claude Code (https://claude.ai/code)' if assisted with the code
Files:
packages/shared/src/utils/string.utils.tsapps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.tsapps/lfx-one/src/server/services/user.service.tsapps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.tsapps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
packages/shared/src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
All shared types, interfaces, and constants are centralized in @lfx-one/shared package
Files:
packages/shared/src/utils/string.utils.ts
**/*.component.ts
📄 CodeRabbit inference engine (CLAUDE.md)
Use Angular 19 zoneless change detection with signals for component state management
Files:
apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.tsapps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts
apps/**/**/server/**/*.{ts,js}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/**/**/server/**/*.{ts,js}: Use Pino for structured JSON logs with sensitive data redaction in all backend services
Always use err field for errors to leverage Pino's error serializer - correct: req.log.error({ err: error, ...metadata }, 'message')
Log INFO level for business operation completions (created, updated, deleted) and successful data retrieval
Log WARN level for error conditions leading to exceptions and data quality issues
Log DEBUG level for internal operations, preparation steps, and intent statements
Log ERROR level for system failures, unhandled exceptions, and critical errors
Files:
apps/lfx-one/src/server/services/user.service.ts
**/*.html
📄 CodeRabbit inference engine (CLAUDE.md)
Use data-testid naming convention - [section]-[component]-[element] for hierarchical structure
Files:
apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.htmlapps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.html
🧬 Code graph analysis (3)
apps/lfx-one/src/server/services/user.service.ts (1)
packages/shared/src/utils/string.utils.ts (1)
parseToInt(19-28)
apps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.ts (1)
packages/shared/src/utils/string.utils.ts (1)
parseToInt(19-28)
apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts (3)
packages/shared/src/constants/meeting.constants.ts (3)
MeetingTypeBadge(123-128)MEETING_TYPE_CONFIGS(134-189)DEFAULT_MEETING_TYPE_CONFIG(195-203)packages/shared/src/interfaces/components.interface.ts (1)
ComponentSeverity(38-38)packages/shared/src/utils/meeting.utils.ts (1)
canJoinMeeting(209-233)
⏰ 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 (11)
apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.html (2)
83-83: Good use ofmeetingIdentifier()for v1/v2 compatibility.This correctly switches from direct
meeting().uidusage to the computedmeetingIdentifier()signal, ensuring attachment URLs work for both v1 meetings (usingid) and v2 meetings (usinguid).
101-111: LGTM - Clean transition from routerLink to href.Using
meetingDetailUrl()signal with[href]binding properly encapsulates the URL construction logic (including password and v1 flag parameters) and simplifies the template.apps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.ts (1)
5-5: Good refactor to use centralizedparseToIntutility.Replacing the local parsing logic with the shared
parseToIntutility improves consistency across the codebase and ensures uniform handling of v1 meeting numeric fields that may be returned as strings.Also applies to: 34-39
apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.html (2)
180-180: Correct use ofmeetingIdentifier()for attachment URLs.This ensures attachment downloads work for both v1 and v2 meetings by using the appropriate identifier.
220-221: Good refactor for join meeting fallback route.Using
meetingIdentifier()for the route andjoinQueryParams()for query parameters properly encapsulates the v1/v2 compatibility logic (password and v1 flag handling).packages/shared/src/utils/string.utils.ts (1)
19-28: Well-designed utility function for v1 compatibility.The implementation correctly handles all input types and provides a safe
undefinedfallback for unparseable values. UsingparseIntwith explicit radix 10 is best practice.Note: For numeric inputs, the value is returned as-is, so floats pass through unchanged. The integer parsing only applies to string inputs.
apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.ts (1)
150-150: LGTM - Clean implementation ofjoinQueryParamssignal.The new
initJoinQueryParams()method follows the established init pattern and correctly builds query parameters for v1/v2 compatibility, handling password and the v1 flag.Also applies to: 822-839
apps/lfx-one/src/server/services/user.service.ts (1)
5-5: Good fix for v1 meeting duration parsing.Using
parseToInt()with?? 0fallback correctly handles v1 meetings that return duration as strings, ensuring the end-time calculations work properly. The comments explaining the v1 string handling are helpful for maintainability.Also applies to: 651-654, 663-666
apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts (3)
44-61: Good refactor to init function pattern.The refactor aligns the component with the MeetingCardComponent style and improves code organization. The new
meetingIdentifier,meetingDetailUrl, andisLegacyMeetingsignals properly encapsulate v1/v2 compatibility logic.
66-74: Correct fix - attachments now derive frommeetingIdentifier$.This ensures attachment fetching uses the correct identifier for both v1 (id) and v2 (uid) meetings, fixing the broken attachment URLs mentioned in the PR objectives.
261-279: LGTM - URL construction logic is correct.The
initMeetingDetailUrl()properly builds the meeting detail URL with password and v1 query parameters when needed.
There was a problem hiding this 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 pull request addresses meeting identifier handling for v1/v2 compatibility during a migration period. The changes introduce a shared parseToInt utility function, update components to use consistent meeting identifiers, and refactor the dashboard-meeting-card component to follow the init function pattern.
Key Changes:
- Add
parseToIntutility function to handle v1 meetings that return numeric fields as strings - Update meeting identifier handling to consistently use
meetingIdentifier()helper across components - Refactor dashboard-meeting-card component from inline computed signals to init function pattern
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/shared/src/utils/string.utils.ts | Adds parseToInt utility to parse string/number values to integers, handling v1 meeting data compatibility |
| apps/lfx-one/src/server/services/user.service.ts | Updates duration parsing to use parseToInt for v1/v2 meeting compatibility |
| apps/lfx-one/src/app/shared/pipes/recurrence-summary.pipe.ts | Refactors to use shared parseToInt utility, removing duplicated private method |
| apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.ts | Adds initJoinQueryParams method and joinQueryParams signal for v1/v2 parameter handling |
| apps/lfx-one/src/app/modules/meetings/components/meeting-card/meeting-card.component.html | Updates attachment URLs and join button to use meetingIdentifier() and joinQueryParams() |
| apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.ts | Refactors all computed signals to use init function pattern; adds meetingIdentifier and meetingDetailUrl signals |
| apps/lfx-one/src/app/modules/dashboards/components/dashboard-meeting-card/dashboard-meeting-card.component.html | Updates attachment URLs to use meetingIdentifier(); changes "See Meeting Details" button to use [href] instead of [routerLink] |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
meetingIdentifier()consistently for v1 (id) and v2 (uid) meetingsparseToIntutility for v1 meetings that return numeric fields as stringsLFXV2-891
🤖 Generated with Claude Code