@deephaven-enterprise/query-utils 2026.1.54 → 2026.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -273,6 +273,21 @@ export declare class QueryScheduler {
273
273
  set stopTime(value: number);
274
274
  get overnight(): boolean;
275
275
  set overnight(value: boolean);
276
+ /**
277
+ * Reconciles the base times with the overnight flag when delay-start (useMinStartTime) is
278
+ * enabled on a dependent schedule. While delay-start was off, overnight was a free manual flag
279
+ * and there was no start endpoint; once it becomes live the previously unused start time may be
280
+ * inconsistent with the ordering that validation now enforces.
281
+ *
282
+ * The start time is the field the delay-start checkbox governs, so it is adjusted in preference
283
+ * to the user's chosen End Time and overnight flag:
284
+ * - Non-overnight requires start < stop: if the stale start is not before the End Time, snap it
285
+ * to midnight, preserving the End Time and the overnight flag.
286
+ * - Overnight requires start > stop: there is no clean single start value that keeps the End
287
+ * Time, so fall back to swapping the two real clock values (the only sensible overnight
288
+ * window). This is the one case that changes the End Time.
289
+ */
290
+ alignTimesForDelayStart(): void;
276
291
  get stopTimeDisabled(): boolean;
277
292
  set stopTimeDisabled(value: boolean);
278
293
  /**
@@ -159,6 +159,13 @@ export class QueryScheduler {
159
159
  this.overnightInternal = false;
160
160
  return;
161
161
  }
162
+ // Dependent scheduling only has a start endpoint when delay-start (useMinStartTime) is enabled.
163
+ // While it is disabled there is no ordering constraint at all — both this client validator
164
+ // and the controller skip start/stop ordering — so overnight is a free manual flag and must
165
+ // not be auto-derived from the (unused) base times.
166
+ if (type === QueryScheduler.TYPES.DEPENDENT && !this.useMinStartTime) {
167
+ return;
168
+ }
162
169
  if (!overnightInternal && stopTimeInternal <= startTimeInternal) {
163
170
  this.overnightInternal = true;
164
171
  }
@@ -186,12 +193,45 @@ export class QueryScheduler {
186
193
  set overnight(value) {
187
194
  const { startTimeInternal, stopTimeInternal } = this;
188
195
  this.overnightInternal = value;
196
+ // Dependent scheduling only has a start endpoint when delay-start (useMinStartTime) is enabled.
197
+ // While it is disabled there is no start time to order against, so overnight is a free manual
198
+ // flag and toggling it must not swap the base times. The times are reconciled later, if and
199
+ // when delay-start is enabled, via alignTimesForDelayStart().
200
+ if (this.type === QueryScheduler.TYPES.DEPENDENT && !this.useMinStartTime) {
201
+ return;
202
+ }
189
203
  if ((!value && stopTimeInternal < startTimeInternal) ||
190
204
  (value && startTimeInternal < stopTimeInternal)) {
191
205
  this.startTimeInternal = stopTimeInternal;
192
206
  this.stopTimeInternal = startTimeInternal;
193
207
  }
194
208
  }
209
+ /**
210
+ * Reconciles the base times with the overnight flag when delay-start (useMinStartTime) is
211
+ * enabled on a dependent schedule. While delay-start was off, overnight was a free manual flag
212
+ * and there was no start endpoint; once it becomes live the previously unused start time may be
213
+ * inconsistent with the ordering that validation now enforces.
214
+ *
215
+ * The start time is the field the delay-start checkbox governs, so it is adjusted in preference
216
+ * to the user's chosen End Time and overnight flag:
217
+ * - Non-overnight requires start < stop: if the stale start is not before the End Time, snap it
218
+ * to midnight, preserving the End Time and the overnight flag.
219
+ * - Overnight requires start > stop: there is no clean single start value that keeps the End
220
+ * Time, so fall back to swapping the two real clock values (the only sensible overnight
221
+ * window). This is the one case that changes the End Time.
222
+ */
223
+ alignTimesForDelayStart() {
224
+ const { overnightInternal, startTimeInternal, stopTimeInternal } = this;
225
+ if (!overnightInternal) {
226
+ if (startTimeInternal >= stopTimeInternal) {
227
+ this.startTimeInternal = QueryScheduler.parseLocalTime('00:00:00');
228
+ }
229
+ }
230
+ else if (startTimeInternal <= stopTimeInternal) {
231
+ this.startTimeInternal = stopTimeInternal;
232
+ this.stopTimeInternal = startTimeInternal;
233
+ }
234
+ }
195
235
  get stopTimeDisabled() {
196
236
  return this.stopTimeDisabledInternal;
197
237
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven-enterprise/query-utils",
3
- "version": "2026.1.54",
3
+ "version": "2026.1.55",
4
4
  "description": "Deephaven Enterprise Query Utils",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -17,8 +17,8 @@
17
17
  "build": "tsc --build"
18
18
  },
19
19
  "dependencies": {
20
- "@deephaven-enterprise/client-utils": "2026.1.54",
21
- "@deephaven-enterprise/jsapi-types": "2026.1.54",
20
+ "@deephaven-enterprise/client-utils": "2026.1.55",
21
+ "@deephaven-enterprise/jsapi-types": "2026.1.55",
22
22
  "@deephaven/jsapi-types": "1.0.0-dev0.40.5",
23
23
  "@deephaven/log": "^0.97.0",
24
24
  "@deephaven/utils": "^0.97.0",