From 53d91a319ebb3a38c9e148429758cc76f197dd70 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Sat, 29 Nov 2025 01:04:33 +0000 Subject: [PATCH] fix(app): use pre-parsed props for Codex file edit diffs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ToolCall component had parsedEditEntries, parsedReadEntries, and parsedCommandDetails props defined but never used them. Now prefers these pre-parsed props when available, enabling Codex apply_patch diffs to render correctly in the expanded view. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- packages/app/src/components/message.tsx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/app/src/components/message.tsx b/packages/app/src/components/message.tsx index 3aa80a676..d294bb3d7 100644 --- a/packages/app/src/components/message.tsx +++ b/packages/app/src/components/message.tsx @@ -1286,6 +1286,9 @@ export const ToolCall = memo(function ToolCall({ result, error, status, + parsedEditEntries, + parsedReadEntries, + parsedCommandDetails, }: ToolCallProps) { const [isExpanded, setIsExpanded] = useState(false); @@ -1397,7 +1400,8 @@ export const ToolCall = memo(function ToolCall({ // Render based on type switch (structuredResult.type) { case "command": { - const cmd = extractCommandFromStructured(structuredResult); + // Use pre-parsed command details if available, otherwise extract from structured result + const cmd = parsedCommandDetails ?? extractCommandFromStructured(structuredResult); if (cmd) { // Reuse the command section rendering logic sections.push( @@ -1446,7 +1450,10 @@ export const ToolCall = memo(function ToolCall({ case "file_write": case "file_edit": { - const diffs = extractDiffFromStructured(structuredResult); + // Use pre-parsed entries if available, otherwise extract from structured result + const diffs = parsedEditEntries?.length + ? parsedEditEntries + : extractDiffFromStructured(structuredResult); diffs.forEach((entry, index) => { sections.push( { sections.push(