feat: task reminders#4616
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- In the React
Reminders/ReminderRowUI, reminder items use the array index as the Reactkey, which can lead to subtle UI bugs when adding/removing rows; consider using a stable identifier on reminders instead. - The cron worker for assignments now always sends emails regardless of workday, which changes previous behavior; double-check that this is intentional and that any now-unused
is_workday?/0logic or dependencies are cleaned up. - Reminder normalization logic (e.g.,
normalizeReminder*in the frontend vs. validation inOperately.Tasks.Reminder) is split across layers; consider consolidating more of this into shared helpers to reduce the chance of divergence between client and server behavior.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the React `Reminders`/`ReminderRow` UI, reminder items use the array index as the React `key`, which can lead to subtle UI bugs when adding/removing rows; consider using a stable identifier on reminders instead.
- The cron worker for assignments now always sends emails regardless of workday, which changes previous behavior; double-check that this is intentional and that any now-unused `is_workday?/0` logic or dependencies are cleaned up.
- Reminder normalization logic (e.g., `normalizeReminder*` in the frontend vs. validation in `Operately.Tasks.Reminder`) is split across layers; consider consolidating more of this into shared helpers to reduce the chance of divergence between client and server behavior.
## Individual Comments
### Comment 1
<location path="turboui/src/TaskPage/Sidebar.tsx" line_range="206-215" />
<code_context>
+ return { type: "on_date", days: null, date: defaultReminderDate() };
+}
+
+function normalizeReminder(reminder: TaskPage.Reminder, dueDate: TaskPage.ContentState["dueDate"]): TaskPage.Reminder {
+ const type = dueDate ? reminder.type : reminder.type === "on_date" ? reminder.type : "on_date";
+
+ switch (type) {
+ case "before_due":
+ return { ...reminder, type, days: normalizeReminderDays(reminder.days), date: null };
+
+ case "on_date":
+ return { ...reminder, type, days: null, date: normalizeReminderDate(reminder.date) };
+
+ case "due_day":
+ case "overdue":
+ return { ...reminder, type, days: null, date: null };
+ }
+}
</code_context>
<issue_to_address>
**question (bug_risk):** Normalizing reminders when due date is missing may silently change user intent without clear feedback.
When `dueDate` is falsy, `normalizeReminder` coerces any non-`"on_date"` reminder to `"on_date"`. A `"before_due"` or `"due_day"` reminder created while a due date exists will silently change semantics once the due date is removed, and the user will later see a different type than they chose. If this is intentional, consider making the UI explicit that relative reminders require a due date (e.g., remove/reset them instead of converting). Otherwise, you could reject invalid combinations server-side or preserve the original type and only disable those options until a due date is set again.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Signed-off-by: Luca Mancini <lmancini@operately.com>
mancinux
force-pushed
the
4551-task-due-date-reminders
branch
from
June 2, 2026 16:14
e219df0 to
c0725ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves #4551