From 07900facf6a3501d99edc545d5fb4944fa192d66 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Mon, 30 Mar 2026 16:21:08 -0400 Subject: [PATCH] Diffs: skip unused render targets (#57909) Merged via squash. Prepared head SHA: 9972f3029f07a12ff28fda8398de3c22e7c714df Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com> Reviewed-by: @gumadeiras --- CHANGELOG.md | 1 + extensions/diffs/src/config.test.ts | 3 +- extensions/diffs/src/render-target.test.ts | 92 ++++++++ extensions/diffs/src/render.ts | 220 +++++++++++------- .../diffs/src/tool-render-output.test.ts | 99 ++++++++ extensions/diffs/src/tool.ts | 51 +++- extensions/diffs/src/types.ts | 5 +- 7 files changed, 371 insertions(+), 100 deletions(-) create mode 100644 extensions/diffs/src/render-target.test.ts create mode 100644 extensions/diffs/src/tool-render-output.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ec1fbbe638..fe50f59e83f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ Docs: https://docs.openclaw.ai - Flows/tasks: add a minimal SQLite-backed flow registry plus task-to-flow linkage scaffolding, so orchestrated work can start gaining a first-class parent record without changing current task delivery behavior. - Flows/tasks: route one-task ACP and subagent updates through a parent flow owner context, so detached work can emerge back through the intended parent thread/session instead of speaking only as a raw child task. - Matrix/history: add optional room history context for Matrix group triggers via `channels.matrix.historyLimit`, with per-agent watermarks and retry-safe snapshots so failed trigger retries do not drift into newer room messages. (#57022) thanks @chain710. +- Diffs: skip unused viewer-versus-file SSR preload work so `diffs` view-only and file-only runs do less render work while keeping mode outputs aligned. (#57909) thanks @gumadeiras. ### Fixes diff --git a/extensions/diffs/src/config.test.ts b/extensions/diffs/src/config.test.ts index 53b540a0e67..27ab042d97a 100644 --- a/extensions/diffs/src/config.test.ts +++ b/extensions/diffs/src/config.test.ts @@ -287,7 +287,8 @@ describe("renderDiffDocument", () => { }, ); - const loaderSrc = rendered.html.match(/