360 Secure SkillHub
360 安全技能中心

OpenClaw Dashboard Skill Modal Patch

针对 OpenClaw 控制台 Skills 页面点击无效、showModal 报 InvalidStateError 的问题,指导定位并替换构建产物中的弹窗打开逻辑,随后重载页面验证。

分类:开发
danrudy33
danrudy33
热度 26.81
最近更新 2026-05-11 17:40:15

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add danrudy33/openclaw-dashboard-skill-modal-patch
兼容性
OpenClaw 专属
联网要求
不联网
数据出网
数据不出本机
Metadata
name
openclaw-dashboard-skill-modal-patch
description
Repair the OpenClaw Control UI Skills modal when clicking a skill row does nothing and DevTools shows a showModal InvalidStateError because the dialog is not yet in the document.

OpenClaw Dashboard Skill Modal Patch

Use this skill when the OpenClaw dashboard Skills page becomes non-responsive and clicking a skill row fails to open the detail modal.

Trigger symptom

DevTools shows:

InvalidStateError: Failed to execute 'showModal' on 'HTMLDialogElement': The element is not in a Document.

Fix procedure

  1. Open the live bundle:

    nano /opt/homebrew/lib/node_modules/openclaw/dist/control-ui/assets/skills-m2TVOQPH.js
    
  2. Search for:

    showModal()
    
  3. Replace:

    ${r(e=>{!(e instanceof HTMLDialogElement)||e.open||e.showModal()})}
    

    with:

    ${r(e=>{if(!(e instanceof HTMLDialogElement)||e.open)return;let t=()=>{if(e.open)return;try{e.showModal()}catch{setTimeout(()=>{try{e.showModal()}catch{}},0)}};e.isConnected?t():setTimeout(t,0)})}
    
  4. Save the file and exit.

  5. Hard reload the dashboard:

    • Cmd+Shift+R
  6. Click a skill row and confirm the modal opens.

Notes

  • This is a UI timing bug, not a skills backend failure.
  • If the asset filename changes in a future OpenClaw build, apply the same patch to the current skills-*.js bundle referenced by DevTools.