feat(meetings): filter ended meetings with 40-min buffer#179
Conversation
Implement client-side filtering to remove meetings that have ended (including 40-minute buffer) from the upcoming meetings list. - Add hasMeetingEnded() utility function to check if meetings have ended - Apply filter in meetings dashboard for both one-time and recurring meetings - Maintain consistency with existing 40-minute join window logic - Add TODO to move filtering to backend API when supported LFXV2-813 Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Asitha de Silva <asithade@gmail.com>
WalkthroughThe changes introduce meeting filtering logic to the meetings dashboard that excludes ended meetings (with a 40-minute buffer) by implementing a new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/shared/src/utils/meeting.utils.ts (1)
194-223: hasMeetingEnded logic matches the 40‑minute buffer semanticsThe implementation correctly mirrors the
canJoinMeeting/getCurrentOrNextOccurrencebehavior: it usesstart_time + duration + 40minand a strictnow > endTimecheck, and cleanly distinguishes occurrence-based vs one‑time meetings. Returningfalsewhenstart_timeis missing also avoids accidentally dropping meetings on bad data.If you want to tighten things up later, you could:
- Hoist the
40minutes into a shared constant reused by all three helpers.- Optionally accept an injected
now(defaulting tonew Date()) to make unit tests deterministic.apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts (1)
121-132: Upcoming meetings filter correctly excludes ended meetings with 40‑minute bufferThe new
activeMeetingsfilter matches the PR objectives:
- Recurring meetings: you keep a meeting only if at least one occurrence is non‑cancelled and
!hasMeetingEnded(meeting, occurrence), i.e., it hasn’t passedstart + duration + 40min.- One‑time meetings: you rely on
!hasMeetingEnded(meeting)with the same buffer.- Sorting now operates on
activeMeetings, so ended meetings are excluded before ordering bygetCurrentOrNextOccurrence, which is the right place to apply this.This is functionally solid and aligns with the existing join-window logic. If you ever want to tighten readability, you could extract the predicate into a small helper (e.g.,
hasActiveOccurrence(meeting)) but it’s not necessary.Also applies to: 135-135
📜 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 (2)
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts(2 hunks)packages/shared/src/utils/meeting.utils.ts(1 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/meetings/meetings-dashboard/meetings-dashboard.component.ts
🧬 Code graph analysis (2)
packages/shared/src/utils/meeting.utils.ts (1)
packages/shared/src/interfaces/meeting.interface.ts (2)
Meeting(90-167)MeetingOccurrence(173-186)
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts (1)
packages/shared/src/utils/meeting.utils.ts (1)
hasMeetingEnded(204-223)
⏰ 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 (1)
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts (1)
13-13: Import looks correct; confirm barrel re‑exportThe added
hasMeetingEndedimport alongsidegetCurrentOrNextOccurrencelooks consistent. Just make surehasMeetingEndedis actually exported from the@lfx-one/shared/utilsbarrel so this compiles cleanly.
There was a problem hiding this comment.
Pull request overview
This PR implements client-side filtering to remove ended meetings from the upcoming meetings list, maintaining consistency with the existing 40-minute join window logic. The changes add a new utility function and apply filtering in the meetings dashboard before sorting.
Key Changes:
- Added
hasMeetingEnded()utility function to determine if meetings have ended (including 40-minute buffer) - Applied filtering logic in the meetings dashboard to remove ended meetings from the upcoming list
- Added TODO comment documenting the temporary nature of client-side filtering until backend API support is available
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/shared/src/utils/meeting.utils.ts | New hasMeetingEnded() function that checks if a meeting has ended using the same 40-minute buffer as the existing join window logic |
| apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts | Applied filtering to remove ended meetings before sorting, handling both recurring meetings (checking all occurrences) and one-time meetings |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Implement client-side filtering to remove meetings that have ended (including a 40-minute buffer) from the upcoming meetings list.
Changes
hasMeetingEnded()utility function in@lfx-one/shared/utilsto check if meetings have endedTechnical Details
Files Modified:
packages/shared/src/utils/meeting.utils.ts- New utility functionapps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts- Applied filterLogic:
current time > (start time + duration + 40 minutes)Future Improvement
This filtering should be moved to the query service for better performance once backend API supports it.
Related
JIRA: LFXV2-813
Generated with Claude Code