feat: implement tui command for workflow [CDMD-4526]#1900
feat: implement tui command for workflow [CDMD-4526]#1900amirabbas-gh wants to merge 9 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
commit: |
936b648 to
a20d519
Compare
9c8a7fc to
01dde24
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements a Terminal User Interface (TUI) command for interactive workflow management. The changes add console log collection capabilities throughout the execution pipeline, introduce a new target_path field to workflow runs, and create a comprehensive TUI with terminal emulation support for monitoring and triggering workflow tasks.
Key changes:
- Added
target_pathfield toWorkflowRunmodel for tracking execution location - Implemented console log collection mechanism across all JavaScript execution engines
- Created new TUI command with real-time workflow monitoring and interactive task triggering
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/models/src/workflow.rs |
Added optional target_path field to WorkflowRun struct |
crates/core/src/engine.rs |
Added target_path parameter to run_workflow, enhanced error logging to task logs |
crates/codemod-sandbox/src/sandbox/engine/*.rs |
Added console_log_collector callback for capturing JavaScript console output |
crates/codemod-sandbox/Cargo.toml |
Added gag dependency for stdout capture |
crates/cli/src/commands/workflow/tui.rs |
New 2500+ line TUI implementation with terminal emulation |
crates/cli/Cargo.toml |
Added TUI dependencies (ratatui, crossterm, portable-pty, vt100) |
crates/core/tests/engine_tests.rs |
Updated all test calls to match new run_workflow signature |
| Various test files | Added console_log_collector: None to execution options |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sahilmob
left a comment
There was a problem hiding this comment.
LGTM in general; I would prefer we split crates/cli/src/commands/workflow/tui.rs into multiple files. Also, the places where unwrap is used might need some attention.
| let pty_system = NativePtySystem::default(); | ||
|
|
||
| // Get terminal size from app state | ||
| let (rows, cols) = app.terminal_size; |
There was a problem hiding this comment.
Dose this reacts to terminal window size changes
|
|
||
| // Reset the terminal parser for fresh output | ||
| { | ||
| let mut parser = app.terminal_parser.write().unwrap(); |
|
|
||
| // Mark PTY as running | ||
| { | ||
| let mut running = app.pty_running.lock().unwrap(); |
571c67f to
a8b7d06
Compare
📚 Description
This PR introduces a new interactive Terminal User Interface (TUI) for managing workflow runs in the codemod CLI. The TUI provides a streamlined, step-by-step interface for viewing, monitoring, and managing workflow executions directly from the terminal.
Key Features:
Technical Highlights:
ratatuifor the TUI framework andcrosstermfor terminal controlportable-ptyfor full terminal emulation, enabling proper interactive command execution🧪 Test Plan
codemod workflow tui --refresh-interval 5