diff --git a/apps/dashboard/app/(main)/insights/[id]/page.tsx b/apps/dashboard/app/(main)/insights/[id]/page.tsx index bd70ae4fe7..5ee5b393bd 100644 --- a/apps/dashboard/app/(main)/insights/[id]/page.tsx +++ b/apps/dashboard/app/(main)/insights/[id]/page.tsx @@ -30,6 +30,7 @@ import { StatusDot, Textarea, } from "@databuddy/ui"; +import { ContextUsed } from "../_components/context-used"; import { ExecuteDefinitionAction } from "../_components/investigation-row"; type TimelineItem = InsightByIdResponse["timeline"][number]; @@ -471,6 +472,8 @@ function InvestigationActivity({ } /> + + unsafe()", + observedAt: "2026-09-08T11:00:00Z", + profileVersion: { revision: 3, updatedAt: "2026-09-08T11:00:00Z" }, + references: [ + { title: "Report guide", url: "https://example.com/reports" }, + ], + }, + ], +}; + +describe("Business context disclosure", () => { + it("shows supplied text and revision without claiming fact-to-claim attribution", () => { + const html = renderToStaticMarkup(); + expect(html).toContain("Business context"); + expect(html).toContain('aria-expanded="false"'); + expect(html).toContain("Background available for this update."); + expect(html).toContain( + "does not identify which facts influenced individual claims" + ); + expect(html).toContain("Revision 3"); + expect(html).toContain('dateTime="2026-09-08T11:00:00Z"'); + expect(html).toContain('href="https://example.com/reports"'); + expect(html).toContain("Report guide"); + expect(html).toContain("Preparation starts a draft."); + expect(html).not.toContain("