feat(tmux-monitor): add a unified multi-host view (#1520)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-30 09:47:21 -05:00
1 parent cbbb80bc82
commit 4c2f54dac0
12 files changed
+1192 -115

No files matched your search

@@ -0,0 +1,24 @@
import { describe, expect, it, vi } from "vitest";
import { createPollQueue } from "../../src/frontend/poll-queue";
describe("background host polling queue", () => {
it("bounds concurrent hosts and releases a slot after failure", async () => {
const run = createPollQueue(2);
let release!: () => void;
const held = new Promise<void>((resolve) => {
release = resolve;
});
const first = run(() => held);
const second = run(async () => {
throw new Error("offline");
});
const thirdTask = vi.fn(async () => "third");
const third = run(thirdTask);
expect(thirdTask).not.toHaveBeenCalled();
await expect(second).rejects.toThrow("offline");
await expect(third).resolves.toBe("third");
expect(thirdTask).toHaveBeenCalledOnce();
release();
await first;
});
});