You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unify background hook output into single line (#908)
* feat(output): unify background hook output into single line
Combine contiguous post-switch and post-start hooks into a single
output line when both are present (common in `wt switch --create`).
Old format (2 lines):
Running post-switch hooks @ ~/repo.feature: user:foo
Running post-start hooks @ ~/repo.feature: project:bar
New format (1 line):
Running post-switch: user:foo; post-start: project:bar @ ~/repo.feature
Changes:
- Rename spawn_hook_commands_background → spawn_background_hooks
- Add prepare_background_hooks() to collect hooks before spawning
- Add group_commands_by_hook_type() to group commands by type
- Update handle_switch.rs to batch hooks from both types
- Remove unused spawn_post_start_commands/spawn_post_switch_commands
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: address review feedback
- Update doc comments in global.rs to use new API functions
- Update demo snapshot to use new output format
- Make prepare_background_hooks pub(crate) (internal only)
Co-Authored-By: Claude <noreply@anthropic.com>
* test: add coverage for multiple unnamed hooks of same type
Add test_user_and_project_unnamed_post_start to exercise the unnamed
index tracking code when both user and project have unnamed hooks for
the same hook type (post-start).
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments