openclaw - ✅(Solved) Fix Exec approval dialog: no scroll + buttons unreachable when command is too long [2 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#51522Fetched 2026-04-08 01:10:02
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
cross-referenced ×3commented ×1referenced ×1

When an exec approval request contains a large payload (e.g. a script written via heredoc or a long command), the approval dialog window does not scroll. The entire command cannot be viewed, and more critically — the accept/deny buttons are pushed off-screen and become unreachable. There is no way to approve or deny the command.

Root Cause

When an exec approval request contains a large payload (e.g. a script written via heredoc or a long command), the approval dialog window does not scroll. The entire command cannot be viewed, and more critically — the accept/deny buttons are pushed off-screen and become unreachable. There is no way to approve or deny the command.

Fix Action

Fix / Workaround

Impact

HIGH — this completely blocks autonomous workflows that involve writing files via shell heredocs. The workaround (using the Write tool instead of exec) exists but is not obvious, and the approval UX failure leaves the user with zero feedback or recourse.

PR fix notes

PR #4: fix(ui): add scroll and sticky buttons to exec approval dialog

Description (problem / solution / changelog)

Summary

Fixes openclaw/openclaw#51522

When exec approval commands are long (e.g. heredoc scripts writing files), the dialog expands beyond the viewport. The approve/deny buttons get pushed off-screen with no way to reach them, completely blocking the workflow.

Changes

  • Added max-height: 90vh and overflow-y: auto to .exec-approval-card
  • Added flex-direction: column layout to constrain content within viewport
  • Made .exec-approval-actions sticky at the bottom with background and border-top so buttons are always visible

Test plan

  • Open exec approval dialog with a short command → normal appearance, no scroll
  • Open exec approval dialog with a long command (e.g. heredoc script) → dialog scrolls, buttons stay visible at bottom
  • Verify buttons are clickable even when command content overflows

Changed files

  • ui/src/styles/components.css (modified, +9/-0)

PR #52187: fix(ui): add scroll and sticky buttons to exec approval dialog

Description (problem / solution / changelog)

Summary

When exec approval commands are long (e.g. heredoc scripts), the dialog expands beyond the viewport. The approve/deny buttons get pushed off-screen with no way to reach them, completely blocking the workflow.

Changes

  • Added max-height: 90vh and overflow-y: auto to .exec-approval-card
  • Added flex-direction: column layout to constrain content within viewport
  • Made .exec-approval-actions sticky at the bottom with background and border-top

Fixes #51522

Changed files

  • ui/src/styles/components.css (modified, +12/-2)
RAW_BUFFERClick to expand / collapse

Bug Report

Summary

When an exec approval request contains a large payload (e.g. a script written via heredoc or a long command), the approval dialog window does not scroll. The entire command cannot be viewed, and more critically — the accept/deny buttons are pushed off-screen and become unreachable. There is no way to approve or deny the command.

Steps to Reproduce

  1. Have Gigachad (or any agent) attempt to write a large Python script via cat > file.py << 'EOF' ... EOF
  2. The exec approval dialog appears in the OpenClaw UI
  3. The command body is too long to fit in the visible window
  4. The approve/deny buttons are not visible and there is no scroll mechanism

Expected Behavior

  • The dialog should be scrollable so the full command can be reviewed
  • The approve/deny buttons should always be accessible (sticky footer, always visible)
  • Alternatively: offer a bypass / opt-out option for users who do not want code-level exec approvals on trusted long-running scripts — or at minimum show a truncated summary with a 'show full' toggle

Actual Behavior

  • Dialog shows partial command, no scroll
  • Approve/deny buttons are off-screen and unreachable
  • User is stuck — cannot approve OR deny — must wait for timeout

Impact

HIGH — this completely blocks autonomous workflows that involve writing files via shell heredocs. The workaround (using the Write tool instead of exec) exists but is not obvious, and the approval UX failure leaves the user with zero feedback or recourse.

Suggested Fixes

  1. Make the approval dialog scrollable (minimum viable fix)
  2. Sticky approve/deny buttons always visible at the bottom regardless of content length
  3. Truncated preview (first N lines) with 'show full command' expand toggle
  4. Per-session or per-command-type opt-out so power users can bypass approval for known-safe patterns (e.g. file writes)
  5. Show the /approve CLI command prominently so users can run it from terminal when UI fails

Environment

  • OpenClaw version: 2026.3.13
  • Surface: Discord (exec approval shown in web/desktop UI)
  • OS: macOS

Additional Context

The current behavior is especially painful when the agent is mid-task — the only resolution is waiting for timeout, which stalls the whole workflow. The approval system has good intent (security review) but this UX failure completely negates it for long commands.

extent analysis

Fix Plan

To address the issue, we will implement a combination of the suggested fixes. We will make the approval dialog scrollable, add sticky approve/deny buttons, and provide a truncated preview with a 'show full command' toggle.

Step 1: Make the approval dialog scrollable

We will add the following CSS to the approval dialog container:

.approval-dialog {
  overflow-y: auto;
  max-height: 80vh;
}

This will allow the dialog to scroll when the content exceeds the visible area.

Step 2: Add sticky approve/deny buttons

We will add the following CSS to the approve/deny buttons container:

.approval-buttons {
  position: sticky;
  bottom: 0;
  background-color: #fff;
  padding: 10px;
  border-top: 1px solid #ddd;
}

This will keep the approve/deny buttons visible at the bottom of the dialog, regardless of the content length.

Step 3: Truncated preview with 'show full command' toggle

We will add a JavaScript function to truncate the command preview and add a toggle button:

function truncateCommand(command) {
  const maxLength = 100;
  if (command.length > maxLength) {
    return command.substring(0, maxLength) + '...';
  }
  return command;
}

const commandPreview = document.getElementById('command-preview');
const toggleButton = document.getElementById('show-full-command');

commandPreview.textContent = truncateCommand(command);
toggleButton.addEventListener('click', () => {
  commandPreview.textContent = command;
});

This will show a truncated preview of the command and allow the user to toggle to show the full command.

Verification

To verify the fix, follow these steps:

  • Test with a large command payload to ensure the dialog is scrollable and the approve/deny buttons are visible.
  • Test the 'show full command' toggle to ensure it works correctly.
  • Test with different screen sizes and orientations to ensure the fix works across various devices.

Extra Tips

  • Consider adding a per-session or per-command-type opt-out option for power users to bypass approval for known-safe patterns.
  • Prominently display the /approve CLI command in the UI to allow users to approve commands from the terminal when the UI fails.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix Exec approval dialog: no scroll + buttons unreachable when command is too long [2 pull requests, 1 comments, 2 participants]