feat: parallel agent upgrades with per-host log panels (0.4.2)

Allow multiple remote update jobs at once; each upgrade gets its own
bottom-right log dock that auto-closes 30s after success.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-25 10:22:31 +10:00
parent 719d5c5719
commit dd2ae51b43
10 changed files with 267 additions and 174 deletions
+12 -11
View File
@@ -71,8 +71,7 @@
<HostAgentVersionUpgrade
:host="h"
:git="data"
:updating="upgradingHostId === h.id"
:upgrade-blocked="upgradingHostId != null && upgradingHostId !== h.id"
:updating="isHostRemoteActionActive(h.id)"
:outdated-highlight="isVersionOutdated(h)"
@upgrade="startAgentUpgrade(h)"
/>
@@ -132,7 +131,11 @@ import {
remoteActionKindForHost,
remoteActionTitleForHost,
} from "../utils/hostAgentUpgrade";
import { runHostRemoteAction } from "../composables/useHostRemoteAction";
import {
isHostRemoteActionActive,
runHostRemoteAction,
showHostRemoteActionLog,
} from "../composables/useHostRemoteAction";
import HostAgentVersionUpgrade from "../components/HostAgentVersionUpgrade.vue";
const router = useRouter();
@@ -197,7 +200,6 @@ const initialSort = loadHostsSortPrefs();
const sortBy = ref<SortKey>(initialSort.sortBy);
const sortDir = ref<"asc" | "desc">(initialSort.sortDir);
const deletingId = ref<number | null>(null);
const upgradingHostId = ref<number | null>(null);
let patchingHostRow = false;
let unsubscribeHostPatch: (() => void) | null = null;
@@ -234,17 +236,16 @@ function isVersionOutdated(h: HostSummary): boolean {
}
async function startAgentUpgrade(h: HostSummary) {
if (!isGitAgentUpgradeAvailable(h, data.value) || upgradingHostId.value != null) {
if (!isGitAgentUpgradeAvailable(h, data.value)) {
return;
}
if (isHostRemoteActionActive(h.id)) {
showHostRemoteActionLog(h.id);
return;
}
const kind = remoteActionKindForHost(h);
if (!kind) return;
upgradingHostId.value = h.id;
try {
await runHostRemoteAction(h.id, remoteActionTitleForHost(h), kind);
} finally {
upgradingHostId.value = null;
}
void runHostRemoteAction(h.id, remoteActionTitleForHost(h), kind);
}
function openHost(id: number) {