feat: display batch node progress as items complete#20
Conversation
…nput parameter Introduces two new features: 1. A `mode: "reduce"` option for batch processing, allowing sequential chained operations where each iteration's output becomes the next iteration's input, addressing the need for fold/accumulate patterns. 2. A `files` parameter for the shell node, enabling safe data passing by writing template data to temporary files, thus avoiding shell escaping issues with special characters.
Add real-time progress updates for batch node execution showing item completion status as they happen: convert-sections... 1/8 ✓ convert-sections... 2/8 ✓ (updates in place) convert-sections... 8/8 ✓ 24.9s Changes: - Add batch_progress event to OutputController with carriage return line updates - Batch node calls progress callback after each item in both sequential and parallel modes - InstrumentedNodeWrapper detects batch nodes via batch_metadata and passes is_batch flag to completion callback - Add comprehensive tests for batch progress callbacks Fixes #17
Resolve conflict in template_validator.py - use more specific type annotation from main branch (dict[str, dict[str, Any]] instead of dict[str, Any])
Code Review - PR #20: Batch Node Progress DisplayThis PR adds real-time progress updates for batch processing. I've reviewed the implementation and have the following feedback organized by priority. ✅ Critical — must fix before mergeNone! The implementation is solid with no critical issues found.
|
Response to Code ReviewThanks for the thorough review! I've carefully analyzed each point. Here's my assessment:
|
| Warning | Assessment |
|---|---|
| #1 Missing routing | ✅ Already implemented |
| #2 Type coercion | |
| #3 JSON security | |
| #4 Non-interactive | ✅ Already handled |
The PR is ready to merge. It closes #17 (Display batch node progress as items complete).
Summary
Add real-time progress updates for batch node execution, showing item completion status as they happen instead of blocking silently until all items complete.
Before:
After:
Changes
_handle_batch_progress()method using carriage return for in-place line updates; extend_handle_node_complete()to handle batch nodes (only shows timing, not duplicate checkmark)_exec_sequential()and_collect_parallel_results()batch_metadatain output and passis_batch,batch_total,batch_success_countto completion callbackTestBatchProgressCallbacks(6 tests) andTestBatchProgressDisplay(8 tests)Testing
All 3677 tests pass:
make testFixes #17