From c2ee414a2d80ea9647ff8ddbad959969f9ab03d6 Mon Sep 17 00:00:00 2001 From: Thomas Kpenou Date: Thu, 25 Jun 2026 06:50:36 -0400 Subject: [PATCH] feat(logs): search in script output Add a find bar to the log panel: a search icon in the "Output" header opens an input that highlights all matches in the rendered output, with a match counter and previous/next navigation (Enter / Shift+Enter, Esc to close). Matching is done over the output element's text nodes and surfaced as DOM Ranges highlighted via the CSS Custom Highlight API (logSearch.js), so the live-appending terminal output and inline images are never mutated. The search refreshes as new output streams in while the bar is open, and highlight calls are guarded so browsers without the API degrade gracefully. Lives in the shared log_panel, so it's available in both the execution view and the history details. Tests: logSearch match-finding (case-insensitive, multi-node, non-overlapping) and LogPanel search wiring (count/label, next/prev wrap, open/close). Co-Authored-By: Claude Opus 4.8 --- README.md | 8 + web-src/src/common/components/log_panel.vue | 196 +++++++++++++++++- .../common/components/terminal/logSearch.js | 87 ++++++++ .../tests/unit/common/LogPanel_search_test.js | 87 ++++++++ .../unit/common/terminal/logSearch_test.js | 77 +++++++ 5 files changed, 454 insertions(+), 1 deletion(-) create mode 100644 web-src/src/common/components/terminal/logSearch.js create mode 100644 web-src/tests/unit/common/LogPanel_search_test.js create mode 100644 web-src/tests/unit/common/terminal/logSearch_test.js diff --git a/README.md b/README.md index 48790d16..d864b13d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ ## What's new in this fork +### 2026-06-25 — Search in script output + +The output panel now has a find bar (search icon in the "Output" header): type to +highlight all matches in the log, with a match counter and previous/next +navigation (Enter / Shift+Enter, Esc to close). Matches are highlighted via the +CSS Custom Highlight API, so the live-appending terminal and inline images are +left untouched. Available wherever logs are shown (execution view and history). + ### 2026-06-24 — Dependency security scan in CI A `Security scan` job audits dependencies on every push/PR: `pip-audit` for the diff --git a/web-src/src/common/components/log_panel.vue b/web-src/src/common/components/log_panel.vue index 4fd72693..fe8b5b3d 100644 --- a/web-src/src/common/components/log_panel.vue +++ b/web-src/src/common/components/log_panel.vue @@ -3,6 +3,29 @@
terminal Output + +
applyHighlights([], 0)).not.toThrow(); + expect(() => clearHighlights()).not.toThrow(); + }); +});