fix: fail safe on missing workspace revisions

This commit is contained in:
2026-08-08 20:03:41 +02:00
parent c3a5621737
commit 1b1213317b
10 changed files with 205 additions and 98 deletions
@@ -232,6 +232,24 @@ test("shows a migration banner for legacy descriptors and does not load editor d
expect(screen.queryByLabelText("Vector collection")).not.toBeInTheDocument();
});
test("shows an actionable unavailable message when a workspace summary omits its canonical revision", async () => {
const user = userEvent.setup();
server.use(
http.get("/api/workspaces", () => HttpResponse.json([
{
id: "broken-workspace", name: "Broken workspace", displayName: "Broken workspace", description: "Broken data",
language: "en", file: "workspaces/broken-workspace.yaml",
},
])),
);
renderManager();
await user.click(await screen.findByRole("button", { name: "Broken workspace" }));
expect(await screen.findByText("This workspace summary is incomplete. Refresh the registry or choose another workspace before creating sessions or editing drafts.")).toBeVisible();
expect(screen.queryByLabelText("Vector collection")).not.toBeInTheDocument();
});
test("shows an accessible retry instead of a loading status when the registry status query fails", async () => {
const user = userEvent.setup();
let calls = 0;