mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-31 06:04:11 +01:00
fix(ui): tighten routine preview polish
This commit is contained in:
1 parent
94bd823f86
commit
e4c684ec26
2 files changed
+9
-10
No files matched your search
@@ -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";
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user