Skip to content

[Bug]: Control UI approval window closes with queued approvals pending #98379

Description

@haruaiclone-droid

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When two approval prompts are pending in the Control UI at the same time, resolving the active prompt can leave the reused approval dialog closed instead of showing the next queued approval.

Steps to reproduce

  1. Open the Control UI.
  2. Queue two exec/plugin approval requests so the approval prompt shows a pending count greater than 1.
  3. Click an allow or deny action on the active approval.
  4. Observe the approval window after the first request resolves while a second request remains queued.

Expected behavior

After the first approval is resolved, the Control UI should keep the approval window open and display the next pending approval.

Actual behavior

The approval window can close after resolving the first approval, even though another approval remains pending.

OpenClaw version

main branch at fa3c9de (source checkout), package version 2026.6.11

Operating system

Windows 11 source checkout; behavior is in the browser Control UI code path.

Install method

Source checkout with pnpm.

Model

N/A - Control UI approval queue behavior.

Provider / routing chain

N/A - Control UI approval queue behavior.

Additional provider/model setup details

N/A

Logs

Focused repro coverage added locally:
- openclaw-modal-dialog reopens the same dialog instance after content changes while closed
- OpenClawApp keeps the approval prompt on the next queued item after resolving the active item

Screenshots, recordings, and evidence

Local validation:

  • corepack pnpm exec vitest run --config vitest.config.ts --project unit src/ui/components/modal-dialog.test.ts src/ui/app.exec-approval.test.ts src/ui/views/exec-approval.test.ts --reporter=verbose
  • corepack pnpm exec vitest run --config vitest.config.ts --project unit-node src/ui/app-gateway.node.test.ts --reporter=verbose
  • corepack pnpm ui:build

Impact and severity

Affected: Control UI users resolving simultaneous exec/plugin approval prompts.
Severity: Workflow-blocking for the remaining approval until the user notices and refreshes/reopens the approval surface.
Frequency: Reproducible when the same approval modal instance is reused after the underlying dialog has closed and another approval remains queued.
Consequence: Pending approvals can become hidden from the active approval window, delaying or blocking the associated agent/tool/plugin workflow.

Additional information

Root cause identified in the Control UI modal primitive: openclaw-modal-dialog only opened in firstUpdated() and tracked an internal opened flag, so a reused custom element whose underlying <dialog> was closed did not call showModal() again after its approval content changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions