Skip to content

fix(exec): add concrete approval recovery hints#53347

Closed
SnowSky1 wants to merge 1 commit into
openclaw:mainfrom
SnowSky1:codex/53250-exec-approval-hints
Closed

fix(exec): add concrete approval recovery hints#53347
SnowSky1 wants to merge 1 commit into
openclaw:mainfrom
SnowSky1:codex/53250-exec-approval-hints

Conversation

@SnowSky1

Copy link
Copy Markdown
Contributor

Summary

  • replace generic exec-approval fallback copy with concrete next steps
  • point operators to openclaw dashboard --no-open for the Control UI and openclaw approvals get for CLI inspection
  • mention the Discord and Telegram execApprovals.enabled config keys in the shared fallback message

Closes #53250

Verification

  • pnpm test -- src/infra/exec-approval-reply.test.ts
  • pnpm exec oxfmt --check src/infra/exec-approval-reply.ts src/infra/exec-approval-reply.test.ts

@SnowSky1

Copy link
Copy Markdown
Contributor Author

@codex review

@greptile-apps

greptile-apps Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR replaces three separate copies of a vague "approve from Web UI or terminal UI" fallback message with a single shared helper (appendExecApprovalRecoveryHints) that gives operators three concrete, actionable next steps: opening the Control UI via openclaw dashboard --no-open, inspecting pending approvals via openclaw approvals get, and the exact config keys to enable Discord or Telegram exec approvals.

The change is clean and well-tested — tests were updated to assert every new hint line appears across all three ExecApprovalUnavailableReason cases, and the sentApproverDms early-return path is correctly left untouched. No logic regressions identified.

Confidence Score: 5/5

  • Safe to merge — purely a copy improvement backed by thorough tests with no behaviour changes to approval logic.
  • Changes are limited to user-facing message strings, the helper is cleanly extracted and reused across all three branches, test coverage is thorough (all three reason codes + sentApproverDms path), and there are no logic or type changes at all.
  • No files require special attention.

Reviews (1): Last reviewed commit: "fix(exec): add concrete approval recover..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 64c127da61

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

function appendExecApprovalRecoveryHints(lines: string[]): void {
lines.push("Try one of these:");
lines.push("- Open the Control UI: run `openclaw dashboard --no-open` to get a tokenized URL.");
lines.push("- Inspect pending approvals from the CLI: `openclaw approvals get`.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fix misleading CLI recovery hint for blocked exec approvals

The new fallback text says operators can “Inspect pending approvals” with openclaw approvals get, but this command does not show pending approval requests—it renders the exec approvals snapshot/allowlist (src/cli/exec-approvals-cli.ts, get command). It also defaults to the local approvals file when neither --gateway nor --node is provided (loadSnapshotTarget), so in common remote-gateway/node flows this advice points to the wrong target and does not help resolve the blocked approval. Please update the hint to describe what this command actually does or point to the correct pending-approval resolution path.

Useful? React with 👍 / 👎.

@SnowSky1

Copy link
Copy Markdown
Contributor Author

I rechecked the remaining failures and they look unrelated to this PR.\n\nLocal targeted verification still passes:\n- \pnpm test -- src/infra/exec-approval-reply.test.ts\n- \pnpm exec oxfmt --check src/infra/exec-approval-reply.ts src/infra/exec-approval-reply.test.ts\n\nThis PR only touches:\n- \src/infra/exec-approval-reply.ts\n- \src/infra/exec-approval-reply.test.ts\n\nThe remaining failing jobs are currently in:\n- \src/infra/exec-command-resolution.test.ts\ (/bin/sh\ vs /usr/bin/dash\ assertion)\n- extension runtime loading under \matrix\ / \whatsapp\ paths\n\nSo from the current logs, the red checks appear broader than the files touched here.

@SnowSky1

Copy link
Copy Markdown
Contributor Author

Closing this to reduce my active PR queue and focus on the two smallest, highest-probability merge candidates. Happy to reopen if this specific path becomes active again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UX] Exec approval timeout message should include Control UI link and setup hints

1 participant