Better crawling safety with preflight checks and cooldowns
This commit is contained in:
parent
839593e1b3
commit
e8e20637e6
6 changed files with 172 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
import { computed, onMounted, onUnmounted, ref, watch } from "vue";
|
||||
|
||||
import { fetchDashboardSnapshot, type DashboardSnapshot } from "@/features/dashboard";
|
||||
import { formatCooldownCountdown } from "@/features/safety";
|
||||
import { ApiRequestError } from "@/lib/api/errors";
|
||||
import AppPage from "@/components/layout/AppPage.vue";
|
||||
import AsyncStateGate from "@/components/patterns/AsyncStateGate.vue";
|
||||
|
|
@ -53,6 +54,10 @@ const startCheckLabel = computed(() => {
|
|||
return "Manual checks disabled";
|
||||
}
|
||||
if (runStatus.safetyState.cooldown_active) {
|
||||
const remaining = runStatus.safetyState.cooldown_remaining_seconds;
|
||||
if (remaining > 0) {
|
||||
return `Cooldown (${formatCooldownCountdown(remaining)})`;
|
||||
}
|
||||
return "Safety cooldown";
|
||||
}
|
||||
if (runStatus.isLikelyRunning) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import {
|
|||
type QueueItem,
|
||||
type RunListItem,
|
||||
} from "@/features/runs";
|
||||
import { formatCooldownCountdown } from "@/features/safety";
|
||||
import { ApiRequestError } from "@/lib/api/errors";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { useRunStatusStore } from "@/stores/run_status";
|
||||
|
|
@ -89,6 +90,10 @@ const runButtonLabel = computed(() => {
|
|||
return "Manual checks disabled";
|
||||
}
|
||||
if (runStatus.safetyState.cooldown_active) {
|
||||
const remaining = runStatus.safetyState.cooldown_remaining_seconds;
|
||||
if (remaining > 0) {
|
||||
return `Cooldown (${formatCooldownCountdown(remaining)})`;
|
||||
}
|
||||
return "Safety cooldown";
|
||||
}
|
||||
if (runStatus.isLikelyRunning) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue