Skip to content

Fix parser collapsed approval status - #79

Merged
TraderSamwise merged 1 commit into
masterfrom
test/chat-parser-live-corpus-next
Jun 6, 2026
Merged

Fix parser collapsed approval status#79
TraderSamwise merged 1 commit into
masterfrom
test/chat-parser-live-corpus-next

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • classify collapsed Claude approval/terminal-notifier captures as status instead of assistant responses
  • treat bare activity-progress rows as status for malformed live-pane snapshots
  • add a minimized regression from historical live output

Verification

  • vitest run src/agent-output-parser.test.ts
  • tsc --noEmit
  • eslint src/ --max-warnings=0
  • yarn build
  • vitest run
  • historical status-leak rescan against built parser

Summary by CodeRabbit

  • Bug Fixes

    • Enhanced detection of approval prompts and activity-progress indicators
    • Improved classification of command-related status information and runtime markers
    • Refined heuristics for more accurate output categorization
  • Tests

    • Added test coverage validating correct parsing and classification of approval prompts

@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 6, 2026 11:22am

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f4f49075-97bc-40b9-8b11-4bfeb5e94842

📥 Commits

Reviewing files that changed from the base of the PR and between d209e5f and e0f3ccb.

📒 Files selected for processing (2)
  • src/agent-output-parser.test.ts
  • src/agent-output-parser.ts

📝 Walkthrough

Walkthrough

Parser logic for classifying agent-output lines as status vs. other block types is refined. Status-line detection now recognizes additional marker variants and activity-progress text. Runtime-noise classification extends to detect approval-prompt patterns. A test verifies collapsed Claude approval prompts are parsed as single status blocks.

Changes

Approval Prompt & Activity-Progress Status Detection

Layer / File(s) Summary
Status-line marker detection broadening
src/agent-output-parser.ts
isStatusLine adds explicit "⏺" bare-marker and "⏺ … Bash command" pattern detection, and incorporates looksLikeActivityProgressText as a status-line trigger.
Runtime-noise classification refinement
src/agent-output-parser.ts
looksLikeRuntimeNoiseText now filters lines through a trimmed pipeline and uses combined joined content to detect terminal-notifier.*Running noise and extended "terminal-notifier + Bash command / requires approval / proceed" composite patterns.
Collapsed approval prompt parsing test
src/agent-output-parser.test.ts
Regression test asserts that a collapsed Claude approval prompt (Brewing… block with approval question and Yes/No options) parses as a single status block, not chat content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • TraderSamwise/aimux#71: Updates to parseAgentOutput's status-line detection for additional marker variants and progress-text classification directly overlap with expanded status-line heuristics for tool/action rows.
  • TraderSamwise/aimux#78: Updates to normalizeTranscriptBlocks runtime-noise detection for expanded terminal-notifier and approval-prompt patterns align with classifying malformed runtime noise as status blocks.
  • TraderSamwise/aimux#57: Both PRs refine parseAgentOutput heuristics for classifying transcript lines into status/response blocks and extend test coverage with parser-regression cases.

Poem

🐰 A rabbit's delight in parsing so tight,
Approval and progress now shine oh so bright!
Status lines glow with ⏺ markers dear,
Bash commands heard, no more interfere—
The parser now knows what the AI does cheer! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix parser collapsed approval status' directly matches the main objective: classifying collapsed Claude approval/terminal-notifier captures as status entries instead of assistant responses.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/chat-parser-live-corpus-next

Comment @coderabbitai help to get the list of available commands and usage tips.

@TraderSamwise
TraderSamwise merged commit eb3b5cd into master Jun 6, 2026
3 checks passed
@TraderSamwise
TraderSamwise deleted the test/chat-parser-live-corpus-next branch June 6, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant