Repository navigation
refactor(ui): share slash-command failure results - #157649
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: blocked before merge. Reviewed September 25, 2026, 1:50 AM ET / 05:50 UTC (Revision 4). ClawSweeper reviewWhat this changesThe Control UI chat executor now builds slash-command failure results through one private helper, adds failure-parity tests, and removes an obsolete line-limit baseline entry. Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open for an explicit scope decision. Current main still contains the duplicated failure construction, and the patch appears behavior-preserving, but OpenClaw's contribution policy requires a maintainer request tied to a concrete fix for a standalone refactor. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI chat executor receives slash commands and results from Gateway or session operations. It returns translated content and a failure flag that the chat controller displays and uses to end a failed command. flowchart TD
A[User enters slash command] --> B[Control UI chat executor]
B --> C[Gateway or session operation]
C --> D{Operation failed?}
D -->|Yes| E[Format and translate error]
E --> F[Chat result with failure flag]
F --> G[Chat displays failure]
Decision needed
Why: The implementation appears sound, but the repository's stated acceptance rule requires maintainer intent that the PR discussion does not establish. Before merge
Agent review detailsSecurityNone. PR surfaceSource -36, Tests +86, Other -1. Total +49 across 3 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Apply the shared failure-result helper only if a maintainer sponsors this cleanup for a concrete fix or deliverable; otherwise retain the current behavior until such work needs it. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR addresses duplicated source construction rather than a reported runtime defect. The repetition is visible on current main. Is this the best way to solve the issue? Yes technically: the private helper stays with the executor and preserves its error formatter and result shape. Whether the cleanup should merge depends on the repository's refactor-only policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c9dcdb1fb5ce. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits) fix(subagents): stop completion transcript retry loops (#157571) perf(sessions): remove duplicate foreground history reference scans (#157572) improve(typesafe): defer startup work until the first decision (#157380) fix(update): restore npm-pack helper typechecking (#157659) fix(packaging): avoid heap exhaustion on large bundles (#157471) refactor(infra): share process error handler registries (#157632) chore(ui): refresh control ui locales (#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (#157592) perf(plugins): reuse declared tool membership during resolution (#156205) fix(ui): pasted text previews fail before sending (#157390) fix(agents): wait for database resources during deletion (#157631) improve: move operator profile database reads off the Gateway thread (#155800) fix: explain rejected settings without losing edits (#157549) fix: keep Gateway responsive while recording trajectory events (#157598) fix(auth): show SIWC email and selected model account identity (#157629) docs: explain Codex app approval precedence (#155089) refactor(wizard): share select prompt requests (#157607) fix(ui): omit empty sections from conversation Markdown exports (#157590) fix(doctor): explain update lint supervisor refusals (#156547) fix(ui): GitHub folder links lose repository context (#157619) ...
* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131) refactor(msteams): share stored service URL validation (#157706) fix(codex): honor configured tool PATH in native commands (#157290) refactor(msteams): share approval kind labels (#157705) fix(sessions): keep session results current during cold reads (#156121) fix(testing): capture bounded upgrade integrity diagnostics (#157535) refactor(i18n): reuse native branch candidate extraction (#157636) fix(update): preserve recovery files after ownership refusal (#148890) fix(test): prevent late announcements from contaminating registry tests (#157681) fix(e2e): scan full onboarding logs for prompts (#157624) refactor(session-tools): derive contracts from schemas (#156365) refactor(channels): derive config contracts from schemas (#156367) perf(test): reuse MCP archives and batch worker fixture copies (#157689) refactor: reuse prepared fixtures in slow core tests (#157685) refactor(codex): reuse marketplace reference selection (#157621) chore(ui): refresh control ui locales (#157710) docs(gateway): show how we build OpenClaw on Team (#157675) refactor: verify IRC surrogate chunking over loopback (#157580) ...
|
Merged via squash.
|
…4-prep * commit '8fe893da516ebdc817692fb2d272e27bc3c88376': (31 commits) fix(test): wait for reload admission before restart polling (#157964) refactor(mattermost): reuse DM retry option selection (#157800) chore(i18n): refresh native locales (#157850) perf(sessions): reuse current participants across transcript appends (#157622) refactor(signal): share pending transport migration results (#157777) fix(tui): open model pickers without waiting for the Gateway (#157839) fix(gateway): apply config despite delayed file notifications (#157906) fix(auth): clear deleted account selections and support account recovery (#157745) fix: plugin reloads lose tool results and strand subagent settlement (#157339) fix(gateway): avoid preview errors during worker metadata updates (#157943) refactor(diffs): reuse native promisify for compression (#157835) fix(models): keep current choices on the first picker page (#157869) fix(plugins): retain existing quarantine across unrelated reloads (#157907) fix(openai): prioritize ChatGPT sign-in and clarify auth choices (#157792) chore(ui): refresh control ui locales (#157955) fix(ui): refresh connected accounts after auth changes (#157950) fix(scripts): avoid redundant npm version process in package checks (#157809) refactor(usage): capture hosted pricing once per operation (#157838) refactor(ui): share slash-command failure results (#157649) fix(cron): announce runs miss the channel's formatting rules (#157877) ...
* refactor(ui): share slash-command failure results * Merge main to incorporate the upstream update type fix * commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits) fix(subagents): stop completion transcript retry loops (openclaw#157571) perf(sessions): remove duplicate foreground history reference scans (openclaw#157572) improve(typesafe): defer startup work until the first decision (openclaw#157380) fix(update): restore npm-pack helper typechecking (openclaw#157659) fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471) refactor(infra): share process error handler registries (openclaw#157632) chore(ui): refresh control ui locales (openclaw#157573) fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592) perf(plugins): reuse declared tool membership during resolution (openclaw#156205) fix(ui): pasted text previews fail before sending (openclaw#157390) fix(agents): wait for database resources during deletion (openclaw#157631) improve: move operator profile database reads off the Gateway thread (openclaw#155800) fix: explain rejected settings without losing edits (openclaw#157549) fix: keep Gateway responsive while recording trajectory events (openclaw#157598) fix(auth): show SIWC email and selected model account identity (openclaw#157629) docs: explain Codex app approval precedence (openclaw#155089) refactor(wizard): share select prompt requests (openclaw#157607) fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590) fix(doctor): explain update lint supervisor refusals (openclaw#156547) fix(ui): GitHub folder links lose repository context (openclaw#157619) ... * Merge frozen main to include the question fixture authority fix * commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits) test(ui): capture live operator authority in guest question fixture refactor(agents): deslop runners, harness and recovery (openclaw#157294) fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131) refactor(msteams): share stored service URL validation (openclaw#157706) fix(codex): honor configured tool PATH in native commands (openclaw#157290) refactor(msteams): share approval kind labels (openclaw#157705) fix(sessions): keep session results current during cold reads (openclaw#156121) fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535) refactor(i18n): reuse native branch candidate extraction (openclaw#157636) fix(update): preserve recovery files after ownership refusal (openclaw#148890) fix(test): prevent late announcements from contaminating registry tests (openclaw#157681) fix(e2e): scan full onboarding logs for prompts (openclaw#157624) refactor(session-tools): derive contracts from schemas (openclaw#156365) refactor(channels): derive config contracts from schemas (openclaw#156367) perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689) refactor: reuse prepared fixtures in slow core tests (openclaw#157685) refactor(codex): reuse marketplace reference selection (openclaw#157621) chore(ui): refresh control ui locales (openclaw#157710) docs(gateway): show how we build OpenClaw on Team (openclaw#157675) refactor: verify IRC surrogate chunking over loopback (openclaw#157580) ... * chore: merge frozen main prerequisite repairs Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Thirteen slash-command failure branches duplicate the same translated failure-result construction.
User Impact
No user-visible behavior change. Command dispatch, validation, acknowledgement and cancellation remain in their existing branches. Error formatting, translated content and failed-result shape remain identical.
Why This Change Was Made
One private
commandFailurehelper replaces the duplicate result builders. Production -36 lines, tests +86 lines, plus removal of the newly unused line-cap baseline entry. No public API, configuration, stored-state or migration change.Maintainer scope decision
I explicitly sponsor this targeted UI code-quality deliverable: consolidate thirteen duplicate slash-command failure-result builders in their existing executor owner while preserving formatting, translation, and failure semantics with parity coverage. This is a maintainer-requested active deliverable under CONTRIBUTING.md. I accept this scoped refactor and resolve all three Revision 4 Before-merge scope items; no runtime defect or performance improvement is claimed.
Evidence
2f89384c63e8eca7bda65e9abcfc9a1058c3ca23incorporates frozen main63d299c31b06150cc5fbff90c3b8123290608e13while retaining the published commit's ancestry. Relative to frozen main, only the original three UI/baseline paths change. The already-landed import, guest-fixture, architecture and test-routing repairs remain main-owned prerequisites.origin/mainadvancing from the frozen base to0b234fc7f6cd81bdec6bd69e1f9bcc95488a6e35. A separate independent postflight verified the unchanged signed candidate, parents, tree, clean checkout, dependency link, patch, merge-base and all 49,633 tracked-file bindings. The accepted evidence is the complete remote proof against frozen main plus that immutable postflight—not a rewritten successful controller receipt or validation against the newer origin.