Back to Signal Feed
CodeTracked since May 20, 2026

Handle legacy string ellipsis in truncateToWidth to prevent render crashes

The PR changes `truncateToWidth` so legacy and custom TUI calls that pass string ellipsis values are handled in the TypeScript wrapper instead of being sent directly to the native addon, preventing the napi enum-conversion failure that could crash the render loop.

truncateToWidthEllipsisTypeScript wrappernative addon

What Happened

  • The PR changes `truncateToWidth` so legacy and custom TUI calls that pass string ellipsis values are handled in the TypeScript wrapper instead of being sent directly to the native addon, preventing the napi enum-conversion failure that could crash the render loop.
  • The PR changes `truncateToWidth` so legacy and custom TUI calls that pass string ellipsis values are handled in the TypeScript wrapper instead of being sent directly to the native addon, preventing the napi enum-conversion failure that could crash the render loop.
  • 1 evidence item attached for review.

What is Different

Before

Scattered source updates, isolated context, and manual follow-up across multiple feeds.

Now

Added compatibility handling for string ellipsis arguments in `truncateToWidth`, preserving existing enum/null behavior in the native layer so older renderer calls remain functional without causing type-conversion crashes.

Why Track This

Why It Matters

Developers using custom or older TUI renderers that pass string ellipsis values to `truncateToWidth` should see rendering no longer fail mid-loop, so UI text truncation remains stable during normal runs instead of dropping into crash states. The change routes strings through the TypeScript layer before native invocation while leaving enum/null inputs on the old native path, and teams should monitor whether additional legacy argument shapes or wrapper-to-native API changes reintroduce conversion failures.

Impact

Developers using custom or older TUI renderers that pass string ellipsis values to `truncateToWidth` should see rendering no longer fail mid-loop, so UI text truncation remains stable during normal runs instead of dropping into crash states. The change routes strings through the TypeScript layer before native invocation while leaving enum/null inputs on the old native path, and teams should monitor whether additional legacy argument shapes or wrapper-to-native API changes reintroduce conversion failures.

What To Watch Next

  • Watch whether truncateToWidth becomes a repeated pattern.
  • Track follow-up changes around AI IDE.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: legacy_string_ellipsis_compatibility, napi_conversion_edge_cases.
Open Topic TimelineOpen Technical EventOpen Original Sourcelegacy_string_ellipsis_compatibility / napi_conversion_edge_cases / wrapper_native_interface_drift

Supporting Evidence