Skip to content

feat: inspect the end of long tool output - #67

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-66-tool-output-end
Nov 13, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-66-tool-output-end

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Long tool output now offers a bounded end preview, so final errors and completion messages can be inspected without expanding the entire result. The card shows preview character counts, follows appended output at the end, remembers that choice while scrolling, and retains full expansion and exact copying.

Part of #2.
Closes #66.

Verification

  • bun install --frozen-lockfile passed.
  • mise exec -- bun run lint passed.
  • mise exec -- bun run typecheck passed.
  • mise exec -- bun run test:unit passed, 90 tests.
  • mise exec -- bun run test:integration passed, 83 tests.
  • mise run build passed, including the production bundle.
  • git diff --check passed.

The shell defaults to Node 26, which fails existing settings tests because its global localStorage is unavailable. The pinned mise Node 22 toolchain passes the complete suite.

Proof

$ mise exec -- bun run test:unit
 Test Files  10 passed (10)
      Tests  90 passed (90)

$ mise exec -- bun run test:integration
 Test Files  13 passed (13)
      Tests  83 passed (83)

$ mise exec -- bun run test:e2e
 Error: Library not loaded: @rpath/Electron Framework.framework/Electron Framework
 Error: Electron failed to install correctly
 Test Files  7 failed (7)
      Tests  55 skipped (55)

Local app launch and capture are blocked by the incomplete Electron runtime installation. Hosted macOS Playwright capture succeeded on final commit 03dbf17; all 55 Electron tests passed across seven suites.

$ mise run test:e2e  # hosted macOS
 tests/e2e/tool-preview.test.ts (3 tests) passed
 inspects the end of failed output with bounded text, exact copying and keyboard controls passed
 Test Files  7 passed (7)
      Tests  55 passed (55)

The desktop capture shows the final build error with the last 2,000 of 4,717 characters visible and the beginning/full-output controls. The narrow capture shows the same result at the native 900 by 600 minimum window size. The desktop window is 1280 by 677, clamped to the hosted display. Both PNGs were downloaded and visually reviewed, and are saved locally under .tmp/proof/ without being committed.

End of failed tool output at desktop size

End of failed tool output at the minimum window size

Inline screenshots were uploaded through native Firefox after browser automation host discovery failed.

New component coverage

  • inspects a failed output ending, expands the full result and copies it exactly
  • follows appended output in the end preview and keeps that choice through row recycling
  • shows %i output characters in full without preview controls at 1,999 and 2,000 characters
  • keeps long input at the beginning when output uses an end preview

The new Electron test is inspects the end of failed output with bounded text, exact copying and keyboard controls. It captures desktop and native minimum-window screenshots under .tmp/proof/ and the uploaded test-results/tool-preview/ artefact directory.

Input previews retain their existing controls. End preview selection survives row recycling within a transcript; reopening a transcript resets it. A single fully expanded result still renders as one row. Other tool-card work remains under #2.

Add bounded beginning and end previews with character counts, retaining
full expansion and exact copying. Follow streamed output at the end and
preserve that choice while transcript rows are recycled.

Co-authored-by: OpenAI Codex <[email protected]>
@johnnyhuy
johnnyhuy marked this pull request as ready for review November 13, 2026 23:40
@johnnyhuy
johnnyhuy merged commit 072f7a2 into main Nov 13, 2026
15 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-66-tool-output-end branch November 13, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inspect the end of long tool output without expanding it all

1 participant