Back to Signal Feed
CodeTracked since May 20, 2026

Handle legacy string ellipsis in truncateToWidth

This change makes `truncateToWidth` accept legacy string ellipsis arguments in the TypeScript wrapper (while keeping enum/null values on the existing native path), so calls like `truncateToWidth(text, width, "")` from older/custom TUI renderers no longer hit the strict native enum conversion that could crash rendering.

truncateToWidthTUI rendererTypeScript wrappernative addon

What Happened

  • This change makes `truncateToWidth` accept legacy string ellipsis arguments in the TypeScript wrapper (while keeping enum/null values on the existing native path), so calls like `truncateToWidth(text, width, "")` from older/custom TUI renderers no longer hit the strict native enum conversion that could crash rendering.
  • This change makes `truncateToWidth` accept legacy string ellipsis arguments in the TypeScript wrapper (while keeping enum/null values on the existing native path), so calls like `truncateToWidth(text, width, "")` from older/custom TUI renderers no longer hit the strict native enum conversion that could crash rendering.
  • 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 in the `truncateToWidth` TypeScript wrapper so string ellipsis values are processed safely before native dispatch, preserving backward compatibility for legacy/custom call sites and preventing the specific N-API enum-conversion crash path.

Why Track This

Why It Matters

Legacy terminal UI apps and integrators using older `truncateToWidth` call patterns can keep rendering instead of crashing when width truncation is invoked with an empty-string ellipsis, reducing user-facing rendering failures in interactive sessions. The fix works by short-circuiting legacy string ellipsis inputs into wrapper-side handling while continuing to route enum/null inputs to the native path; next watch point is whether similar legacy value-shape mismatches exist in nearby native-bound TUI APIs that still assume strict enum types.

Impact

Legacy terminal UI apps and integrators using older `truncateToWidth` call patterns can keep rendering instead of crashing when width truncation is invoked with an empty-string ellipsis, reducing user-facing rendering failures in interactive sessions. The fix works by short-circuiting legacy string ellipsis inputs into wrapper-side handling while continuing to route enum/null inputs to the native path; next watch point is whether similar legacy value-shape mismatches exist in nearby native-bound TUI APIs that still assume strict enum types.

What To Watch Next

  • Watch whether truncateToWidth becomes a repeated pattern.
  • Track follow-up changes around AI Integration in IDEs.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: legacy_string_ellipsis_path_in_other_tui_api_calls, native_path_parity_between_enum_and_string_inputs.
Open Topic TimelineOpen Technical EventOpen Original Sourcelegacy_string_ellipsis_path_in_other_tui_api_calls / native_path_parity_between_enum_and_string_inputs

Supporting Evidence