mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-07 16:35:48 +01:00
fix(ui): show provider notice summaries with informational severity
Keep existing normalized notice text visible in completed activity summaries and use an info icon for informational notices while preserving warning and error presentation. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
8559cdf370
commit
a32ce172a4
5 files changed
+60
-4
No files matched your search
@@ -231,4 +231,21 @@ describe("TaskChatProtocolActivityRow", () => {
|
||||
expect(row?.querySelector("details")).toBeNull();
|
||||
expect(row?.querySelector('[aria-expanded]')).toBeNull();
|
||||
});
|
||||
it.each([
|
||||
["info", "informational", "Provider update", "lucide-info"],
|
||||
["warning", "informational", "Warning", "lucide-triangle-alert"],
|
||||
["error", "failed", "Error", "lucide-triangle-alert"],
|
||||
["info", "failed", "Error", "lucide-triangle-alert"],
|
||||
] as const)("renders %s/%s notice severity without hiding its summary", (severity, status, label, icon) => {
|
||||
const summary = "Pi estimates this turn at $0.000617. Billing cost is unverified.";
|
||||
render({
|
||||
id: "notice", kind: "protocol", surface: "provider_activity", family: "provider_notice",
|
||||
eventType: "provider.notice.recorded", status, title: "Provider notice", summary,
|
||||
details: [{ label: "Severity", value: severity }], steps: [], links: [], children: [],
|
||||
});
|
||||
expect(container.textContent).toContain(label);
|
||||
expect(container.querySelector("p")?.textContent).toBe(summary);
|
||||
expect(container.querySelector('[data-testid="task-chat-protocol-activity-icon"]')?.classList.contains(icon)).toBe(true);
|
||||
});
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user