fix(mobile): count glob/grep badge from live result rows - #5360
Merged
Conversation
Classify the live empty line 'No files found' and whole-line parenthetical CLI notes in buildResultRowsModel for glob and grep, so the compact badge and the detail sheet count the same rows. Empty output shows no badge and a muted caption instead of a phantom '1 files'.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the glob/grep live-row classification in Files Reviewed (3 files)
Reviewed by grok-4.6 · Input: 163.7K · Output: 15.1K · Cached: 383.6K Review guidance: REVIEW.md from base branch |
eshurakov
approved these changes
Aug 19, 2026
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.
Summary
An empty glob or grep search now shows the "No files found" message and no count badge.
A glob or grep search with results now shows the true count: one badge entry per path or per match.
A trailing status note, such as a truncation notice or an unread-files notice, no longer adds to the count.
buildResultRowsModelnow classifies live command-line output for glob and grep. TheNo files foundline lifts into the caption with zero rows, a whole-line parenthetical note is dropped, and a dropped note that containstruncated(any case) sets the truncation flag. The badge staysrows.length, so the compact badge and the detail sheet count the same live result rows.Files
apps/mobile/src/components/agents/tool-list-model.ts— adds theEMPTY_RESULT_LINEconstant and theSTATUS_NOTE_PATTERNregex; adds theisLiveKind,isEmptyResult, andisStatusNoteclassification; liftsNo files foundinto the caption, drops whole-line parenthetical notes, and flags truncation when a dropped note containstruncated.Tests: 2 test files updated. Generated: none.
Verification
No human steps.
Visual Changes
N filesbadge):No files foundas a muted caption, zero rows):1 files):Reviewer Notes
E2E: bot-e2e — iOS-only runtime verification passed: empty glob, hit glob, empty grep, and hit grep all show the badge and sheet in agreement.