Soften explicit command approval prompts - #3953
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
The caller split is clean — approve_command_batch still routes the execution gate through the yellow prompt_for_batch_approval, and announce_batch_approval has add_approvals as its only caller, so nothing that interrupts an operation lost its warning. Three follow-ups, none blocking.
Stale doc link on announce_batch_approval. Its docstring still reads "Lives beside [prompt_for_batch_approval] so the two headers stay parallel". After this split the parallel header is prompt_for_batch_review's — both go through info_message — while prompt_for_batch_approval is the one that deliberately diverges, so the comment now names the wrong sibling. That line sits just outside the diff hunk, so no suggestion block; the fix is:
/// unattended run just approved. Lives beside [`prompt_for_batch_review`]
/// so the two headers stay parallel.
prompt_for_batch_approval no longer needs pub. With config/approvals.rs importing prompt_for_batch_review instead, its only remaining caller is approve_command_batch in the same module.
The new header carries the same symbol as the rows it introduces. info_message prefixes dim ○, and print_command_batch prefixes every command label with INFO_SYMBOL, so the batch now renders with no visual break between the header and its list:
○ Approving 2 commands for repo (--yes):
○ pre-merge:
cargo test
○ alias deploy:
echo deploying {{ branch }}
The yellow ▲ was doing that separation before. wt config approvals list hits the same problem and answers it with format_heading — cyan APPROVED / UNAPPROVED, no symbol — reserving ○ and ❯ for rows; prompt_message's ❯ would also read as "awaiting input" on the interactive add path. Either keeps the header distinct without bringing back the warning framing. Worth a look since it's the part of the change the snapshots make visible.
Happy to push the docstring and visibility fixes if you'd like them.
Use a neutral heading when
wt config approvals addreviews or records commands. Approval prompts that interrupt command execution keep the warning.