Repository navigation
feat(tui): name the agent when a background task needs approval - #686
Merged
Merged
Conversation
A background subagent stopping for approval changed nothing the operator could read. `poll_background_tasks` swept only terminal transitions, so the block was invisible apart from the footer chip's `· 1 need` — a count that does not say who is asking, and which the operator has to notice unprompted. Subagent approvals live on the task (`BackgroundTaskStatus:: WaitingForApproval`), not on the session, so there is no transcript card to relabel: the strip row and the feedback line are the whole surface. The strip row already names the asker after #685; this adds the transition that was missing. - A task newly entering `WaitingForApproval` now raises a warning on the feedback strip and a toast: `explore needs approval: bash`. - Approve, deny and "not waiting" feedback name the task rather than its row id, so answering one of several in-flight agents is unambiguous. - `push_toast` hardcoded `FeedbackSeverity::Ok` for both the toast and the feedback strip it writes. A needs-approval notice would therefore have rendered as a success and clobbered the severity. `push_toast_with` takes the severity; `push_toast` is now a thin `Ok` wrapper. Tests: a subagent that blocks names itself and its tool on the feedback strip with `Warn` severity, and the approval confirmation names the task.
This was referenced Sep 14, 2026
mohitranka
added a commit
that referenced
this pull request
Sep 14, 2026
…ions (#688) The design system described the footer's counts-only chip and referred per-item detail to "the task view", which did not exist as a named surface. The strip now renders (#685, #686) and notifies (#687), so the rules that shipped — and the reason each exists — belong in the design language rather than only in the code. Adds §9.12 (the strip) and §9.13 (out-of-band notification), and points Row 1 of §9.3 at them. The rules recorded are the ones that are load-bearing and easy to undo by accident: the derived height that keeps the transcript's floor, the ordering that stops truncation hiding a failure, `cancelled` staying distinct from `done`, the one-minute expiry, and the focus gate on the notification.
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.
Follow-up to #685, which made the background strip visible. This closes the one case that was still silent.
The defect
A background subagent stopping for approval changed nothing the operator could read.
poll_background_tasksswept only terminal transitions, so the block was invisible apart from the footer chip's· 1 need— a count that does not say who is asking, and that the operator has to notice unprompted.Subagent approvals live on the task (
BackgroundTaskStatus::WaitingForApproval), not on the session, so there is no transcript approval card to relabel. The strip row and the feedback line are the entire surface. #685 already made the row name its asker; this adds the transition that was missing.What changed
WaitingForApprovalraises a warning on the feedback strip and a toast:explore needs approval: bash.push_toasthardcodedFeedbackSeverity::Okfor both the toast and the feedback strip it writes. A needs-approval notice would have rendered as a success notice and clobbered the severity the caller set.push_toast_withnow takes the severity andpush_toastis a thinOkwrapper.Verification
Warnseverity.cargo fmt --all -- --checkandcargo clippy --workspace --all-targets --locked -- -D warningsclean.app::tests::taskstests fail locally because this machine refuses to apply the tool sandbox; they fail identically onmain.