Add a search over the log view - #203
Merged
Merged
Conversation
find <text> keeps only the log lines holding the text and reports how many matched; find on its own and F3/Shift+F3 step through the matches, and clear-filter shows every line again. A log buffer is the newest 256 lines and nothing else, so finding one error meant reading past the other 255. A search never matches a command echo. Both surfaces echo the typed line into the log as Input before the handler runs, so the search's own echo held the query and every search found itself - a query appearing nowhere reported a match. Excluded by type, not by the trailing-echo walk the copy commands use: that would make the count depend on whether anything had been logged since. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
wallstop
commented
Sep 29, 2026
Two review findings, both in the product. EnterCommand re-attaches the tail and asks for a scroll to the end after the handler returns, overwriting the jump a search queued, so the view went to the end and the jump lost the race. A search also matched the line it wrote to say what it found, so a query that was a word in that line reported a hit for a string appearing nowhere, and every repeat added another. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aac68fd. Configure here.
They were already out of the matches, so the numerator held while the denominator grew by one per run: 20 of 240, then 20 of 241. The exclusion now runs before both counters. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

DISCLOSURE: LLM-GENERATED TEXT
Why:
A log buffer is the newest 256 lines and nothing else, so finding one error
meant reading past the other 255. Nothing narrowed the view (#195).
What:
find <text>keeps only the matching lines, jumps to the first, and reports the count;findand F3/Shift+F3 step through the matches,clear-filterrestores.copy-loguses, which made the count depend on whether anything had been logged since.RefreshLogsalready read: one pass, no second read of the buffer.How we know:
EditMode 669/669. PlayMode 654 with the same 5 failures unmodified master produces here, measured by stashing.
Red-green by mutation, twice; the F3 and scroll-jump tests skip on this host with the reason.
Note
Medium Risk
Touches terminal UI refresh, scroll/tail behavior, and log-counting contracts where subtle echo/reply exclusions can skew results; scope is localized and heavily tested but affects a primary developer workflow surface.
Overview
Adds log view search to DxCommandTerminal:
find <text>filters visible lines (case-insensitive substring on displayed text), jumps to the first match, and reports match/total counts; barefindand F3 / Shift+F3 step matches with wrap;clear-filterrestores the full log.Implementation centers on a new
LogFilterapplied duringRefreshLogs(one buffer read, filtered render array) plusTerminalUIscroll queuing so matches scroll into view without fighting tail-follow. Built-infind/clear-filtercommands delegate to the activeTerminalUI.The change extends the log-echo contract: command
Inputechoes never match (by type, not position—unlikecopy-log); the console’s status replies are excluded from both match and denominator viaIgnoreOwnReplyon exact logged text.EnterCommandskips re-attaching the log tail when a find scroll is pending so search navigation isn’t overwritten by scroll-to-end.Docs (README, CHANGELOG, log-echo-contract skill) and EditMode / PlayMode tests cover filter rules, keyboard routing, stable counts, and
EnterCommandordering.Reviewed by Cursor Bugbot for commit 86da0b1. Bugbot is set up for automated code reviews on this repo. Configure here.