fix(automations): restore main checks

This commit is contained in:
Brennan Benson
2026-08-26 18:59:43 -04:00
committed by Jinwoo-H
parent b755629f37
commit 241d9f83fb
3 changed files with 4 additions and 28 deletions
@@ -98,6 +98,7 @@ function renderPanel(
requestExternalAction={() => undefined}
openEditExternalDialog={() => undefined}
openCreateDialog={() => undefined}
canCreateAutomation
onOpenDetail={() => undefined}
onRefresh={() => undefined}
isRefreshing={false}
@@ -63,10 +63,7 @@ import type { AutomationTemplate } from './automation-templates'
import { getAutomationTargetAvailability } from './automation-target-availability'
import { getAutomationCreateAvailability } from './automation-create-admission'
import { buildAutomationRunContextForRepo } from './automation-run-context'
import {
repoMatchesExternalAutomationTarget,
getExternalAutomationTargetForRepo
} from './automation-external-target-match'
import { repoMatchesExternalAutomationTarget } from './automation-external-target-match'
import { ensureHooksConfirmed } from '@/lib/ensure-hooks-confirmed'
import { getSettingsForRepoRuntimeOwner } from '@/lib/repo-runtime-owner'
import { checkRuntimeHooks } from '@/runtime/runtime-hooks-client'
@@ -82,6 +79,7 @@ import {
getAutomationHostTargetFromKey,
getAutomationHostTargetKey,
getAutomationListTarget,
getAutomationOwnerTarget,
getAutomationTargetFromHostId,
listAutomationsForTarget,
runAutomationNowForTarget,
@@ -1349,27 +1347,7 @@ export default function AutomationsPage(): React.JSX.Element {
: null
const projectId = targetWorktree?.repoId ?? fallbackRepo?.id ?? ''
const workspaceId = targetWorktree?.id ?? fallbackWorktree?.id ?? ''
const nextDraft: AutomationDraft = {
name: job.name,
prompt: job.prompt ?? job.promptPreview,
agentId: 'hermes',
projectId,
workspaceMode: 'existing',
workspaceId,
baseBranch: '',
setupDecision: undefined,
reuseSession: false,
precheckCommand: '',
precheckTimeoutSeconds: '60',
preset: hasCustomSchedule ? 'custom' : 'weekdays',
time: AUTOMATION_DEFAULT_TIME,
dayOfWeek: '1',
customSchedule: hasCustomSchedule ? rawSchedule : '',
missedRunGraceMinutes: '720',
scheduleWarning: hasCustomSchedule
? null
: 'This Hermes automation has an unsupported saved schedule. Pick a supported schedule before saving changes.'
}
const nextDraft = buildExternalAutomationEditDraft(job, { projectId, workspaceId })
setEditingAutomationId(null)
setEditingRowKey(null)
setEditingDestination(null)
@@ -127,9 +127,6 @@ export async function listAutomationRunsForTarget(
export async function createAutomationForTarget(input: AutomationCreateInput): Promise<Automation> {
const target = getAutomationCreateTarget(input)
if (target.kind === 'local') {
return await window.api.automations.create(input)
}
const result = await callRuntimeRpc<{ automation: Automation }>(
target,
'automation.create',