[scheduler-premium] Dependencies - Auto-scheduling engine (FS) - #23439
Draft
rita-codes wants to merge 34 commits into
Draft
[scheduler-premium] Dependencies - Auto-scheduling engine (FS)#23439rita-codes wants to merge 34 commits into
rita-codes wants to merge 34 commits into
Conversation
…ate a cycle Closes mui#22858 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
…r tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
Closes mui#22857 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MpQTQZthCBgqQwXHfxzi7p
…ependencies-auto-scheduling-engine-fs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
…heduler-dependencies-auto-scheduling-engine-fs
…ependencies-auto-scheduling-engine-fs # Conflicts: # packages/x-scheduler-internals-premium/src/event-timeline-premium-selectors/eventTimelinePremiumDependencySelectors.ts # packages/x-scheduler-internals-premium/src/internals/plugins/SchedulerSchedulingPlugin.ts
…ependencies-auto-scheduling-engine-fs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
Aligns the drop gesture with the hard-constraint behavior of established Gantt tools: a successor dropped in violation snaps forward to the first valid position instead of keeping a violated arrow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
rita-codes
force-pushed
the
22857-scheduler-dependencies-auto-scheduling-engine-fs
branch
from
August 27, 2026 16:07
3429194 to
61835c0
Compare
…pendencies-auto-scheduling-engine-fs
…rness In browser mode the title-column and viewport observers deliver on the frames after the render, outside act, and the un-acted update fails the run through the console guard depending on runner timing. renderTimeline now waits two native frames inside act (real rAF captured at module load, so fake-timer tests cannot stall it) before returning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XxvxJpRPn5iPoo6jvxnXFc
…ependencies-auto-scheduling-engine-fs
The muting tests merged from master still called the now-async renderTimeline without awaiting it, leaving the absorb act floating over the test body; drag start/end and mid-drag scrolls also perturb layout, so withDrag and the remount test absorb the observer frames too. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
…gine - An entry only repositions (and clamps) its event when it actually moves the start, and only date-changing entries push their successors: the event dialog resends unchanged dates on every save, which used to snap pre-existing violations and cascade their chains on a rename. - Seeding mirrors the store's whole-entry last-wins per id, and an allDay-only entry now cascades (it moves the effective end). - An end-resized entry violated by its own batch is pushed instead of being left as a false "pre-existing" violation. - A timed event lands on the first instant after an all-day predecessor: the inclusive 23:59:59.999 end does not survive the second-resolution wall-time serialization, which kept the constraint violated by 999ms. - Breaking a cycle at an updated event now warns in dev, cascade entries are emitted at settle time, and the duplicated constraint loops merged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
…o-scheduling-engine-fs' into 22857-scheduler-dependencies-auto-scheduling-engine-fs
…ependencies-auto-scheduling-engine-fs
The only import mui#23442 missed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
The last hole in the hard-constraint story: a push into a read-only event silently left the violated arrow behind. The engine now reports the blocked members, the scheduling plugin vetoes the whole batch before anything is emitted, and the rejection surfaces as the same transient toast the create-dependency guards use. A rejected cut paste keeps the clipboard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
- Entry dates now resolve in the event's data timezone before normalizing, mirroring how the store applies them: cross-timezone all-day entries were compared in the display zone, so the engine disagreed with the store's effective bounds. (The dialog building all-day bounds in the display zone stretches such events — an upstream, pre-existing issue the mirrored tests document.) - updateEvent returns whether the batch was applied: a vetoed dialog save keeps the dialog open with the user's edits, and a vetoed drop of the edited occurrence no longer repoints the editing surface. - A cascade target missing from the lookup is skipped instead of crashing, every blocked read-only successor is reported, and the veto pins its atomicity: no persistEvents, whole-batch discard, toast naming the blocked event, no ghost placeholder. - The engine JSDoc sits back on the function, the demo's read-only comment matches the veto, and the row-bounds test helper is shared. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RDEgka4iDRFrenWeWFhunq
…ependencies-auto-scheduling-engine-fs # Conflicts: # packages/x-scheduler-premium/src/event-timeline-premium/tests/dependencyTerminals.EventTimelinePremium.test.tsx # packages/x-scheduler-premium/src/event-timeline-premium/tests/dragAndDrop.EventTimelinePremium.test.tsx
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.
Closes #22857. Part of #22854. Built on top of #23389.
Adds the Finish-to-Start auto-scheduling engine: when an
updateEventsbatch moves an event, its successors (through thedependenciesgraph) are pushed later so thatsuccessor.start >= predecessor.endholds transitively, and the extra updates are emitted in the sameonEventsChangebatch.Design
computeAutoSchedulingCascade(inx-scheduler-internals-premium/src/internals/utils/auto-scheduling.ts) is a pure function over the pre-update state plus the batch'supdated/deletedentries. The scheduling plugin calls it fromhandleEventsUpdateand appends the cascade to the batch.startis the user placing that event, so when it lands before an active predecessor's end it snaps to the first valid position (keeping its duration), and its successors cascade from the clamped dates. This matches the hard-constraint behavior of established Gantt tools (verified against Bryntum): the drop gesture cannot leave the dropped event's incoming arrows violated. An entry that resends unchanged dates (the event dialog does, on every save) repositions nothing and pushes nothing, an end resize is never repositioned but is pushed when its own batch creates the violation, and the clamped dates fold back into the entry itself, preserving its other properties.allDay-only entry cascades (it moves the effective end). A timed event pushed or clamped behind an all-day predecessor lands on the first instant of the next day — the inclusive23:59:59.999end would not survive the second-resolution wall-time serialization.onEventsChange, nopersistEvents, no partial application) and the rejection surfaces as a transient toast naming the blocked event. Together with the clamp, no gesture can leave a violated arrow. The veto is observable:updateEventreturns whether the batch was applied — a vetoed dialog save keeps the dialog open with the user's edits, a vetoed drop of the edited occurrence does not repoint the editing surface, and a rejected cut paste keeps the clipboard.dateToEventString); without it, cross-timezone all-day entries were classified against display-zone bounds and the cascade disagreed with the store's effective result. Heads-up caught while testing this: the dialog builds all-day bounds in the display timezone (computeRange), so a cross-timezone all-day save genuinely stretches the event by a day — a pre-existing upstream issue, documented (not fixed) by the mirrored tests here.dependenciesis provided — no flag.The two design inputs from #22854
This settles the two points raised in the data-model PR:
dataSource, the cascade is computed and emitted insideupdateEvents, and persistence follows asynchronously as usual — same trade-off (and same v1 no-rollback limitation) as the cascade-delete from [scheduler-premium] Add the dependencies data model #23117.UpdateEventsParameters.handleEventsUpdatenow returns{ updated } | void, is called before the merge loop, and the returned entries are appended to the batch (never rebuilt, preserving insertion order). The engine re-resolves the post-update dates itself from the partial changes.Tests
TimelineAutoSchedulingdemo under docs experiments for manual testing.