Skip to content

Commit 08f4425

Browse files
committed
fix(exec): describe dashboard URL handoff
1 parent 3da838b commit 08f4425

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/agents/bash-tools.exec-host-shared.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,9 @@ describe("buildExecApprovalPendingToolResult", () => {
637637
nodeId: "node-mac-1",
638638
});
639639
const text = result.content.find((part) => part.type === "text")?.text ?? "";
640-
expect(text).toContain("Open the approval inbox with `openclaw dashboard --no-open`.");
640+
expect(text).toContain(
641+
"Print the Control UI URL with `openclaw dashboard --no-open`, open it in a browser, then use the approval inbox.",
642+
);
641643
expect(text).toContain(
642644
"Inspect the node's effective exec policy with `openclaw approvals get --node node-mac-1`.",
643645
);

src/agents/embedded-agent-subscribe.handlers.tools.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,9 @@ describe("handleToolExecutionEnd exec approval prompts", () => {
21872187
"tool result text",
21882188
);
21892189
expect(text).toContain("no interactive approval client is currently available");
2190-
expect(text).toContain("Open the approval inbox with `openclaw dashboard --no-open`.");
2190+
expect(text).toContain(
2191+
"Print the Control UI URL with `openclaw dashboard --no-open`, open it in a browser, then use the approval inbox.",
2192+
);
21912193
expect(text).toContain(
21922194
"Inspect the node's effective exec policy with `openclaw approvals get --node node-mac-1`.",
21932195
);

src/infra/exec-approval-reply.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,21 @@ describe("exec approval reply helpers", () => {
116116
);
117117
});
118118

119-
it("distinguishes the node approval inbox from policy inspection", () => {
119+
it("distinguishes node approval-inbox access from policy inspection", () => {
120120
const text = buildExecApprovalUnavailableReplyPayload({
121121
reason: "no-approval-route",
122122
host: "node",
123123
nodeId: "mac-1",
124124
}).text;
125125

126-
expect(text).toContain("Open the approval inbox with `openclaw dashboard --no-open`.");
127126
expect(text).toContain(
128-
"Inspect the node's effective exec policy with `openclaw approvals get --node mac-1`.",
127+
"Print the Control UI URL with `openclaw dashboard --no-open`, open it in a browser, then use the approval inbox.",
129128
);
130-
expect(text).not.toContain(
131-
"approval inbox with `openclaw dashboard --no-open` or `openclaw approvals get",
129+
expect(text).toContain(
130+
"Inspect the node's effective exec policy with `openclaw approvals get --node mac-1`.",
132131
);
132+
expect(text).not.toContain("`openclaw dashboard --no-open` or `openclaw approvals get");
133+
expect(text).not.toContain("Open the approval inbox with");
133134
expect(text).not.toContain("exec-approvals list");
134135
});
135136

src/infra/exec-approval-reply.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ function buildGenericNativeExecApprovalFallbackText(params?: {
9090
const clients = resolveNativeExecApprovalClientList({
9191
excludeChannel: params?.excludeChannel,
9292
});
93-
let manualRecovery = "Open the approval inbox with `openclaw dashboard --no-open`.";
93+
let manualRecovery =
94+
"Print the Control UI URL with `openclaw dashboard --no-open`, open it in a browser, then use the approval inbox.";
9495
if (params?.host === "node") {
9596
const nodeId = normalizeOptionalString(params.nodeId) ?? "<id|name|ip>";
9697
manualRecovery += ` Inspect the node's effective exec policy with \`openclaw approvals get --node ${nodeId}\`.`;

0 commit comments

Comments
 (0)