@devries-cameron20 / t3code Mirror · read-only / commits / 2c33cbdf02
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

fix(web): strip terminal colors from saved notebook output (#39643)

Co-authored-by: Geezy <igor.licko@gloryck.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

TheGuyWithHAT committed Nov 20, 2026 at 11:51 UTC 2c33cbdf026e9bf32fdc5fa8cb84158e90e51c3b
2 files changed +4 -4
apps/web/src/components/files/FilePreviewPanel.test.ts
+2 -2
@@ -302,9 +302,9 @@ Third}`;
302 { output_type: "display_data", data: {} },
303 { data: { "text/html": [""] } },
304 { data: { "text/html": [], "text/plain": "array fallback" } },
305 - { data: { "text/html": "", "text/plain": "string fallback" } },
305 + { data: { "text/html": "", "text/plain": "\u001b[1mstring fallback\u001b[0m" } },
306 { data: { "text/html": " ", "text/plain": "space fallback" } },
307 - { output_type: "stream", text: ["42\n"] },
307 + { output_type: "stream", text: ["\u001b[", "32m42\u001b[0m\n"] },
308 { data: { "text/html": ["<b>Results</b>"], "text/plain": ["Results"] } },
309 ],
310 },
apps/web/src/components/files/extendedDocumentPreview.ts
+2 -2
@@ -485,8 +485,8 @@ export function openNotebook(bytes: ArrayBuffer): OfficeWorkerResult {
485 if (html.trim() && htmlImagesFit(html)) return { kind: "html" as const, text: html };
486 return {
487 kind: "text" as const,
488 - text: notebookText(
489 - output.text ?? data["text/plain"] ?? tracebackLines(output.traceback),
488 + text: terminalOutputPlainText(
489 + notebookText(output.text ?? data["text/plain"] ?? tracebackLines(output.traceback)),
490 ),
491 };
492 })