Skip to content

fix(mobile): count glob/grep badge from live result rows - #5360

Merged
iscekic merged 2 commits into
mainfrom
glob-count-2958
Aug 19, 2026
Merged

fix(mobile): count glob/grep badge from live result rows#5360
iscekic merged 2 commits into
mainfrom
glob-count-2958

Conversation

@iscekic

@iscekic iscekic commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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.


buildResultRowsModel now classifies live command-line output for glob and grep. The No files found line lifts into the caption with zero rows, a whole-line parenthetical note is dropped, and a dropped note that contains truncated (any case) sets the truncation flag. The badge stays rows.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 the EMPTY_RESULT_LINE constant and the STATUS_NOTE_PATTERN regex; adds the isLiveKind, isEmptyResult, and isStatusNote classification; lifts No files found into the caption, drops whole-line parenthetical notes, and flags truncation when a dropped note contains truncated.

Tests: 2 test files updated. Generated: none.


Verification

  • 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.

No human steps.

Visual Changes

  • Empty glob card (no N files badge):

empty glob card

  • Empty glob sheet (No files found as a muted caption, zero rows):

empty glob sheet

  • Hit glob sheet (one path row, badge 1 files):

hit glob sheet

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.

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'.
@iscekic iscekic self-assigned this Aug 19, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the glob/grep live-row classification in buildResultRowsModel and matching badge tests; empty and parenthetical CLI notes are dropped without inflating counts, with high confidence.

Files Reviewed (3 files)
  • apps/mobile/src/components/agents/tool-list-model.ts
  • apps/mobile/src/components/agents/tool-list-model.test.ts
  • apps/mobile/src/components/agents/tool-card-display.test.ts

Reviewed by grok-4.6 · Input: 163.7K · Output: 15.1K · Cached: 383.6K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the human-ready The PR is ready for human review. label Aug 19, 2026
@iscekic
iscekic merged commit bd8305e into main Aug 19, 2026
18 checks passed
@iscekic
iscekic deleted the glob-count-2958 branch August 19, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants