Skip to content

feat(meetings): filter ended meetings with 40-min buffer#179

Merged
asithade merged 1 commit intomainfrom
feat/LFXV2-813
Nov 24, 2025
Merged

feat(meetings): filter ended meetings with 40-min buffer#179
asithade merged 1 commit intomainfrom
feat/LFXV2-813

Conversation

@asithade
Copy link
Contributor

@asithade asithade commented Nov 24, 2025

Summary

Implement client-side filtering to remove meetings that have ended (including a 40-minute buffer) from the upcoming meetings list.

Changes

  • Add hasMeetingEnded() utility function in @lfx-one/shared/utils to check if meetings have ended
  • Apply filter in meetings dashboard component before sorting
  • Handle both one-time meetings (using meeting start time) and recurring meetings (using occurrence start time)
  • Maintain consistency with existing 40-minute join window logic
  • Add TODO comment to move logic to backend API when supported

Technical Details

Files Modified:

  • packages/shared/src/utils/meeting.utils.ts - New utility function
  • apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts - Applied filter

Logic:

  • Filter condition: current time > (start time + duration + 40 minutes)
  • Recurring meetings: Keep if at least one non-cancelled occurrence hasn't ended
  • One-time meetings: Remove if meeting has ended

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

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>
Copilot AI review requested due to automatic review settings November 24, 2025 17:32
@asithade asithade requested a review from jordane as a code owner November 24, 2025 17:32
@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

The changes introduce meeting filtering logic to the meetings dashboard that excludes ended meetings (with a 40-minute buffer) by implementing a new hasMeetingEnded utility function. The function supports both recurring and one-time meeting types and is applied during active meetings filtering.

Changes

Cohort / File(s) Change Summary
New Meeting Utility Function
packages/shared/src/utils/meeting.utils.ts
Added hasMeetingEnded(meeting, occurrence?) function that determines if a meeting has ended by comparing current time to (start_time + duration + 40-minute buffer). Handles both recurring meetings with optional occurrence parameter and one-time meetings.
Dashboard Meeting Filtering
apps/lfx-one/src/app/modules/meetings/meetings-dashboard/meetings-dashboard.component.ts
Imported hasMeetingEnded utility and introduced activeMeetings filter that excludes ended meetings with 40-minute buffer. Updated sort logic to operate on filtered activeMeetings instead of raw meetings list. Added TODOs noting future removal of client-side filtering once API supports required filtering.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Utility function uses straightforward time-based comparison logic with established 40-minute buffer pattern
  • Filter implementation follows consistent patterns for recurring and one-time meeting differentiation
  • Limited surface area with only two files modified and single-purpose changes

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely describes the primary change: adding filtering for ended meetings with a 40-minute buffer, which matches the main objective of the changeset.
Description check ✅ Passed The pull request description is comprehensive and directly related to the changeset, detailing the implementation approach, affected files, logic, and future improvements.
Linked Issues check ✅ Passed The code changes fully implement all requirements from LFXV2-813: adds the hasMeetingEnded utility function, applies filtering in the dashboard component with proper handling of one-time and recurring meetings, maintains the 40-minute buffer logic, and includes a TODO for future backend migration.
Out of Scope Changes check ✅ Passed All changes are directly scoped to LFXV2-813 requirements: the new utility function and its application in the dashboard component for filtering ended meetings with appropriate buffer logic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ 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-813

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.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

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 (2)
packages/shared/src/utils/meeting.utils.ts (1)

194-223: hasMeetingEnded logic matches the 40‑minute buffer semantics

The implementation correctly mirrors the canJoinMeeting/getCurrentOrNextOccurrence behavior: it uses start_time + duration + 40min and a strict now > endTime check, and cleanly distinguishes occurrence-based vs one‑time meetings. Returning false when start_time is missing also avoids accidentally dropping meetings on bad data.

If you want to tighten things up later, you could:

  • Hoist the 40 minutes into a shared constant reused by all three helpers.
  • Optionally accept an injected now (defaulting to new 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 buffer

The new activeMeetings filter 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 passed start + 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 by getCurrentOrNextOccurrence, 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 7966b69 and e09fea3.

📒 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‑export

The added hasMeetingEnded import alongside getCurrentOrNextOccurrence looks consistent. Just make sure hasMeetingEnded is actually exported from the @lfx-one/shared/utils barrel so this compiles cleanly.

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 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.

@asithade asithade merged commit ffb3e79 into main Nov 24, 2025
13 checks passed
@asithade asithade deleted the feat/LFXV2-813 branch November 24, 2025 17:41
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