Repository navigation
fix(chat): show command instructions while pending - #140041
Conversation
|
🦞👀 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: needs maintainer review before merge. Reviewed September 6, 2026, 7:34 AM ET / 11:34 UTC. ClawSweeper reviewWhat this changesShow WebChat command instructions while commands are pending, filter internal control tokens, and release preview state after completion. Merge readiness✅ Ready for maintainer review This PR remains useful: current main still buffers command instructions until completion. The previous preview-retention finding is resolved, and no remaining blocking defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway receives WebChat commands and sends reply events to connected clients. This change exposes intermediate command text through the existing streaming channel while leaving final replies and transcript persistence with their current owners. flowchart TD
A[WebChat command] --> B[Gateway dispatch]
B --> C[Visible command blocks]
C --> D{Run still active}
D -->|Yes| E[Bounded chat preview]
E --> F[Subscribed clients]
B --> G[Final reply and history]
G --> H[Release preview state]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +87, Tests +167. Total +254 across 9 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep pending instructions in the existing bounded chat stream, with one final reply and lifecycle-owned cleanup. Do we have a high-confidence way to reproduce the issue? Yes: current main captures command blocks without broadcasting them until dispatch settles, so a command that emits instructions and waits exposes the defect. This review verified the source path without executing it. Is this the best way to solve the issue? Yes: reusing the existing chat delta format, scoped broadcaster, and terminal lifecycle is a focused repair that avoids a separate command-delivery system. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2b28525b5562. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Landed as Proof: the existing command now shows instructions through public WebChat while its synthetic work remains pending. Completion produces one ordered reply. Stop suppresses late output, and replacement, normal streaming, selected-agent/global routing, reload and restart checks pass.
Complete proof and failure history are retained. The isolated proof runtime is stopped and its resources are released. |
* commit '3ed964c8ca6206d26ecc0b6567ccd1389d9948fc': (36 commits) refactor(plugins): unify install config snapshot preparation (openclaw#140081) fix: cloud provisioning stays failed after temporary storage recovers (openclaw#140021) fix(ci): preflight job outputs exceed 1 MiB on full-plan pull requests (openclaw#140018) refactor: consolidate command and provider helpers (openclaw#140072) fix(doctor): replace unavailable TUI cleanup advice (openclaw#140074) fix(plugins): avoid scoped pack failures and missing runtime entries (openclaw#140016) fix: clarify background command timeouts (openclaw#140022) fix(workboard): refresh board navigation while retaining drafts (openclaw#139952) fix: preserve newer chat drafts when rewind completes (openclaw#140066) feat(transcripts): browse and export saved meeting archives (openclaw#139875) fix(cron): complete timeout test observation phase (openclaw#140076) fix(macos): show the full automation count (openclaw#139692) fix: native worker turns fail to load WebSocket transport (openclaw#140071) fix(cli): complete quoted Bash option values (openclaw#140034) fix(chat): show command instructions while pending (openclaw#140041) refactor(cli): use canonical resume result schema (openclaw#140056) fix: restore package acceptance across install runtimes (openclaw#140062) refactor(auto-reply): keep model-selection fixtures in tests (openclaw#140069) fix(plugins): remove owned aliases before uninstalling files (openclaw#140065) fix: completed replies hang when context-engine cleanup stalls (openclaw#140023) ...
Publish existing command blocks through the current chat delta transport while their run remains active. Preserve ordered final folding, history, selected-agent routing and cancellation; retire preview state at dispatch settlement without taking native agent ownership. Filter standalone control replies before display combination. Cover the original pending-delivery, display-filtering and preview-lifetime failures with owner regressions and real public Gateway proof. Co-authored-by: Ayaan Zaidi <[email protected]>
Related: #136257.
What Problem This Solves
WebChat hid a private command's instructions until completion, even when the command was waiting for the user. Combined final text could also expose internal control tokens.
Why This Change Was Made
Visible command blocks use the existing chat-delta delivery while the command is active. The shared finalizer retains terminal delivery and history ownership. Each display payload is filtered before combination, and preview state is released after completion.
User Impact
Instructions appear while commands wait. Stop suppresses late blocks; completion stays single and ordered. Agent and global-session boundaries remain intact.
Evidence
Real Gateway and browser checks reproduced the hidden instructions, then verified pending visibility, ordering, cancellation, replacement, restart history, and one final response. All 542 focused tests passed, including regressions for display filtering and preview cleanup. Before/after browser captures showed instructions during the pending command. Authentication and model responses were synthetic.