Repository navigation
fix(tui): honor terminal text truncation - #686
Merged
Merged
Conversation
Co-authored-by: arena-agent <[email protected]>
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by free · Input: 22K · Output: 1K · Cached: 119.2K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Fixes #688. This is not a fix for #356.
Type of change
What does this PR do?
At
text-end,experimental.text.completecan rewrite streamed text before the processor publishes the terminal snapshot. The TUI's prefix guard currently runs first, so a plugin truncatingHello secrettoHelloor""leavesHello secretdisplayed instead of the final text.Accept the first terminal text snapshot before applying the stale-prefix rule. The existing terminal sink still takes priority, and reasoning parts retain their current prefix behavior. No processor or event protocol changes.
How did you verify your code works?
Using Bun 1.3.14 from a neutral directory against the actual checkout files (the checkout's TUI preloads are not installed):
bun test /home/user/silvercode/packages/tui/test/util/part.test.ts --test-name-pattern 'terminal text rewrite accepts prefix or empty text': on the base implementation, 0 pass, 2 fail; with the fix, 2 pass, 0 fail. Both failures retainedHello secretinstead of the terminal text.bun test /home/user/silvercode/packages/tui/test/util/part.test.ts: 45 pass, 0 fail. The suite includes non-terminal and already-terminal controls, reasoning preservation, identity, and time monotonicity.git diff --check: clean.This is reducer-level verification; an interactive TUI or real plugin session was not exercised.
Screenshots / recordings
Not captured; this is an internal reconciliation fix.
Checklist