From 92b792b3f034cf8a01ee48d3290773402189a165 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 9 Jan 2026 15:05:47 +0100 Subject: [PATCH] fix: land #569 (thanks @bjesuiter) --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 1 + scripts/ci-sanitize-output.mjs | 37 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 scripts/ci-sanitize-output.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1922b98e5..c3057a34b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: command: pnpm lint - runtime: node task: test - command: pnpm test + command: node scripts/ci-sanitize-output.mjs pnpm test - runtime: node task: build command: pnpm build diff --git a/CHANGELOG.md b/CHANGELOG.md index 46037f224..55eef4a32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,7 @@ - WhatsApp: group `/model list` output by provider for scannability. (#456) - thanks @mcinteerj - Hooks: allow per-hook model overrides for webhook/Gmail runs (e.g. GPT 5 Mini). - Control UI: logs tab opens at the newest entries (bottom). +- Control UI: default to relative paths for control UI assets. (#569) — thanks @bjesuiter - Control UI: add Docs link, remove chat composer divider, and add New session button. - Control UI: link sessions list to chat view. (#471) — thanks @HazAT - Control UI: show/patch per-session reasoning level and render extracted reasoning in chat. diff --git a/scripts/ci-sanitize-output.mjs b/scripts/ci-sanitize-output.mjs new file mode 100644 index 000000000..9c9b12012 --- /dev/null +++ b/scripts/ci-sanitize-output.mjs @@ -0,0 +1,37 @@ +import { spawn } from "node:child_process"; + +function sanitizeBuffer(input) { + const out = Buffer.allocUnsafe(input.length); + for (let i = 0; i < input.length; i++) { + const b = input[i]; + // Keep: tab/newline/carriage return + printable ASCII; replace everything else. + out[i] = b === 9 || b === 10 || b === 13 || (b >= 32 && b <= 126) ? b : 63; + } + return out; +} + +const [command, ...args] = process.argv.slice(2); +if (!command) { + process.stderr.write( + "Usage: node scripts/ci-sanitize-output.mjs [args...]\n", + ); + process.exit(2); +} + +const child = spawn(command, args, { + stdio: ["ignore", "pipe", "pipe"], + shell: process.platform === "win32", +}); + +child.stdout.on("data", (chunk) => { + process.stdout.write(sanitizeBuffer(Buffer.from(chunk))); +}); + +child.stderr.on("data", (chunk) => { + process.stderr.write(sanitizeBuffer(Buffer.from(chunk))); +}); + +child.on("exit", (code, signal) => { + if (signal) process.exit(1); + process.exit(code ?? 1); +});