Repository navigation
[scheduler-premium] Dependencies - Arrows and terminals for SS, FF and SF - #23524
Conversation
Pure move: the anchor resolver, the orthogonal routing and the hit-area helpers get a module each, so the routing changes for the new dependency types are reviewable on their own. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
Widens SchedulerDependencyType to the four PDM types (the rendering is the consumer; lag stays with the engine work) and routes the arrows in a canonical frame: StartToStart and StartToFinish mirror the anchors around the events area, leaving one router for opposite edges (the existing one) and one for same edges. The arrow path is now built lazily, like the hit-area, so a row re-measure does not rebuild the strings of off-screen arrows. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
…ions Every event gets a terminal on both edges, and the terminals are drop targets themselves: the dragged edge and the dropped edge resolve the dependency type (the event body targets the start edge). While a gesture hovers a target, its terminals are revealed by state so the user can pick the edge. Duplicate detection now includes the type, the delete button sits on the side the arrow comes from, and the successor description carries one sentence per type. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
While the gesture hovers a target, the terminal of the edge the drop would use (the hovered terminal, or the start edge over the event body) carries data-dependency-drop-target and grows in the creation color, like Bryntum's active terminal. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
- Let the pointer through the terminals while a dependency is selected, so the delete button under the target's edge terminal stays reachable. - Compare the revealed terminal set element by element: the two terminals of an appearance are culled separately and the set can grow on scroll. - Drop the hover reveal of the source's other terminal at gesture start. - Memoize the terminal leaf on primitive props so a gesture transition only re-renders the gesture's terminals. - Ignore and warn about dependencies with an unknown type instead of throwing. - Tests for the start terminal placement and clamp, the multi-resource gesture, the provisional line anchor, the StartToFinish edge cases and a FinishToFinish multi-resource fan-out; stale comments, dead code and duplicated CSS cleaned up. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
One dataset where every dependency has a business reason and each type and arrow shape appears once, restricted to working hours so it fits the viewport. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
…rminals-for-ssffsf
Deploy previewBundle size
Check out the code infra dashboard for more information about this PR. |
Moves the resolver tests out of the geometry suite, shares the fixtures through dependencyGeometryTestUtils, and pins the edge points per lane and row, the row obstacles, the unmeasured rows and the precomputed positions directly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
…rminals-for-ssffsf
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
…rminals-for-ssffsf
…ion build The shared fixtures import test/utils, which the declaration build (rootDir src) cannot follow; the tests folder is excluded from it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
…sffsf' of github.com:rita-codes/mui-x into 23394-scheduler-dependencies-arrows-and-terminals-for-ssffsf
…meline edges The same-height branch of the same-edges router kept the raw anchors as its endpoints, so a target ending at the timeline end (or starting at its start for the mirrored types) lost its entry segment and the arrowhead pointed up. The stubs now ride over the events like the other branches, and an invariant test over the whole type matrix pins that every route ends horizontally into its target edge. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
Hiding every terminal while a dependency is selected made a press on a visible terminal fall through to whatever sits beneath it. Only the selected arrow's target-edge terminal, the one the button covers, steps aside now. Also: the routing invariant test checks the exit direction and orthogonality, the fixtures shared by the dependency tests live in one place, and a few dead bits and stale comments from the review go. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBYMarDHeuysLnbKifmMaP
…rminals-for-ssffsf
…rminals-for-ssffsf
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
flaviendelangle
left a comment
There was a problem hiding this comment.
PR review
One non-blocking finding: an unknown dependency type can crash the timeline when that dependency is selected. All 251 executed dependency tests passed; browser tests were not run.
Bugs (1)
1. 🟠 Guard the selected dependency’s type before resolving its edges
Location: EventTimelinePremiumDependencyTerminals.tsx:362
: { eventId: selected.target, side: getDependencyEdges(selected.type).target };Unknown types are filtered out of active arrows, but selectedModel still returns them. The selection cleanup also does not check the type. This lookup therefore returns undefined, and reading .target crashes rendering.
Failure scenario: Select a valid arrow, then refresh dependencies with the same ID and an unknown type. A local reproduction confirmed the TypeError at this line.
Fix: Guard unsupported types before resolving the selected dependency’s edges, clear their selection, and add a regression test for this update.
Tests (0)
No findings.
Simplifications (0)
No findings.
Docs (0)
No findings.
Verdict
Approve after nits - guard the selected-dependency lookup against malformed type updates.
🤖 Review generated with Codex
…ependencies-arrows-and-terminals-for-ssffsf # Conflicts: # packages/x-scheduler-internals-premium/src/event-timeline-premium-selectors/eventTimelinePremiumDependencySelectors.ts # packages/x-scheduler-premium/src/event-timeline-premium/content/timeline-dependency-arrows/dependencyArrowGeometry.test.ts # packages/x-scheduler-premium/src/event-timeline-premium/content/timeline-dependency-arrows/dependencyArrowGeometry.ts # packages/x-scheduler-premium/src/event-timeline-premium/tests/dependencyTestUtils.tsx
…ows-and-terminals-for-ssffsf' into 23394-scheduler-dependencies-arrows-and-terminals-for-ssffsf
…ependencies-arrows-and-terminals-for-ssffsf
… whose type becomes unknown Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rminals-for-ssffsf
|
Good catch, thanks. The store effect that clears the selection only checked the endpoints, so it missed the "unknown type" case this PR introduced in the active-list selector. Fixed in d7009e6 by extracting an |
Closes #23394. Part of #22853.
Renders the Start-to-Start, Finish-to-Finish and Start-to-Finish dependencies on the timeline and lets users create them by gesture. The engine side (per-type formulas, lag) stays in #23393: until it lands, a non-FS dependency is drawn and described but not enforced.
What is covered
SchedulerDependencyTypewidens to the four types, the minimum the rendering needs. The rest of the model work (lag,lagUnit, validation) belongs to [scheduler] Dependencies: SS/FF/SF and lag in the auto-scheduling engine #23393 with the engine formulas that consume it, and is not touched here. HelpersgetDependencyEdges(type)andgetDependencyType(sourceSide, targetSide). A dependency with an unknown type is ignored with a dev warning.DependencyCreation.Also
Out of scope
How to test
/x/react-scheduler/experiments/, section "Timeline dependency arrows": one dependency of each type in the data, hover an event for its terminals, drag from either edge onto another event or one of its terminals, select an arrow to delete it.