Review follow-ups on the window-close-hour feature:
- Reject windowCloseHour < windowOpenHour when saving global rules. The
reopen engine (nextCycleOpensAt) assumes the daily desk runs within one
EAT day; an overnight range would misroute a ready-time inside the span
to the next morning. openHour === closeHour stays valid (24-hour desk).
- Derive the board projection's runaway cap from the real first-open →
departure span over the minimum per-cycle advance, so a legitimate
long-lead config is never silently truncated (was a flat 200).
- Document the open <= close precondition on nextCycleOpensAt and clarify
the ready-before-open comment.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Loading (loaded-on-train step + per-booking loading status) no longer gates
dispatch/departure of a Djibouti import train. Per-booking loading status stays
tracking-only; a scheduled train dispatches once gatepass is granted, without
waiting on loading confirmation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Removed the gate pass granting functionality from the BookingClearanceService and ContractClearanceService, replacing it with a new method to retrieve gate pass status from train schedules.
- Updated the ContractsController to eliminate endpoints related to gate pass granting.
- Refactored the UI components (ExportClearanceStepper and PhasedClearanceActionPanel) to reflect the new gate pass securing process, linking to the train scheduling interface instead.
- Cleaned up related constants and query hooks, removing unused code and references to the gate pass functionality.
- Adjusted types in the contracts to accommodate changes in the gate pass handling logic.