Repository navigation
↩️ feat: Show and Withdraw Pending Subagent Guidance - #18217
danny-avila merged 1 commit into
Conversation
0d3708d to
e9aa37a
Compare
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
e9aa37a to
9a4098b
Compare
975d834 to
f55bc37
Compare
67169eb to
583281e
Compare
583281e to
348dbf1
Compare
ca6248b to
1d147a4
Compare
419f776 to
4671032
Compare
4671032 to
b2fcc9a
Compare
|
Folded into #18197. Its one commit (b2fcc9a) is now the head of that PR's branch, which is why this shows as merged into |
Summary
When the subagent panel draws a background child's thread as a conversation (#18197), guidance that has been sent to the child but not taken yet is not drawn anywhere, and neither is the control that withdraws it. The panel's durable view shows both, dimmed, after the transcript. So with #18197 alone a reader can send a steer from the panel's composer, or watch the parent agent send one, and then has no sign it is waiting and no way to take it back before the child reaches its next tool boundary. Guidance that was refused or failed disappears the same way.
This draws that guidance after the last row of the conversation, with Withdraw, and removes it from there once the child takes it and the stream places it in the reply.
Tenth in a stack, on #18197.
How it works
Main chat's message list has a slot for exactly this position,
renderPendingSteers: what is waiting on the conversation's run, after the last row.FollowedThreadleaves it empty by default; the subagent panel now fills it.SubagentControlHistoryis the list the durable view already renders; it is exported and reused, not copied, so the two bodies decide what counts as "already shown" with one rule: a receipt whose steer part is in the content is left out. That rule is what makes the hand-off seamless here. The durable view's receipt can still sayacceptedfor a moment after the stream has delivered the applied steer, and the reply's part wins.The list sits in main chat's row column (
getMessageRowWidthClass), so it lines up with the turns above it.Main chat's own
PendingSteerscomponent is not used: it reads main chat's steer chips and cancels through main chat's steer routes, and a child's guidance is a different record (a control receipt) withdrawn through the subagent control route. Sharing the slot and the bubble is the part that is the same.Type of change
Testing
Tested environments/configuration:
Chromium via Playwright,
e2e/playwright.config.mock.tsandplaywright.config.redis.ts, server and client built from this branch, in-memory Mongo, fake model.Automated tests:
e2e/specs/mock/subagent-activity.spec.ts, new case "guidance the child has not taken yet waits after the last row and can be withdrawn": with a child held before its next tool boundary, a steer sent to it appears after everything the child has done, with one Withdraw; clicking it postscancel_messageto the control route and the button goes away; the child then finishes without that guidance in its reply. Passes on the memory lane and 4 of 4 on Redis.packages/chat/src/components/subagents/__tests__/followed.spec.tsx(6 new): waiting guidance after the last row and its withdrawal; no receipt for guidance the reply already shows; no Withdraw while the task cannot be controlled; the reason for refused guidance; the "earlier control activity" notice; nothing added when no guidance was sent.panel.spec.tsx(1 new): the panel hands the conversation the task's waiting receipts, and Withdraw sendscancel_messagewith the task and control ids.packages/chat:npx jest src/components/subagents src/components/pane src/components/messages(746 tests),npx tsc --noEmit.npm run static-checks -- --against origin/dev.Screenshots / recordings
Guidance waiting on a running child, in the conversation body. There is no "before" in this body: without this change nothing is drawn there.
Risk / compatibility
Only the followed body changes. The durable view renders the same component it did, now exported.