Repository navigation
fix: open an agent turn for a subagent that finishes after the reply - #205580
vyctorbrzezowski merged 9 commits into
Conversation
OpenClaw-Publication: 0b5d0508-3076-45a8-9d57-01a205a74095
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR assigns late subagent completion receipts to their parent’s follow-up turn, combines repeated child outcomes, and aligns opening activity rows with avatars. Example: The Composer fix subagent finishes after the parent replies, starting run announce:child-one.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes a current display defect and resolves the previous continuation finding; one minor alignment interaction with current main remains. Reviewed head: Before mergeNone. Findings
Agent review detailsHow this fits togetherThe Gateway projects private coordination inputs into public completion receipts; the Control UI combines those receipts and groups them into visible agent turns. flowchart LR
A[Subagent completion] --> B[Persisted wake input]
B --> C[Gateway display projection]
C --> D[Public completion receipt]
D --> E[UI receipt grouping]
E --> F[Agent turn and avatar]
Technical reviewBest possible solution: Retain the receipt identity and continuation fixes while making opening-row spacing compose with main’s existing completion alignment. Do we have a high-confidence way to reproduce the issue? Current main drops the only run identity on a completion wake carrying completion-turn:user, and the inspected before screenshot shows the resulting unframed receipt. Is this the best way to solve the issue? The existing display projection is the appropriate repair boundary, and the UI changes preserve continuation ownership without rewriting transcripts. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bc3700e9833e. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +35, Tests +100. Total +135 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 28, 2026, 6:59 PM ET / 23:59 UTC (Revision 2). |
OpenClaw-Publication: fb01d441-86e1-41aa-ad00-55a70796e260
OpenClaw-Publication: c53b05d8-26b9-447f-8341-e75805d815c7
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…205580) * fix(ui): show an agent that settles twice in a row once * fix(ui): show an agent that settles twice in a row once OpenClaw-Publication: 0b5d0508-3076-45a8-9d57-01a205a74095 * fix: open an agent turn for a subagent that finishes after the reply * Publish openclaw/melhorar-injecao-de-subagents-finalizados-692eb4 OpenClaw-Publication: fb01d441-86e1-41aa-ad00-55a70796e260 * fix(ui): center a turn that opens with a tool or agent row on its avatar * Publish openclaw/melhorar-injecao-de-subagents-finalizados-692eb4 OpenClaw-Publication: c53b05d8-26b9-447f-8341-e75805d815c7 * fix(ui): retain continuation on merged subagent receipts * fix(ui): center leading subagent completion rows (cherry picked from commit d0c74cf) Release adaptation: Keep the release chat fixture location and add the consecutive same-session receipts regression there, without duplicating its separate interrupted-tracking fixture. Co-authored-by: RomneyDa <[email protected]>
…penclaw#205580) * fix(ui): show an agent that settles twice in a row once * fix(ui): show an agent that settles twice in a row once OpenClaw-Publication: 0b5d0508-3076-45a8-9d57-01a205a74095 * fix: open an agent turn for a subagent that finishes after the reply * Publish openclaw/melhorar-injecao-de-subagents-finalizados-692eb4 OpenClaw-Publication: fb01d441-86e1-41aa-ad00-55a70796e260 * fix(ui): center a turn that opens with a tool or agent row on its avatar * Publish openclaw/melhorar-injecao-de-subagents-finalizados-692eb4 OpenClaw-Publication: c53b05d8-26b9-447f-8341-e75805d815c7 * fix(ui): retain continuation on merged subagent receipts * fix(ui): center leading subagent completion rows
Problem
If a subagent finishes after the parent has already replied, its " finished" row floats under the finished turn. It has no avatar and isn't part of any turn. The parent's work on that result then starts a separate turn below it. If the same child finishes again in the meantime, the row shows up twice.
The cause is in the Gateway's display projection. A completion that wakes the parent becomes a receipt, and that receipt kept no run id. The wake input is saved with the send key of the run it starts (
<runId>:user).subagentCompletionMessageread the run id only fromsteerTargetRunIdandrunId, so the receipt belonged to no run. The UI's turn grouping then left it outside every agent frame.A turn that opens with a row instead of text, such as a "finished" row or a tool row like "Read a.ts", also sat at the top of the avatar instead of centered on it. Text lines are centered by the bubble's top padding, but rows had no matching offset.
Change
subagentCompletionMessagefalls back to the wake's send key. The receipt now carries the run its wake started, so the Control UI puts it at the top of that agent turn, with the avatar, followed by the parent's work and reply. This also works while the parent hasn't written anything yet.(avatar − row line height) / 2, so its line is centered on the avatar. Direct threads without an avatar, reply-attributed groups and turns that open with text keep their current spacing.Evidence
mainand passes here.chat-display-projection.visibility,chat-message.tools,chat-background-run-lifecycle,chat-thread-incremental,chat-pending-input-display,tsgo:ui,tsgo:core, oxlint, oxfmt and stylelint.Clean comparison: the parent replied to the completion
Control UI with a mock Gateway. The history was made by running
projectChatDisplayMessagesfrom each revision on the same synthetic raw transcript: a wake input saved with the announce run's send key, then the parent's reply. Before ismainat aecbf92, after is this branch.Annotated comparison
Before the parent writes anything
Rows centered on the avatar
Same mock setup, 2× crop. Before is this branch without the CSS change, after is with it. The first turn opens with a tool row and the second with a "finished" row.
🦞 Made with OpenClaw