inspector icon indicating copy to clipboard operation
inspector copied to clipboard

clients/tui: bump ink to v8.0.0 (stray control characters from server text not stripped on ^6.0.0)

Open holistis opened this issue 2 weeks ago • 3 comments

What

Bumps ink in clients/tui from ^6.0.0 to ^8.0.0 (and ink-scroll-view to ^0.4.0, plus the root react peer requirement to ^19.3.0, which Ink 8 needs).

Why

Ink 8.0.0 strips bare C0 control characters (e.g. BEL, BS, VT) from text passed to <Text> that aren't part of a recognized escape sequence; the ^6.0.0 range installed here (currently resolving to 6.8.0) does not. PendingRequestModal.tsx renders server-supplied elicitation text through <Text>, so a connected MCP server could currently get a stray control character (bell sound, backspace, vertical tab) into the TUI's output. Both versions already filter the more serious cursor-movement/screen-clearing escape sequences identically, so this is a minor cleanup rather than a serious issue, but there's no reason to stay two major versions behind now that the newer one is a drop-in dependency bump here.

Testing

  • npm install resolves cleanly in clients/tui (no peer conflicts).
  • Full existing test suite passes before and after (731/731).
  • typecheck, lint --max-warnings 0, and tsdown build all pass.
  • One existing test asserted a React version string; updated the regex to match the new version instead of changing the assertion's intent.

holistis avatar Nov 14 '26 19:11 holistis

Triage: Priority Low (total 3)

  • Severity 2 — stray bare C0 control characters from server text reach the TUI; cursor/screen escapes are already filtered
  • Urgency 1 — no time pressure
  • Bonuses: none

Note for the reviewer: the proposal also raises the root react range to ^19.3.0, which touches the ink externalization exemption in AGENTS.md (safe only while root react stays open to the whole major).

Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

cliffhall avatar Nov 18 '26 04:11 cliffhall

On the react range in the review note: Ink 8 declares react >=19.3.0 as a peer dependency (npm view [email protected] peerDependencies), which ^19.0.0 does not guarantee, so the root range has to start at 19.3.0 and the ^19.0.0 in the ink exemption of AGENTS.md would read ^19.3.0. I am glad for that one-line edit to ride along. What I ran is in the description: npm install in clients/tui resolves without peer conflicts and the existing suite passes before and after (731 of 731).

holistis avatar Nov 18 '26 08:11 holistis

Shipped in #3015 (merged to v2/main).

cliffhall avatar Nov 18 '26 19:11 cliffhall