UI: render markdown in cron job prompts and run summaries#48504
UI: render markdown in cron job prompts and run summaries#48504garethdaine wants to merge 4 commits intoopenclaw:mainfrom
Conversation
The /cron dashboard page now renders markdown content using the existing marked + dompurify pipeline. Job prompts and run summaries display formatted headings, tables, code blocks, blockquotes, lists, and links instead of raw markdown text. Restructures the job card and run entry layouts to separate the header (title, status, meta) from the markdown body, giving block-level content full card width. Adds responsive styles for tablet and mobile breakpoints.
3f257c8 to
7563a66
Compare
Greptile SummaryThis PR threads cron job prompts and run summaries through the existing
Confidence Score: 4/5
|
There was a problem hiding this comment.
Pull request overview
Updates the Cron dashboard UI to render cron job prompts and cron run summaries as sanitized, formatted markdown (matching the chat view’s marked + DOMPurify pipeline), and restructures the job/run card layouts so block-level markdown content can use the full card width with responsive behavior.
Changes:
- Render cron job prompt (
payload.message) and run summary (entry.summary) viatoSanitizedMarkdownHtml()+unsafeHTML(). - Restructure cron job cards and run history entries into header/body sections to better accommodate block markdown.
- Add/adjust responsive CSS for cron cards (desktop grid vs. stacked mobile/tablet layouts; horizontal scroll for tables/code where needed).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| ui/src/ui/views/cron.ts | Switches prompt/summary rendering to sanitized markdown HTML and refactors job/run entry DOM structure. |
| ui/src/styles/components.css | Adds cron-specific layout + markdown presentation overrides and responsive rules for the new structure. |
Comments suppressed due to low confidence (2)
ui/src/styles/components.css:1476
.cron-job .list-metastill setsgrid-area: meta, but.cron-job-headeris now a grid withoutgrid-template-areas. Using a named grid-area here can create implicit grid lines/tracks and cause the meta column to be placed unexpectedly. Consider removinggrid-areaand instead rely on auto-placement (or explicitly setgrid-column: 2/justify-self: end).
.code-block {
font-family: var(--mono);
font-size: 13px;
line-height: 1.5;
ui/src/styles/components.css:1529
- The selector
.cron-run-entry__summary tableappears to be dead code now that the run summary markup was replaced with.cron-run-entry__bodyin the view. Keeping this rule is confusing and makes future styling harder. Remove it or update the selector to the new element/class that actually contains the markdown.
}
.list-item-clickable {
cursor: pointer;
}
You can also share your feedback on Copilot code review. Take the survey.
|
This assigned pull request has been marked as stale after being open for 27 days. |
|
This assigned pull request has been automatically marked as stale after being open for 27 days. |
|
Superseded by #72777. I ported the final behavior from this PR onto current main, including the follow-up fixes for the orphaned CSS selector, markdown-link click propagation, and duplicate error rendering. Closing this stale branch so review and CI can continue on the fresh maintainer-owned PR. Thanks @garethdaine for the original contribution. |
The /cron dashboard page now renders markdown content using the existing marked + dompurify pipeline. Job prompts and run summaries display formatted headings, tables, code blocks, blockquotes, lists, and links instead of raw markdown text.
Restructures the job card and run entry layouts to separate the header (title, status, meta) from the markdown body, giving block-level content full card width. Adds responsive styles for tablet and mobile breakpoints.
Summary
Describe the problem and fix in 2–5 bullets:
making formatted content (tables, code blocks, lists, headings) unreadable.
agent runs — these should render the same way chat messages do.
unsafeHTML() (the same pipeline used by the chat view). Job cards and run entries are restructured
into header/body/footer sections so markdown block elements get full card width. Responsive styles
added for tablet and mobile.
tags/attributes. No changes to cron business logic, API, or data model. Chat view rendering is
untouched.
Change Type (select all)
Scope (select all touched areas)
User-visible / Behavior Changes
blocks, lists, links, images, blockquotes, horizontal rules).
title/status from the prompt body.
scrollable.
Security Impact (required)
raw HTML escaped) + DOMPurify with a strict allowlist of tags and attributes. No new tags or
attributes were added.
Repro + Verification
Environment
Steps
Expected
blockquotes, lists)
Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
blocks, blockquotes, lists, links, images, HR). Run history summary with same. Mobile/tablet
responsive layouts at multiple viewport widths.
section rendering alongside prompt. Empty/missing summaries in run entries.
content or pathological markdown patterns (covered by existing toSanitizedMarkdownHtml safeguards).
Pre-existing test failures (2 sort-order tests fail on main).
Compatibility / Migration
Failure Recovery (if this breaks)
ui/src/styles/components.css) are self-contained.
cron cards. Layout overflow on mobile. Job cards or run entries with broken grid/flex alignment.
Risks and Mitigations
placed at the end of components.css with a comment explaining cascade ordering. Mobile-first flex
layout with min-width: 1101px media query for desktop grid avoids cascade order issues with
responsive rules.