Skip to content

Conversation

@azizu06
Copy link
Contributor

@azizu06 azizu06 commented Feb 11, 2026

Why

Recurring OPS and PL lab events don't need next week reminders since they are weekly events. This created unnecessary noise in the discord reminders.

What

Issue(s): #351

  • Filtered events with the "OPS" tag
  • Filtered events with the "Project Launch" tag and "Lab" or "Hours" name

Test Plan

  • Validated filtering logic with similar sample events
  • Screenshot 2026-02-11 at 3 37 44 PM

Checklist

  • Database: No schema changes, OR I have contacted the Development Lead to run db:push before merging
  • Environment Variables: No environment variables changed, OR I have contacted the Development Lead to modify them on Coolify BEFORE merging.

Summary by CodeRabbit

  • Bug Fixes
    • Refined reminder event filtering to use case-insensitive matching and clearer exclusion rules—now consistently excludes Operations events and Project Launch events related to lab hours while preserving existing grouping behavior.

@azizu06 azizu06 self-assigned this Feb 11, 2026
Copilot AI review requested due to automatic review settings February 11, 2026 20:56
@azizu06 azizu06 added Minor Small change - 1 reviewer required CRON Change modifies code in CRON app labels Feb 11, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

The reminder cron job's event filtering logic is updated to use a case-insensitive predicate that excludes events tagged ops and events tagged project launch whose names include lab or hours, replacing prior substring-based exclusions.

Changes

Cohort / File(s) Summary
Reminder Cron Filtering
apps/cron/src/crons/reminder.ts
Replaced tag/name filtering with a case-insensitive predicate. Introduces ops (tag === "ops") and plLab (tag === "project launch" && name contains "lab" or "hours") booleans and excludes events where either is true. Logic otherwise unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

Feature

Suggested reviewers

  • DVidal1205
🚥 Pre-merge checks | ✅ 5 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title correctly starts with [#351], is concise and descriptive, summarizing the main change (filtering OPS and PL lab events), and stays well under the 72-character limit at 70 characters.
No Hardcoded Secrets ✅ Passed The modified file contains no hardcoded secrets. All sensitive webhook URLs are properly referenced through environment variables, and hardcoded values are only public IDs and URLs.
Validated Env Access ✅ Passed The modified reminder.ts file correctly imports environment variables from the centralized env.ts module rather than accessing process.env directly, maintaining the validated env pattern convention.
No Typescript Escape Hatches ✅ Passed The reminder.ts file contains no TypeScript escape hatches: no any types, @ts-ignore, @ts-expect-error comments, or non-null assertions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 cron/351-remove-recurring

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
apps/cron/src/crons/reminder.ts (1)

405-414: Logic looks correct — minor comment improvement suggested.

The filtering implementation correctly handles:

  • All ops-tagged events (not just "Operations Meeting")
  • project launch-tagged events where the name contains "lab" or "hours"

The comment on line 405 could be updated to reflect the broader filtering criteria.

📝 Suggested comment clarification
-  // Filter out "Operations Meeting" and "Project Launch Lab Hours" from nextWeek
+  // Filter out all OPS events and Project Launch events with "lab" or "hours" in the name
   const nextWeekFiltered = nextWeekEvents.filter((event) => {

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

Copy link

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 reduces Discord “Next Week” reminder noise by excluding certain recurring OPS and Project Launch lab/hour events from the “Next Week” reminder group generated by the cron reminder job.

Changes:

  • Updated “Next Week” event filtering to exclude events with the OPS tag.
  • Updated “Next Week” event filtering to exclude Project Launch events whose titles include “lab” or “hours”.

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

Comment on lines 405 to 410
// Filter out "Operations Meeting" from nextWeek
const nextWeekFiltered = nextWeekEvents.filter(
(event) =>
!event.tag.includes("Operations Meeting") &&
!event.name.includes("Lab Hours"),
);
const nextWeekFiltered = nextWeekEvents.filter((event) => {
const tag = event.tag.toLowerCase();
const name = event.name.toLowerCase();
const ops = tag === "ops";
const plLab =
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

The inline comment says this filters out "Operations Meeting", but the logic now filters OPS-tagged events and Project Launch events whose names include "lab" or "hours". Update the comment to match the current filtering criteria to avoid future confusion when adjusting reminder rules.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@DVidal1205 DVidal1205 left a comment

Choose a reason for hiding this comment

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

lgtm gj :)

@azizu06 azizu06 added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit 34b41d0 Feb 12, 2026
8 checks passed
@azizu06 azizu06 deleted the cron/351-remove-recurring branch February 12, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CRON Change modifies code in CRON app Minor Small change - 1 reviewer required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants