Skip to content

refactor(ui): share slash-command failure results - #157649

Merged
vincentkoc merged 4 commits into
mainfrom
refactor/ui-command-failures-20260924
Sep 25, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
refactor/ui-command-failures-20260924

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

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 commandFailure helper 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

  • Signed candidate 2f89384c63e8eca7bda65e9abcfc9a1058c3ca23 incorporates frozen main 63d299c31b06150cc5fbff90c3b8123290608e13 while 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.
  • A fresh frozen dependency installation and the current test harness were used. All 107 candidate unit cases passed: failure fixture 14, executor 59, command consumer 32, and error formatter 2. The complete question-guest E2E file passed 1/1 with one worker and its unchanged 120-second timeout.
  • All 22 remote canonical stages passed, including all 25 test-type graphs, UI types, i18n, all five full-core lint stripes, scoped Stylelint and complete script lint. The four inherited line-cap violations from the earlier composition are fixed in this frozen main; no old exception or continuation was carried forward.
  • The original controller still exited 72 and remains failed. Its remote command exited zero, all eight remote source checkpoints matched, and the exact lease stopped. The later local postguard rejected shared origin/main advancing from the frozen base to 0b234fc7f6cd81bdec6bd69e1f9bcc95488a6e35. 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.
  • Fresh complete candidate review found no actionable findings. Earlier-head proof and review results remain historical. Actual new-head hosted CI, required statuses and ClawSweeper remain mandatory before landing.
  • Node 24.19.0, pnpm 12.4.2, Linux x64, one worker. Whole-command walls: failure fixture 2.454s, executor 1.863s, consumer 2.773s, formatter 1.595s. The whole guest E2E command took 37.255s, including browser preparation, build, setup and installation if invoked; outer workspace provisioning is separate. These observations are not speedup or incremental hosted-CI cost.
  • Signed scoped commits used the documented targeted-validation hook skip; hooks are not claimed to have run. Portal-sync timeout and retained staging-cursor warnings are disclosed separately. No live-service, manual-browser or performance claim.

@vincentkoc vincentkoc self-assigned this Sep 24, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 24, 2026 22:45
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 25, 2026, 1:50 AM ET / 05:50 UTC (Revision 4).

ClawSweeper review

What this changes

The 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
Reviewed head: 2f89384c63e8eca7bda65e9abcfc9a1058c3ca23
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow cleanup has focused failure-parity coverage and no found patch defect; its acceptance remains a policy decision.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The changed production owner is the Control UI slash-command executor, and its new mocked Gateway and session failure cases check after-change result content and flags. This member-authored internal cleanup has no external-contributor real-setup proof gate and changes no stored-data contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed production owner is the Control UI slash-command executor, and its new mocked Gateway and session failure cases check after-change result content and flags. This member-authored internal cleanup has no external-contributor real-setup proof gate and changes no stored-data contract.
Evidence reviewed 9 items Introduced production change: The pinned base-to-head diff replaces the existing translated failure objects with a private helper using the same formatter and failed flag.
Failure-parity coverage: Fourteen cases call the executor through rejected session or Gateway operations and assert translated content, redaction, the failed flag, and request boundaries.
Consumer contract: The chat controller displays returned content and uses the failed flag to report a failed command.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should this behavior-neutral slash-command cleanup receive an exception to the refactor-only contribution rule? Decline standalone cleanup: Keep the current implementation and revisit the consolidation when a concrete UI fix needs it.

Why: The implementation appears sound, but the repository's stated acceptance rule requires maintainer intent that the PR discussion does not establish.

Before merge

  • Resolve merge risk (P1) - No explicit maintainer request tying this standalone refactor to a concrete fix is recorded, as required by OpenClaw's contribution policy.
  • Complete next step (P2) - A maintainer should explicitly sponsor this cleanup for a concrete fix or deliverable, or decline it under the refactor-only policy.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source -36, Tests +86, Other -1. Total +49 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 17 53 -36
Tests 1 86 0 +86
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 3 103 54 +49

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a behavior-neutral, low-urgency Control UI cleanup.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed production owner is the Control UI slash-command executor, and its new mocked Gateway and session failure cases check after-change result content and flags. This member-authored internal cleanup has no external-contributor real-setup proof gate and changes no stored-data contract.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-24T22:50:02.995Z sha dc3da68 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-25T01:01:38.551Z sha 178cd33 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-25T02:44:31.508Z sha 5ee831e :: needs maintainer review before merge. :: none

* 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)
  ...
@vincentkoc
vincentkoc merged commit 9341795 into main Sep 25, 2026
132 checks passed
@vincentkoc
vincentkoc deleted the refactor/ui-command-failures-20260924 branch September 25, 2026 06:02
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
…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)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant