feat: add hook execution progress display with spinners#217
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire the HookProgressRenderer into execute_parallel(), execute_dag_parallel(), and execute_dag_sequential() so all hook execution paths now display real-time progress spinners and rolling output. For parallel execution, each job thread spawns a reader thread that drains the mpsc channel and updates the renderer via Arc<Mutex<>> (or &Mutex<> for scoped threads in the DAG executor). The renderer is shared safely across threads with proper locking. Also removes the now-unused run_shell_command() wrapper since all call sites use run_shell_command_with_callback() directly, and includes the executor.rs change to pass output_config through to the YAML executor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When stderr is not a terminal (CI, pipes, redirected output), the indicatif spinners and ANSI cursor manipulation produce garbled output. This adds a PlainHookRenderer that prints simple text lines to stderr, and a HookRenderer enum that auto-detects the environment using std::io::IsTerminal to dispatch to the appropriate renderer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace raw output.step()/output.raw() calls in execute_legacy() with HookRenderer, giving legacy script hooks the same spinner and progress display as YAML hooks. The old execute_hook_file() is replaced by execute_hook_file_with_renderer() which reads stdout/stderr in separate threads and feeds captured lines to the renderer after the process exits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace dark-grey background header with a dark-grey framed box using box-drawing characters, with bold+white hook name emphasis - Add summary section after hook execution with per-job results, check/cross markers, and durations formatted to scale (ms/s/min) - Fix shell wrapper capturing stderr (2>&1) which disabled colors for wrapped commands; now only stdout is captured for __DAFT_CD__ markers - Extract format_header_lines() and format_summary_lines() as shared helpers to eliminate duplication across renderer variants - Add extra blank line before summary separator for visual spacing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pper - Add DAFT_TESTING env var check to suppress hook header/summary output during integration tests (set in xtask test runner) - Add cfg!(test) check to suppress output during unit tests - Respect CLICOLOR_FORCE env var in colors_enabled() / colors_enabled_stderr() following the standard CLICOLOR convention - Set CLICOLOR_FORCE=1 in both bash/zsh and fish shell wrappers so all commands produce colored output even though stdout is captured by $() - Add missing chevron (❯) to finished job line in HookProgressRenderer - Change chevron color from grey to orange Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use insert_after to place the "No output" bar after the finished spinner instead of mp.println which always inserts above the drawing area. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move "Created worktree" and "Prepared worktree" result messages before post-create hooks so they appear in the correct chronological order. Print result() to stderr when running through the shell wrapper so it appears in real-time instead of after the command finishes. Add "Removed worktree" result messages to prune, flow-eject, and branch-delete commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 17, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
daft.hooks.output.*settingsCLICOLOR_FORCE=1, suppress hook output in tests, and print result messages to stderr when running through the wrapper for correct orderingFixes #203
Test plan
mise run testto verify all unit and integration tests passgwtcbm <branch>and verify "Created worktree" appears before hook outputgpruneand verify "Removed worktree" appears before post-remove hooksgwtcbm,gwtco,gwtfetch)git worktree-checkout-branch test 2>&1 | cat🤖 Generated with Claude Code