fix(frontend): wrap schema-linking fallback pre; test archived hides Resume

This commit is contained in:
2026-06-29 13:09:56 +02:00
parent 964bfa39ea
commit 910928471a
2 changed files with 7 additions and 1 deletions
@@ -43,3 +43,9 @@ test("shows Resume for resumable, hides it for finalized", async () => {
rerender(<SessionDocumentsPanel session={{ ...base, status: "finalized" }} onClose={vi.fn()} onResume={vi.fn()} />);
expect(screen.queryByRole("button", { name: /resume/i })).not.toBeInTheDocument();
});
test("hides Resume for an archived session", async () => {
wrap(<SessionDocumentsPanel session={{ ...base, archived: true }} onClose={vi.fn()} onResume={vi.fn()} />);
await screen.findByText("Original question");
expect(screen.queryByRole("button", { name: /resume/i })).not.toBeInTheDocument();
});
+1 -1
View File
@@ -27,7 +27,7 @@ function DocBody({ doc }: { doc: SessionDocument }) {
const linking = JSON.parse(doc.content);
return <SchemaLinkingViewer linking={linking} />;
} catch {
return <pre className="text-xs">{doc.content}</pre>;
return <pre className="whitespace-pre-wrap text-xs">{doc.content}</pre>;
}
}
if (doc.format === "decisions") {