commit d65aac62059cba4333dfa2ad8e326990402519d5
parent 9e0ac7dd03a3edfceade9f91be8407d590d6051c
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 08:37:11 -0400
umtool: the board says when it is busy (data-board-busy); board.spec waits for it before each move (a move pressed while the last is answering is refused)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/umtool/components/research/BoardView.tsx b/umtool/components/research/BoardView.tsx
@@ -394,7 +394,7 @@ export default function BoardView({ initial }: { initial: CaseView }) {
/>
<div className="grid min-h-0 flex-1 grid-cols-[minmax(0,1fr)_300px]">
<div className="flex min-h-0 min-w-0 flex-col">
- <div className="min-h-0 flex-1 overflow-auto px-7 pb-4 pt-2">
+ <div className="min-h-0 flex-1 overflow-auto px-7 pb-4 pt-2" data-board-busy={busy ? "" : undefined}>
{doc.quotes.length === 0 && doc.sections.length === 0 ? (
<EmptyState title="No quotes on this board yet">
<Link prefetch={false} href={researchFromCaseHref(doc)} className="ink-link">
diff --git a/umtool/e2e/board.spec.ts b/umtool/e2e/board.spec.ts
@@ -118,15 +118,21 @@ test("sections and order: a, alt+j/k across sections, the section menu; claim, n
await page.keyboard.press("Alt+j");
await expect.poll(() => caseJson("lighthouse-case").quotes.map((q: { id: string }) => q.id).join(" ")).toBe("q2 q1 q3");
await expect(litId(page)).toHaveAttribute("data-lit-id", "q:q1");
+ // A move is refused while the last one is still answering: the file is
+ // written before the answer lands, so wait for the board to be idle.
+ await expect(page.locator("[data-board-busy]")).toHaveCount(0);
await page.keyboard.press("Alt+j");
await expect.poll(() => caseJson("lighthouse-case").quotes.map((q: { id: string }) => q.id).join(" ")).toBe("q2 q3 q1");
await expect(litId(page)).toHaveAttribute("data-lit-id", "q:q1");
+ await expect(page.locator("[data-board-busy]")).toHaveCount(0);
await page.keyboard.press("Alt+j");
await expect.poll(() => caseJson("lighthouse-case").quotes.find((q: { id: string }) => q.id === "q1").section).toBe("s1");
await expect(b.locator('[data-group="s1"] [data-quote="q1"]')).toBeVisible();
+ await expect(page.locator("[data-board-busy]")).toHaveCount(0);
await expect(litId(page)).toHaveAttribute("data-lit-id", "q:q1");
// And back up: alt+k.
await expect(litId(page)).toHaveAttribute("data-lit-id", "q:q1");
+ await expect(page.locator("[data-board-busy]")).toHaveCount(0);
await page.keyboard.press("Alt+k");
await expect.poll(() => caseJson("lighthouse-case").quotes.find((q: { id: string }) => q.id === "q1").section).toBe(null);
await expect(litId(page)).toHaveAttribute("data-lit-id", "q:q1");
@@ -156,6 +162,7 @@ test("sections and order: a, alt+j/k across sections, the section menu; claim, n
await expect(b.locator('[data-group="s2"] [data-quote="q2"]')).toBeVisible();
// A section moves too: The keeper above Approval.
await b.locator('[data-section="s2"]').click();
+ await expect(page.locator("[data-board-busy]")).toHaveCount(0);
await page.keyboard.press("Alt+k");
await expect.poll(() => caseJson("lighthouse-case").sections.map((s: { id: string }) => s.id).join(" ")).toBe("s2 s1");
});