Skip to content

feat(ink): expand test coverage + fix ToolCallView controlled component#21

Merged
EmersonBraun merged 5 commits intomainfrom
feat/ink-test-expansion
Apr 5, 2026
Merged

feat(ink): expand test coverage + fix ToolCallView controlled component#21
EmersonBraun merged 5 commits intomainfrom
feat/ink-test-expansion

Conversation

@EmersonBraun
Copy link
Copy Markdown
Owner

Summary

Implements #4 — expands @agentskit/ink test coverage from 1 smoke test to 19 tests.

  • Fix: ToolCallView converted to controlled component with expanded prop. Previously all instances toggled simultaneously when pressing t (global useInput bug).
  • ToolCallView tests (6): renders name/status, hides/shows args and result based on expanded, error display, status variants
  • InputBar tests (9): typing appends, backspace trims, enter sends, empty enter noop, whitespace noop, disabled blocks all input
  • Integration test (3): full chat flow (type → send → stream → complete), thinking indicator visibility, empty state rendering

Test plan

  • 19 Ink tests pass (was 1)
  • All 10 test suites across the monorepo pass
  • Full build passes
  • ToolCallView is now a controlled component — no more global keyboard conflicts

BREAKING: Removed internal useInput handler that toggled all instances
simultaneously when pressing 't'. ToolCallView now accepts an optional
`expanded` prop — the parent controls which tool call is expanded.
@EmersonBraun EmersonBraun merged commit 5c8dfa1 into main Apr 5, 2026
1 check passed
@EmersonBraun EmersonBraun deleted the feat/ink-test-expansion branch April 5, 2026 16:45
@EmersonBraun EmersonBraun mentioned this pull request Apr 5, 2026
7 tasks
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.

1 participant