diff --git a/ui/src/styles/components.css b/ui/src/styles/components.css index 2ffb18dc4fd..fdb44d1e39a 100644 --- a/ui/src/styles/components.css +++ b/ui/src/styles/components.css @@ -1341,15 +1341,6 @@ box-sizing: border-box; } -.cron-run-entry__body pre, -.cron-run-entry__body blockquote, -.cron-job-detail-value pre, -.cron-job-detail-value blockquote { - width: 100%; - max-width: 100%; - box-sizing: border-box; -} - @media (max-width: 1100px) { .cron-job.list-item { display: flex; diff --git a/ui/src/ui/views/cron.test.ts b/ui/src/ui/views/cron.test.ts index 8f9ba58b406..1bb6595aecd 100644 --- a/ui/src/ui/views/cron.test.ts +++ b/ui/src/ui/views/cron.test.ts @@ -372,6 +372,31 @@ describe("cron view", () => { expect(container.querySelector(".cron-run-entry__body strong")?.textContent).toBe("markdown"); }); + it("treats empty run summaries as absent when an error exists", () => { + const container = document.createElement("div"); + render( + renderCron( + createProps({ + runs: [ + { + ts: 2, + jobId: "job-empty-summary", + status: "error", + summary: "", + error: "Failed with **markdown**", + }, + ], + }), + ), + container, + ); + + expect(container.querySelector(".cron-run-entry__meta")?.textContent).not.toContain( + "Failed with", + ); + expect(container.querySelector(".cron-run-entry__body strong")?.textContent).toBe("markdown"); + }); + it("wires the Edit action and shows save/cancel controls when editing", () => { const container = document.createElement("div"); const onEdit = vi.fn(); diff --git a/ui/src/ui/views/cron.ts b/ui/src/ui/views/cron.ts index fed5210098d..38c0c3684db 100644 --- a/ui/src/ui/views/cron.ts +++ b/ui/src/ui/views/cron.ts @@ -1723,8 +1723,8 @@ function renderRun( : usage && typeof usage.input_tokens === "number" && typeof usage.output_tokens === "number" ? `${usage.input_tokens} in / ${usage.output_tokens} out` : null; - const bodySource = entry.summary ?? entry.error ?? t("cron.runEntry.noSummary"); - const showErrorInMeta = !!entry.error && entry.summary != null; + const bodySource = entry.summary || entry.error || t("cron.runEntry.noSummary"); + const showErrorInMeta = !!entry.error && !!entry.summary; return html`