Skip to content

fix(files_reminder): passed reminder handling#59228

Open
skjnldsv wants to merge 3 commits intomasterfrom
fix/reminder-past
Open

fix(files_reminder): passed reminder handling#59228
skjnldsv wants to merge 3 commits intomasterfrom
fix/reminder-past

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

@skjnldsv skjnldsv commented Mar 26, 2026

Summary

This PR solved two logic issues

  1. we still return passed reminder from the API. We should just assume passed ones are void and basically gone
  2. we assumed a 404 on reminder clear request was an issue, but that's just expected outcome. We can safely disregard this.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@skjnldsv skjnldsv added this to the Nextcloud 34 milestone Mar 26, 2026
@skjnldsv skjnldsv self-assigned this Mar 26, 2026
@skjnldsv skjnldsv requested review from a team as code owners March 26, 2026 13:03
@skjnldsv skjnldsv requested review from nfebe, sorbaugh and szaimen and removed request for a team March 26, 2026 13:03
@skjnldsv skjnldsv requested review from CarlSchwan and leftybournes and removed request for a team March 26, 2026 13:03
@skjnldsv
Copy link
Copy Markdown
Member Author

/backport to stable33

Copy link
Copy Markdown
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

🐘

@skjnldsv skjnldsv force-pushed the fix/reminder-past branch from bb962d6 to cc7c56c Compare March 26, 2026 13:24
@skjnldsv
Copy link
Copy Markdown
Member Author

/compile rebase

skjnldsv and others added 2 commits March 26, 2026 14:54
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
const relativeDueDate = formatRelativeTime(customDueDate.value ?? 0)
return (nowDate.value.getTime() >= (customDueDate.value?.getTime() ?? 0))
// TRANSLATORS: {relativeDueDate} will be replaced with a relative time, e.g. "2 hours ago" or "in 3 days".
? t('files_reminders', 'We reminded you of this file {relativeDueDate}', { relativeDueDate })
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand the purpose of this "historical reminder" message. Is it just a fallback for stale paths and/or triggering test(s)?

Do we intentionally want the modal to present past reminders as historical state when they slip through, or should it instead behave as if no reminder exists?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, it's just that we don't handle the passed reminders logic on the front-end. The backend does it now. So I'm making the front compliant to whatever data.
It's more like a failsafe.

@@ -33,6 +32,15 @@
const customDueDate = ref<Date>()
const nowDate = ref(new Date())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
const nowDate = ref(new Date())
const openedAt = ref(new Date())

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't think that's really necessary 😛

id="set-custom-reminder"
v-model="customDueDate"
:label="t('files_reminders', 'Reminder at custom date & time')"
:min="nowDate"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
:min="openedAt"

Co-authored-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
@skjnldsv skjnldsv requested a review from joshtrichards March 30, 2026 06:30
@skjnldsv skjnldsv enabled auto-merge March 30, 2026 06:30
@skjnldsv
Copy link
Copy Markdown
Member Author

/compile rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Once a reminder for a file has passed, it does not disappear and cannot be deleted

4 participants