fix(forms): don't ask for an end date the form is hiding

With "Comes back after a wait" and "I don't know when it ends" both
chosen, the end field is hidden, yet the still-needed line asked for "an
end date". It now names the way out: an end date, or another repeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-14 03:18:22 +02:00
1 parent efd6eff084
commit b219c98c1b
2 files changed
+25 -2

No files matched your search

+5 -1
View File
@@ -455,7 +455,11 @@ export function eventStillNeeded(s: {
const needs: string[] = [];
if (s.title.trim() === "") needs.push("a name");
if (s.startDate === "") needs.push("a start date");
if ((s.datedWindow && s.endKnown && s.endDate === "") || s.delayNeedsEnd) {
if (s.delayNeedsEnd && !s.endKnown) {
// The end field is hidden behind "I don't know when it ends", so a bare
// "an end date" would ask for something not on screen.
needs.push("an end date (a wait counts from it) or another repeat");
} else if ((s.datedWindow && s.endKnown && s.endDate === "") || s.delayNeedsEnd) {
needs.push("an end date");
}
if (s.needsCycle) needs.push("a cycle length");