Repository navigation
fix(ui): only ellipsis subagent tool results that were truncated - #1423
Conversation
The subagent transcript sliced every tool result to 100 characters and appended "..." unconditionally, so a short result like "OK" rendered as "OK..." and implied output that was never cut. Append the ellipsis only when the content is actually past the limit, matching the guarded pattern already used in tools/git/git-commit.tsx. Regression tests cover both sides: a short result renders without the ellipsis, and a result past the limit keeps it.
nc-review: comments — 1 important@insuffer — a few things worth a look, none blocking. Correct, minimal fix for issue #1408: the subagent-view tool line now mirrors the guarded 🟠 important · This is a user-facing bug fix ( 🔴 blocking · 🟠 a reviewer would ask for a change · ⚪ optional Automated code review — correctness, security, design, tests, plus duplicates and scope. A human still decides; this is not a substitute for review and is not exhaustive. The required status checks separately cover lint, formatting, types, unused dependencies, the test suite and the build. This bot never merges. Maintainers can rerun with |
|
Thanks for the automated review — I've added |
|
Thanks for the PR @insuffer |
What
The subagent transcript view (
source/components/subagent-view.tsx) slicedevery tool result to 100 characters and appended
...unconditionally:A short result like
OKtherefore rendered asOK..., implying outputwas cut off when nothing was. The ellipsis belongs only on results that
were actually truncated.
Change
One guard in the same shape as the pattern already used in
source/tools/git/git-commit.tsx:Plus two regression tests in
source/components/subagent-view.spec.tsx:a short result renders without the ellipsis, and a result past the limit
keeps it.
Verification
The new short-result test fails on the unpatched component (verified by
reverting the one-line change and re-running), so it pins the fix rather
than passing either way.
Repo gates on this commit:
Full-suite comparison (
pnpm test:ava): the suite fails in the localenvironment for reasons unrelated to this change (the cli-integration
specs need a built
dist/, plus an Ink ESM interop issue on Node 24).Baseline
mainand this branch produce an identical failure signature(128 tests, 20 hooks, 10 uncaught exceptions, 14 skipped), and no
subagent-view test is among the failures.
Closes #1408