Skip to content

fix: handle resolveToolResults event in tree builder#746

Closed
FL4TLiN3 wants to merge 3 commits intomainfrom
fix/resolve-tool-results-handling
Closed

fix: handle resolveToolResults event in tree builder#746
FL4TLiN3 wants to merge 3 commits intomainfrom
fix/resolve-tool-results-handling

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

  • Add explicit handling for resolveToolResults event type in buildRunTreeFromEvents
  • This event fires after MCP tool execution and after resumeFromStop when all tool results are resolved
  • Without this handler, these events were silently ignored in the switch statement
  • Add test case covering both MCP tool and delegation resume scenarios

Test plan

  • bun test packages/tui-components/src/log-viewer/build-run-tree.test.ts — 14 tests pass
  • Verified with real job data containing resolveToolResults events

🤖 Generated with Claude Code

FL4TLiN3 and others added 3 commits March 12, 2026 06:28
Add a full-featured log viewer for `perstack log` with:
- Delegation tree builder that merges resume runs into logical nodes
- Job list, run list, event list, and checkpoint screens
- Drill-down navigation with keyboard shortcuts
- Bottom panel component for info display
- flattenTreeAll utility for unpruned tree traversal
- Comprehensive tests for tree building including failed delegates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add @perstack/log dependency to tui-components
- Add inputTokens, outputTokens, cachedInputTokens to DelegationTreeNode type
- Fix implicit any types in app.tsx
- Export log-viewer from package entry point to satisfy knip
- Fix lint: prefix unused parameter with underscore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add explicit handling for the resolveToolResults event type in
buildRunTreeFromEvents. This event fires after MCP tool execution
and after resumeFromStop when all tool results are resolved. Without
this handler, these events were silently ignored in the switch statement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 force-pushed the fix/resolve-tool-results-handling branch from 0a1ea70 to fbac84b Compare March 11, 2026 21:33
Base automatically changed from feat/log-viewer-tui to main March 11, 2026 21:34
@FL4TLiN3 FL4TLiN3 closed this Mar 11, 2026
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