TUI: skip goal replace prompt for completed goals#23792
Merged
Conversation
f94edeb to
add93ff
Compare
zanieb
reviewed
May 21, 2026
| fn should_confirm_before_replacing_goal(goal: &ThreadGoal) -> bool { | ||
| // Completed goals are terminal, so `/goal <objective>` can start a fresh goal | ||
| // without asking the user to confirm replacing already-finished work. | ||
| goal.status != ThreadGoalStatus::Complete |
There was a problem hiding this comment.
I'd use a match so it's exhaustive and when ThreadGoalStatus gains a new member someone must decide how it's handled here.
Collaborator
Author
There was a problem hiding this comment.
Yep, good suggestion!
zanieb
reviewed
May 21, 2026
Comment on lines
115
to
116
| let mut mode = mode; | ||
| if matches!(mode, ThreadGoalSetMode::ConfirmIfExists) { |
There was a problem hiding this comment.
Since most of the branches inside here return, you can easily avoid making mode mutable with
let mode = if ... {
...
} else {
mode
};
which I generally prefer over introducing mutable state unless it makes the code significantly simpler
zanie-oai
approved these changes
May 21, 2026
add93ff to
57d4f62
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
Users reported that the replacement confirmation feels unnecessary when the current thread goal is already complete. In that state,
/goal <objective>is starting fresh rather than interrupting active work.What changed
/goal <objective>now skips the replace confirmation when the existing goal hascompletestatus and uses the existing fresh replacement path. Goals that are active, paused, blocked, usage-limited, or budget-limited still require confirmation before being replaced.