Repository navigation
Remove --no-background, promote --no-progressive, carry foreground through - #1381
Conversation
Remove the deprecated `--no-background` flag from `remove`, `hook post-start`, and `hook post-switch` commands. The replacement `--foreground` has been available since the deprecation was introduced. Promote `--no-progressive` from a hidden flag to a proper visible flag on `list`, shown inline under `--progressive` help text (hidden from top-level help, documented in description). Canonicalize its dispatch to use `flag_pair()`. Co-Authored-By: Claude <[email protected]>
# Conflicts: # src/cli/mod.rs
…sage Instead of negating `foreground` to `background` at the call site and carrying the negated bool through, pass `foreground` directly through the entire call chain — from CLI dispatch through handle_remove_output to print_message. Refactor print_message to use success_message()/progress_message() helpers instead of manually constructing colored output. Add FormattedMessage::append() to support integration symbols that need their native styling outside the message's color span. Co-Authored-By: Claude <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
CI failed — 11 shell wrapper / PTY snapshot tests need updating for the ◎ / ✓ color span change (symbol now outside the cyan/green span via progress_message()/success_message()). These tests are behind the shell-integration-tests feature flag so they weren't caught locally.
Failing tests (all snapshot mismatches)
test_approval_prompt_remove_declinetest_readme_example_hooks_pre_mergetest_readme_example_removetest_wrapper_merge_with_mixed_stdout_stderr(cases 1, 2)test_wrapper_merge_with_pre_merge_success(cases 1, 2)test_wrapper_remove(cases 1–4)
Fix: cargo test --test integration --features shell-integration-tests and accept the snapshot updates, or run cargo insta test --accept --features shell-integration-tests.
CI failed — shell wrapper snapshots need updating for color span change
worktrunk-bot
left a comment
There was a problem hiding this comment.
CI failed — 11 shell wrapper / PTY snapshot tests need updating for the ◎ / ✓ color span change (symbol now outside the cyan/green span via progress_message()/success_message()). These tests are behind the shell-integration-tests feature flag so they weren't caught locally.
Failing tests (all snapshot mismatches)
test_approval_prompt_remove_declinetest_readme_example_hooks_pre_mergetest_readme_example_removetest_wrapper_merge_with_mixed_stdout_stderr(cases 1, 2)test_wrapper_merge_with_pre_merge_success(cases 1, 2)test_wrapper_remove(cases 1–4)
Fix: cargo test --test integration --features shell-integration-tests and accept the snapshot updates, or run cargo insta test --accept --features shell-integration-tests.
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
worktrunk-bot
left a comment
There was a problem hiding this comment.
Clean PR — the polarity flip from background to foreground is correct at every call site, and the print_message refactor to use success_message()/progress_message() is a nice simplification.
Verified call sites (5 callers)
merge.rs:false(background removal) — wastrueforbackground, correctly flippedselect/mod.rs:true(foreground removal) — wasfalseforbackground, correctly flippedstep_commands.rs: passesforegrounddirectly — was!foreground, correctly simplifiedmain.rsremove command: passesforegrounddirectly — was!is_foreground_mode(foreground, no_background)→background, correctly simplifiedhandle_removed_worktree_output: both the detached HEAD path and the main branch path correctly swap theirif/elsearms
Two minor observations (not blocking):
-
flag_pairreuse for progressive — nice cleanup. The inline match was identical toflag_pair's logic. -
Snapshot churn — the
◎/✓symbol now renders outside the color span (viaprogress_message()/success_message()helpers), which is consistent with how other messages like hook progress already render. The ~40 snapshot updates are all this same mechanical change.
LGTM.
Addresses two behavioral issues observed in the past hour: 1. Bot posted identical CI failure comments twice on PR #1381 during the dismiss-and-recomment flow (reviews 7 seconds apart). Adds a duplicate check before posting CI failure comments, similar to the existing guard for initial reviews. 2. Bot asserted pre-commit.ci failure was "transient infrastructure" on PR #1381 without checking main branch CI history (recurrence of #1335 despite fix in #1337). Adds explicit verification step with gh api command directly in the CI failure handling section. Closes #1383 Closes #1384 Co-Authored-By: Claude Opus 4.6 <[email protected]>
Resolve conflicts in format_path_mismatch_warning (3-arg signature from #1377) and path mismatch warning snapshots. Co-Authored-By: Claude <[email protected]>
Extends the pattern from #1381 (foreground over !background) to remaining negation patterns: no_verify→verify, skip_hooks→hooks_approved, no_verify→run_hooks in execute_switch, skip_spacing→is_first in layout. Co-Authored-By: Claude <[email protected]>
Extends the pattern from #1381 (foreground over !background) to remaining negation patterns: no_verify→verify, skip_hooks→hooks_approved, no_verify→run_hooks in execute_switch, skip_spacing→is_first in layout. Co-Authored-By: Claude <[email protected]>
Extends the pattern from #1381 (`foreground` over `!background`) to three remaining negation patterns in the codebase: - **`no_verify` → `verify`** in `CommitOptions`, `step_commit`, `handle_squash`, `merge.rs` — removes `!verify` inversions at the CLI boundary and double-negation checks like `if !self.no_verify` - **`skip_hooks` → `hooks_approved`** / **`no_verify` → `run_hooks`** in `handle_switch`, `select`, `execute_switch` — eliminates `!skip_hooks` double negation - **`skip_spacing` → `is_first`** in `layout.rs` — aligns variable name with `try_allocate`'s parameter No behavior changes — pure rename with polarity flip. > _This was written by Claude Code on behalf of maximilian_ Co-authored-by: Claude <[email protected]>
Removes the deprecated
--no-backgroundflag (replaced by--foreground) fromremove,hook post-start,hook post-switch, andhook post-remove. Removesall supporting deprecation infrastructure: warning message,
is_foreground_modehelper,
DEPRECATED_ARGScompletion filtering.Promotes
--no-progressivefrom deprecated to hidden flag with inline mentionin
--progressive's help text, usingflag_pair()for consistent handling.Carries
foreground: boolthrough the entire call chain instead of negating tobackgroundat call sites. Refactorsprint_messageto usesuccess_message()/progress_message()helpers instead of manual colorconstruction, adding
FormattedMessage::append()for integration symbols thatneed native styling outside the message's color span.