From e3bf57d8a374ace865c51d180b5e871298f19637 Mon Sep 17 00:00:00 2001 From: tianrking <10758833+tianrking@users.noreply.github.com> Date: Thu, 16 Jul 2026 11:05:32 +0800 Subject: [PATCH] fix(status): avoid HTML breaks in action cells --- plugins/codex/scripts/lib/render.mjs | 2 +- tests/runtime.test.mjs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/codex/scripts/lib/render.mjs b/plugins/codex/scripts/lib/render.mjs index 2ec18523..4261644d 100644 --- a/plugins/codex/scripts/lib/render.mjs +++ b/plugins/codex/scripts/lib/render.mjs @@ -116,7 +116,7 @@ function appendActiveJobsTable(lines, jobs) { actions.push(`/codex:cancel ${job.id}`); } lines.push( - `| ${escapeMarkdownCell(job.id)} | ${escapeMarkdownCell(job.kindLabel)} | ${escapeMarkdownCell(job.status)} | ${escapeMarkdownCell(job.phase ?? "")} | ${escapeMarkdownCell(job.elapsed ?? "")} | ${escapeMarkdownCell(job.threadId ?? "")} | ${escapeMarkdownCell(job.summary ?? "")} | ${actions.map((action) => `\`${action}\``).join("
")} |` + `| ${escapeMarkdownCell(job.id)} | ${escapeMarkdownCell(job.kindLabel)} | ${escapeMarkdownCell(job.status)} | ${escapeMarkdownCell(job.phase ?? "")} | ${escapeMarkdownCell(job.elapsed ?? "")} | ${escapeMarkdownCell(job.threadId ?? "")} | ${escapeMarkdownCell(job.summary ?? "")} | ${actions.map((action) => `\`${action}\``).join("; ")} |` ); } } diff --git a/tests/runtime.test.mjs b/tests/runtime.test.mjs index 8f276835..d81238ce 100644 --- a/tests/runtime.test.mjs +++ b/tests/runtime.test.mjs @@ -1145,7 +1145,8 @@ test("status shows phases, hints, and the latest finished job", () => { assert.match(result.stdout, /Active jobs:/); assert.match(result.stdout, /\| Job \| Kind \| Status \| Phase \| Elapsed \| Codex Session ID \| Summary \| Actions \|/); assert.match(result.stdout, /\| review-live \| review \| running \| reviewing \| .* \| thr_1 \| Review working tree diff \|/); - assert.match(result.stdout, /`\/codex:status review-live`
`\/codex:cancel review-live`/); + assert.match(result.stdout, /`\/codex:status review-live`; `\/codex:cancel review-live`/); + assert.doesNotMatch(result.stdout, /
/); assert.match(result.stdout, /Live details:/); assert.match(result.stdout, /Latest finished:/); assert.match(result.stdout, /Progress:/);