Skip to content

Comments

fix: show inline filter stats based on char savings, not line count#483

Merged
bug-ops merged 9 commits intomainfrom
feat/m26.1/fix-inline-stats-condition
Feb 17, 2026
Merged

fix: show inline filter stats based on char savings, not line count#483
bug-ops merged 9 commits intomainfrom
feat/m26.1/fix-inline-stats-condition

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 17, 2026

Summary

  • Inline filter stats (e.g. [bash] 150 lines -> 1 lines, 99.2% filtered) were never displayed in chat because the gate condition checked filtered_lines < raw_lines
  • Filters that compact line content without removing lines (truncation, field stripping) reduce filtered_chars but keep filtered_lines == raw_lines, so the condition was never true
  • Changed both text-mode and native tool_use paths to use filtered_chars < raw_chars

Test plan

  • Run with output filters enabled, execute a bash command that triggers filtering
  • Verify inline stats line appears in chat after filtered tool output
  • Confirm TUI resources panel still shows aggregate filter metrics

@github-actions github-actions bot added rust core bug Something isn't working size/S labels Feb 17, 2026
The inline filter stats were never shown for bash because the condition
checked filtered_lines < raw_lines. Filters that compact line content
without removing lines (e.g. truncation) reduce chars but not line count.
Switch both text-mode and native tool_use paths to filtered_chars < raw_chars.
@bug-ops bug-ops force-pushed the feat/m26.1/fix-inline-stats-condition branch from 4585d3b to 4a3882b Compare February 17, 2026 18:16
@github-actions github-actions bot added size/XS and removed size/S labels Feb 17, 2026
Add command field to FilterStats and display it in the inline stats
line so users can see which command was filtered.
@github-actions github-actions bot added size/S and removed size/XS labels Feb 17, 2026
…ssage

Inline stats were sent as a separate channel message, which created a
distinct [zeph] block with different styling. Now they are appended to
the tool output so bash blocks render uniformly.
@github-actions github-actions bot added size/M and removed size/S labels Feb 17, 2026
Strips compilation noise (Compiling, Downloading, Checking, Fetching,
etc.) from cargo output, keeping errors, warnings, and the Finished
summary line. Covers all cargo subcommands not already handled by
clippy and test filters.
@github-actions github-actions bot added size/L and removed size/M labels Feb 17, 2026
TUI compact mode truncates long output showing only first N lines.
Inline stats appended at the end were hidden behind the fold. Move
them before the tool output so they are always visible.
Stats line was placed outside format_tool_output, causing TUI to render
it as a separate zeph message instead of part of the bash block. Now
stats are prepended to the body before format_tool_output wraps it.
…cation

Add Loaded/Blocking/Unpacking to noise prefixes for cargo audit output.
For commands like cargo tree with no noise prefixes but many lines,
apply generic head/tail truncation (keep first 10 + last 5 lines).
Route filter_stats through ToolEvent -> AgentEvent -> ChatMessage pipeline
so TUI displays filtering percentage in the expand hint line. Strip ANSI
charset escape sequences (ESC(B). Fix clippy filter to remove cargo noise
when no warnings. Fix cargo_build filter to strip noise regardless of
exit code and truncate long kept output. Remove security pattern
recount that inflated filtered_chars.
@bug-ops bug-ops enabled auto-merge (squash) February 17, 2026 20:58
@bug-ops bug-ops merged commit 6383e73 into main Feb 17, 2026
18 checks passed
@bug-ops bug-ops deleted the feat/m26.1/fix-inline-stats-condition branch February 17, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core rust size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant