fix: strip trailing blanks at printAbove consumer (#194)#195
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Review Summary by QodoMove stripTrailing to printAbove consumer for robust blank line removal
WalkthroughsDescription• Move stripTrailing() from producers to consumer boundary • Eliminates trailing blank lines in printAbove output • Defensive fix covers all producers with single change • Simplifies maintenance by centralizing strip logic Diagramflowchart LR
A["Multiple Producers<br/>cron/deferred/background"] -->|"text with trailing newlines"| B["pendingPrintAbove<br/>Consumer Loop"]
B -->|"stripTrailing()<br/>before split"| C["Split into lines"]
C -->|"clean lines"| D["printAbove calls"]
File Changes1. aceclaw-cli/src/main/java/dev/aceclaw/cli/TerminalRepl.java
|
Code Review by Qodo
1. stripTrailing drops trailing spaces
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe TerminalRepl's UI renderer now strips trailing whitespace using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
Response to review feedbackQodo Bug #1:
|
Summary
text.stripTrailing()at thependingPrintAboveconsumer loop beforesplit("\n", -1)Why PR #186 wasn't enough
PR #186 added
stripTrailing()at each producer site, but:split("\n", -1)preserves trailing empty strings from any residual\nprintAbove("")→ visible blank lineThe correct fix is a single defensive strip at the consumer boundary.
Change
One line, covers all producers.
Closes #194
Summary by CodeRabbit