← Back to PRs

#23329: feat: Add Markdown support for cron job payload

by HeXavi8 open 2026-02-22 06:36 View on GitHub →
app: web-ui size: XS
## 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