#23329: feat: Add Markdown support for cron job payload
app: web-ui
size: XS
Cluster:
Markdown Rendering Improvements
## Summary
Describe the problem and fix in 2–5 bullets:
- Problem:
- Prompts produced when a job is generated were plain/raw text and did not support Markdown formatting.
- Why it matters:
- Markdown improves readability and allows richer, clearer prompts for users.
- What changed:
- Cron job prompts now support Markdown formatting.
- What did NOT change (scope boundary):
- Backend scheduling and job execution semantics.
## Change Type (select all)
- [ ] Bug fix
- [x] Feature
- [ ] Refactor
- [ ] Docs
- [ ] Security hardening
- [ ] Chore/infra
## Scope (select all touched areas)
- [ ] Gateway / orchestration
- [ ] Skills / tool execution
- [ ] Auth / tokens
- [ ] Memory / storage
- [ ] Integrations
- [ ] API / contracts
- [x] UI / DX
- [ ] CI/CD / infra
## Linked Issue/PR
- Closes #
- Related #
## User-visible / Behavior Changes
- Job prompt text (after generation) now supports Markdown formatting when viewed.
## Security Impact (required)
- New permissions/capabilities? (Yes/No) No
- Secrets/tokens handling changed? (Yes/No) No
- New/changed network calls? (Yes/No) No
- Command/tool execution surface changed? (Yes/No) No
- Data access scope changed? (Yes/No) No
If any Yes, explain risk + mitigation: N/A
Mitigation for rendering risk: client-side HTML sanitize / allowlist before rendering.
## Repro + Verification
### Environment
- OS: macOS (dev), CI: Linux Node runners
- Runtime/container: Node 22+, pnpm
### Steps
1. Checkout branch: `git checkout feat/cron-render-markdown`
2. Generate a cron job.
3. Inspect the generated prompt in the UI/consumer — it should render Markdown (headers, lists, code blocks) and strip executable HTML.
### Expected
- Prompt content displays formatted Markdown; malicious HTML does not execute.
### Actual
- As expected (verified locally).
## Evidence
- (none attached)
## Human Verification (required)
What you personally verified:
- Verified that generated prompts render Markdown (headings, lists, code blocks).
- Verified basic sanitize behavior (simple script/onerror payloads not executed).
## Compatibility / Migration
- (left blank)
## Failure Recovery (if this breaks)
- How to disable/revert this change quickly:
- Revert the PR commit(s) or change the rendering to display raw text only.
- Files/config to restore:
- Revert changed files in this PR (restore previous prompt handling).
## Risks and Mitigations
- Risk: XSS via rendered prompt HTML.
- Mitigation: sanitize rendered output with an allowlist
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Adds Markdown rendering support to cron job payload display in the UI. Previously, cron job prompts displayed as plain text; now they render with proper Markdown formatting (headers, lists, code blocks) using the existing `toSanitizedMarkdownHtml` utility. The implementation follows established patterns from the chat rendering code and properly sanitizes output using DOMPurify with an allowlist-based approach.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The change is well-contained, uses existing proven sanitization infrastructure (`toSanitizedMarkdownHtml` with DOMPurify), follows established patterns from chat rendering, and only affects UI display without touching backend logic or scheduling semantics
- No files require special attention
<sub>Last reviewed commit: d3f5bbe</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#9710: fix(ui): prevent CPU spike when opening large tool outputs (#9700)
by divol89 · 2026-02-05
75.6%
#2716: Fix #2678: markdown horizontal rules not rendering in web chat
by Ambar-13 · 2026-01-27
75.6%
#15251: feat(web-fetch): send Accept: text/markdown header for Cloudflare M...
by wujieli0207 · 2026-02-13
75.5%
#13694: feat(cron): structured output via responseSchema for isolated agent...
by JordanCoin · 2026-02-10
75.3%
#2071: fix: accept JSON string for cron.add job parameter (#1940)
by andrescardonas7 · 2026-01-26
74.9%
#22609: feat(cron): add directText flag for text message dilivery and histo...
by bydsky · 2026-02-21
74.6%
#17606: feat(ui): add Edit button for cron jobs in Control UI [AI-assisted]
by jgstaal · 2026-02-16
74.5%
#7024: feat(ui/cron): add silent job indicator and no-runs hints
by sergi039 · 2026-02-02
74.2%
#19998: macOS: harden cron editor updates and compatibility
by tobiasbischoff · 2026-02-18
74.2%
#21485: feat(cron): add direct-text flag to deliver text message directly [...
by bydsky · 2026-02-20
74.2%