fix(ui): tighten routine preview polish

This commit is contained in:
Dotta committed 2026-06-09 23:23:21 +00:00
1 parent 94bd823f86
commit e4c684ec26
2 files changed
+9 -10

No files matched your search

+7 -8
View File
@@ -174,14 +174,13 @@ export function EnvVarEditor({
// Fill the trailing empty row (or append one) with this secret bound.
const next = rows.map((row) => ({ ...row }));
const trailing = next[next.length - 1];
const target =
trailing && !trailing.key && !trailing.plainValue && !trailing.secretId
? trailing
: (() => {
const fresh = emptyRow();
next.push(fresh);
return fresh;
})();
let target: Row;
if (trailing && !trailing.key && !trailing.plainValue && !trailing.secretId) {
target = trailing;
} else {
target = emptyRow();
next.push(target);
}
target.source = "secret";
target.secretId = secret.id;
target.version = "latest";
+2 -2
View File
@@ -198,8 +198,8 @@ export function nextCronFires(
cursor.setUTCMinutes(cursor.getUTCMinutes() + 1);
const fires: Date[] = [];
// Search window: 5 years of minutes is plenty and bounds impossible schedules.
const maxIterations = 5 * 366 * 24 * 60;
// Preview-only bound: cap sparse or impossible schedules before they can stall the UI.
const maxIterations = 2 * 366 * 24 * 60;
for (let i = 0; i < maxIterations && fires.length < count; i++) {
let parts: ZonedParts;
try {