fix(cli): O(n) truncateMessage and skip truncation when non-TTY#4299
fix(cli): O(n) truncateMessage and skip truncation when non-TTY#4299ANSHSINGH050404 wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 4ba3d8b The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Hi @ANSHSINGH050404, thanks for your interest in contributing! This project requires that pull request authors are vouched, and you are not in the list of vouched users. This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughUpdated CLI spinner message truncation to return unmodified messages in non-TTY environments when no explicit limit is provided. Replaced repeated recalculation with a single-pass scan that preserves ANSI hyperlinks and CSI sequences while enforcing visible-length limits. Added a patch Changesets entry documenting these behavior and performance changes. ✨ 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 |
Closes #3826
Checklist
Summary
Character-by-character truncation was O(n²) and ran in non-TTY CI, hanging large deploys.
Fix
Skip truncation when not a TTY; otherwise truncate in a single pass.
Vouch request: #4290