Context
Found driving #21615 (a scheduler example of the event editor, whose AC asks: "An end before the minimum is refused, with a message the pull request shows"). On dev f6afbf6be3, a scratch copy of examples/scheduler/basic with minimumDuration: 30, snapMinutes: 15 and one booking at the minimum, neo-theme-neo-dark, 1440 × 900, headless Chromium:
| Booking |
End typed in the editor |
After Save |
| Voice session, 08:00–11:00 |
08:15 |
The editor closes. The booking is saved as 08:00–08:30 and nothing tells the user. |
| Mic check, 12:00–12:30 (at the minimum) |
12:15 |
The editor stays open, and the End field reads "The edit could not be saved." |
In both cases the planner gets something they did not type. The first saves an end the planner never typed, with no message. The second refuses, but the message does not say why.
The Problem
Neo.timeline.EventEditor#save hands its changes to the owner's hook, owner.commitTimelineEdit(record, changes, {source: 'editor'}), and keeps the draft with an error when the hook returns false or {status: 'refused', message} (src/timeline/EventEditor.mjs:776–782). The scheduler's hook (src/scheduler/Container.mjs:658) forwards to moveEvent, the single writer, which clamps a range shorter than the minimum (:941–962): an end-only change becomes max(end, start + minimum). For a booking longer than the minimum, the clamp produces a new end, and the writer saves it. For a booking already at the minimum, the clamp gives back the old end, so moveEvent returns null and the hook returns false. The editor then shows its fallback text.
The Architectural Reality
- Design authority:
moveEvent's JSDoc makes the clamp intended for every source, the editor included: "Single writer for rescheduling, reassigning, or editing an event record (drag, resize, keyboard, EventEditor, or programmatic/NL API). Validates and clamps [startDate, endDate] against {@link #timeAxis} and {@link #minimumDuration}". The editor's contract has a second answer for the same case: "The hook may return false or {status: 'refused', message} to retain the draft and show an error." A drag has no typed value to keep, so clamping is how it answers; a form does have one. #21615 gives the product answer for the form: "Shorten it below 30 minutes: the editor refuses."
minimumDuration_ (:212): "Minimum allowed event duration in minutes (>= 1) during drag-resize, keyboard resize, and {@link #moveEvent}."
- The effective minimum is computed inline in
moveEvent (:941): minimumDuration, else the axis' snapMinutes, else 15.
- The Gantt overrides
commitTimelineEdit (src/gantt/Container.mjs:426). Its minimum depends on the task (a milestone has none) and on working time (:860–907), so this change does not reach it.
- The editor shows a refusal's message on the field of the first changed key (
EventEditor.mjs:779), which is the End field for an end-only change.
The Fix
Neo.scheduler.Container#commitTimelineEdit refuses an edit from meta.source === 'editor' whose resulting range is shorter than the effective minimum: {status: 'refused', message: 'The end must be at least 30 minutes after the start'}, with the minimum's minutes in the message. The effective minimum moves into one method that moveEvent reads as well, so the writer and the refusal cannot disagree. Drag, resize, keyboard and API edits keep clamping. The JSDoc of moveEvent and minimumDuration_ says the editor is refused.
Acceptance Criteria
Out of Scope
The Gantt's minimum (working time, milestones). The fallback message for other null results, such as an edit clamped to the axis bounds. Which field shows the error. The editor's layout, focus and labels (Ada's defect-notes of 2026-11-21, and #21710).
Avoided Traps
- Validating in
EventEditor. The editor does not own the minimum, and the Gantt's minimum depends on the task and on working time.
- Removing the clamp from
moveEvent. Drag and keyboard resize rely on it.
Related
Blocks #21615. #21710 (focus after the editor closes, PR #21711). The scheduler and its editor came from #20876 and #20877.
Ownership: self-assigned. This blocks #21615 for the Engine 14 lock (Sun 22 Nov 12:00 CET), so it carries no contributor labels.
Live latest-open + closed sweep: latest 20 open read, open and closed search ("minimumDuration", "editor minimum", "event editor refused", "commitTimelineEdit"; Out of Scope and Avoided Traps read on the closed #20890 and #21614) at 2026-11-21T02:28Z: no equivalent and no prior exclusion. Backlog: 88 open (red band), a defect found under the owning leaf #21615. A2A in-flight sweep: latest 30 messages, all read-states, back to 01:46Z: no claim on the minimum; Ada's three EventEditor defect-notes cover layout, the invalid state and focus, not the minimum. MC sweep ("editor shortens a booking below the minimum duration, the end is silently moved instead of refused"): 6 results, no prior decision. KB ticket sweep: only #21615 asks for the refusal. Own-assignment sweep: 13 open, none overlapping.
Decision Record impact: none.
Retrieval Hint: "scheduler editor end below minimumDuration clamped instead of refused, commitTimelineEdit refusal"
Context
Found driving #21615 (a scheduler example of the event editor, whose AC asks: "An end before the minimum is refused, with a message the pull request shows"). On
devf6afbf6be3, a scratch copy ofexamples/scheduler/basicwithminimumDuration: 30,snapMinutes: 15and one booking at the minimum,neo-theme-neo-dark, 1440 × 900, headless Chromium:In both cases the planner gets something they did not type. The first saves an end the planner never typed, with no message. The second refuses, but the message does not say why.
The Problem
Neo.timeline.EventEditor#savehands its changes to the owner's hook,owner.commitTimelineEdit(record, changes, {source: 'editor'}), and keeps the draft with an error when the hook returnsfalseor{status: 'refused', message}(src/timeline/EventEditor.mjs:776–782). The scheduler's hook (src/scheduler/Container.mjs:658) forwards tomoveEvent, the single writer, which clamps a range shorter than the minimum (:941–962): an end-only change becomesmax(end, start + minimum). For a booking longer than the minimum, the clamp produces a new end, and the writer saves it. For a booking already at the minimum, the clamp gives back the old end, somoveEventreturnsnulland the hook returnsfalse. The editor then shows its fallback text.The Architectural Reality
moveEvent's JSDoc makes the clamp intended for every source, the editor included: "Single writer for rescheduling, reassigning, or editing an event record (drag,resize,keyboard,EventEditor, or programmatic/NL API). Validates and clamps[startDate, endDate]against {@link #timeAxis} and {@link #minimumDuration}". The editor's contract has a second answer for the same case: "The hook may returnfalseor{status: 'refused', message}to retain the draft and show an error." A drag has no typed value to keep, so clamping is how it answers; a form does have one. #21615 gives the product answer for the form: "Shorten it below 30 minutes: the editor refuses."minimumDuration_(:212): "Minimum allowed event duration in minutes (>= 1) during drag-resize, keyboard resize, and {@link #moveEvent}."moveEvent(:941):minimumDuration, else the axis'snapMinutes, else 15.commitTimelineEdit(src/gantt/Container.mjs:426). Its minimum depends on the task (a milestone has none) and on working time (:860–907), so this change does not reach it.EventEditor.mjs:779), which is the End field for an end-only change.The Fix
Neo.scheduler.Container#commitTimelineEditrefuses an edit frommeta.source === 'editor'whose resulting range is shorter than the effective minimum:{status: 'refused', message: 'The end must be at least 30 minutes after the start'}, with the minimum's minutes in the message. The effective minimum moves into one method thatmoveEventreads as well, so the writer and the refusal cannot disagree. Drag, resize, keyboard and API edits keep clamping. The JSDoc ofmoveEventandminimumDuration_says the editor is refused.Acceptance Criteria
moveEventedits clamp as today, and the existing clamp tests pass unchanged.test/playwright/unit/scheduler/Container.spec.mjscovers both cases through the editor'ssave(): red ondev, green at head.Out of Scope
The Gantt's minimum (working time, milestones). The fallback message for other
nullresults, such as an edit clamped to the axis bounds. Which field shows the error. The editor's layout, focus and labels (Ada's defect-notes of 2026-11-21, and #21710).Avoided Traps
EventEditor. The editor does not own the minimum, and the Gantt's minimum depends on the task and on working time.moveEvent. Drag and keyboard resize rely on it.Related
Blocks #21615. #21710 (focus after the editor closes, PR #21711). The scheduler and its editor came from #20876 and #20877.
Ownership: self-assigned. This blocks #21615 for the Engine 14 lock (Sun 22 Nov 12:00 CET), so it carries no contributor labels.
Live latest-open + closed sweep: latest 20 open read, open and closed search ("minimumDuration", "editor minimum", "event editor refused", "commitTimelineEdit"; Out of Scope and Avoided Traps read on the closed
#20890and#21614) at 2026-11-21T02:28Z: no equivalent and no prior exclusion. Backlog: 88 open (red band), a defect found under the owning leaf #21615. A2A in-flight sweep: latest 30 messages, all read-states, back to 01:46Z: no claim on the minimum; Ada's three EventEditor defect-notes cover layout, the invalid state and focus, not the minimum. MC sweep ("editor shortens a booking below the minimum duration, the end is silently moved instead of refused"): 6 results, no prior decision. KB ticket sweep: only #21615 asks for the refusal. Own-assignment sweep: 13 open, none overlapping.Decision Record impact: none.
Retrieval Hint: "scheduler editor end below minimumDuration clamped instead of refused, commitTimelineEdit refusal"