Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function runtimeEventToActivities(
createdAt: event.createdAt,
tone: "info",
kind: "runtime.warning",
summary: "Runtime warning",
summary: "Runtime Warning",
payload: {
message: truncateDetail(event.payload.message),
...(event.payload.detail !== undefined ? { detail: event.payload.detail } : {}),
Expand Down
63 changes: 61 additions & 2 deletions apps/web/src/components/chat/MessagesTimeline.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe("MessagesTimeline", () => {
expect(markup).toContain('data-user-message-collapsed="true"');
expect(markup).toContain('data-user-message-fade="true"');
expect(markup).toContain('data-user-message-footer="true"');
});
}, 20_000);

it("does not render collapse controls for short user messages", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
Expand All @@ -144,7 +144,7 @@ describe("MessagesTimeline", () => {

expect(markup).not.toContain("Show full message");
expect(markup).toContain('data-user-message-collapsible="false"');
});
}, 20_000);

it("renders inline terminal labels with the composer chip UI", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
Expand Down Expand Up @@ -212,6 +212,65 @@ describe("MessagesTimeline", () => {
expect(markup).toContain("Work log");
});

it("renders a warning detail toggle without exposing the details by default", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const markup = renderToStaticMarkup(
<MessagesTimeline
{...buildProps()}
timelineEntries={[
{
id: "entry-1",
kind: "work",
createdAt: "2026-03-17T19:12:28.000Z",
entry: {
id: "work-1",
createdAt: "2026-03-17T19:12:28.000Z",
label: "Runtime Warning",
tone: "info",
runtimeWarningMessage: "Provider got slow",
runtimeWarningDetail: {
code: "slow_provider",
retryInSeconds: 5,
},
},
},
]}
/>,
);

expect(markup).toContain("Runtime Warning");
expect(markup).toContain('aria-label="Show runtime warning details"');
expect(markup).not.toContain("slow_provider");
expect(markup).not.toContain("Provider got slow");
expect(markup).not.toContain(">Warning<");
});

it("renders whitespace-only runtime warning messages as a plain runtime warning row", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const markup = renderToStaticMarkup(
<MessagesTimeline
{...buildProps()}
timelineEntries={[
{
id: "entry-1",
kind: "work",
createdAt: "2026-03-17T19:12:28.000Z",
entry: {
id: "work-1",
createdAt: "2026-03-17T19:12:28.000Z",
label: "Runtime Warning",
tone: "info",
runtimeWarningMessage: " ",
},
},
]}
/>,
);

expect(markup).toContain("Runtime Warning");
expect(markup).not.toContain('aria-label="Show runtime warning details"');
});

it("formats changed file paths from the workspace root", async () => {
const { MessagesTimeline } = await import("./MessagesTimeline");
const markup = renderToStaticMarkup(
Expand Down
Loading
Loading