Skip to content

fix(tui): honor terminal text truncation - #686

Merged
agenteinstinct1-max merged 1 commit into
dev-vibecodedfrom
arena/60474fa3-silvercode
Oct 29, 2026
Merged

agenteinstinct1-max merged 1 commit into
dev-vibecodedfrom
arena/60474fa3-silvercode

Conversation

@agenteinstinct1-max

@agenteinstinct1-max agenteinstinct1-max commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Issue for this PR

Fixes #688. This is not a fix for #356.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

At text-end, experimental.text.complete can rewrite streamed text before the processor publishes the terminal snapshot. The TUI's prefix guard currently runs first, so a plugin truncating Hello secret to Hello or "" leaves Hello secret displayed 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 retained Hello secret instead 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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@kilo-code-bot

kilo-code-bot Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/tui/src/util/part.ts
  • packages/tui/test/util/part.test.ts

Reviewed by free · Input: 22K · Output: 1K · Cached: 119.2K

@agenteinstinct1-max
agenteinstinct1-max merged commit ce4c4f3 into dev-vibecoded Oct 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant