Skip to content

Fix chat parser for live input rows - #57

Merged
TraderSamwise merged 2 commits into
masterfrom
fix/claude-feedback-prompt-parser
Jun 5, 2026
Merged

Fix chat parser for live input rows#57
TraderSamwise merged 2 commits into
masterfrom
fix/claude-feedback-prompt-parser

Conversation

@TraderSamwise

@TraderSamwise TraderSamwise commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep Claude feedback survey input rows out of parsed chat prompts
  • keep divider-framed Codex live input rows out of parsed chat prompts
  • add parser regression coverage for both terminal snapshots

Verification

  • yarn vitest run src/agent-output-parser.test.ts
  • root pre-push verify: yarn typecheck && yarn lint && yarn test

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Improved filtering of agent output to properly exclude tool-specific UI sections (feedback surveys and active input suggestions) from chat prompts, ensuring they appear in status blocks as intended.
  • Tests

    • Added comprehensive unit tests validating correct handling of feedback survey inputs and active input suggestions in agent output parsing.

@vercel

vercel Bot commented Jun 5, 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 5, 2026 2:49pm

@coderabbitai

coderabbitai Bot commented Jun 5, 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: 22370d65-b828-4d20-80fe-afad68b46713

📥 Commits

Reviewing files that changed from the base of the PR and between 050ca90 and 8929bfe.

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

📝 Walkthrough

Walkthrough

The PR improves agent output parsing by teaching the parser to recognize and properly classify tool-specific UI sections. Claude feedback survey prompts and Codex active input suggestions are now excluded from chat prompts and reclassified as status blocks when they follow dividers or appear in survey-containing contexts.

Changes

Agent Output Parser: Tool-specific UI Classification

Layer / File(s) Summary
Parser state tracking and classification logic
src/agent-output-parser.ts
Divider-adjacency state (lastLineWasDivider) is initialized and tracked through the parsing loop. Status-line recognition is extended to include the Claude feedback survey question. The main prompt-handling branch now conditionally converts prompt-marked lines into status blocks when they follow dividers or occur within a survey-containing status block, with consistent state reset.
Test validation for tool-specific UI classification
src/agent-output-parser.test.ts
Two new Vitest cases assert that Claude feedback survey input and Codex active input suggestions are excluded from chat prompts and correctly produce response and status blocks with expected content.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A parser learns to spot the curious guests—
Claude's surveys and Codex's clever tests.
When dividers appear, the prompts transform,
Into status blocks, a logical form.
Now messy transcripts stand clean and true!

🚥 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 chat parser for live input rows' directly addresses the main objective of the PR, which is to modify the chat parser to exclude Claude feedback survey and Codex live input rows from parsed chat prompts.
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 fix/claude-feedback-prompt-parser

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

@TraderSamwise
TraderSamwise merged commit 6c494cb into master Jun 5, 2026
3 checks passed
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