Skip to content

feat(diagnose): detect and inform about @homebridge/ciao cmd popup bug#250

Merged
1186258278 merged 2 commits intomainfrom
feat/ciao-bug-detection
Apr 24, 2026
Merged

feat(diagnose): detect and inform about @homebridge/ciao cmd popup bug#250
1186258278 merged 2 commits intomainfrom
feat/ciao-bug-detection

Conversation

@1186258278
Copy link
Copy Markdown
Contributor

Problem

On Windows, OpenClaws transitive dependency @homebridge/ciao (<=1.3.6) calls child_process.exec("arp -a ...") every 15-30 seconds without passing windowsHide: true. A cmd.exe / conhost.exe window flashes briefly on each call, causing visible UI noise for the entire time Gateway is running.

This is an upstream library bug, not a ClawPanel or OpenClaw issue:

Approach — detect and inform, not silently patch

ClawPanel deliberately chooses "detect and inform" over "auto-patch user node_modules". Users retain full control over their local software; we only surface a clear explanation of what is happening and three possible fix paths.

Changes

Backend

  • src-tauri/src/commands/diagnose.rs — new check_ciao_windowshide_bug Tauri command. Resolves the openclaw module root from the detected CLI path, scans @homebridge/ciao/lib/NetworkManager.js, and reports whether the buggy exec("arp -a pattern is present.
  • src-tauri/src/lib.rs — register the command in invoke_handler!.

Frontend

  • src/lib/tauri-api.js — add api.checkCiaoWindowsHideBug.
  • src/lib/ciao-bug-warning.js — new module with toast + modal flow and version-scoped localStorage dismissal so users are not nagged after acknowledging the issue for a given ciao version.
  • src/locales/modules/ciaoBug.js — translations in 5 primary languages (zh-CN / en / zh-TW / ja / ko).
  • src/locales/index.js — register the ciaoBug module.
  • src/main.js — call the checker 3 seconds after splash hides so the toast does not collide with startup animations.

Web mode

  • scripts/dev-api.js — minimal stub returning affected: false for non-Windows runs (the Web mode is primarily deployed on Linux servers, where this bug does not manifest).

UX

  • Non-Windows users see nothing.
  • Windows users see a single warning toast on first launch after upgrade, with a "View details" button opening a modal listing:
    1. Wait for upstream PR 更新新版后,skills就成这样了 #65 to merge.
    2. Apply patch-package on the openclaw install.
    3. Manually edit NetworkManager.js (simplest, breaks on next openclaw upgrade).
  • "Dismiss for this version" stops the reminder until the ciao version changes.

Verification

  • npm run build passes
  • cargo check passes
  • cargo fmt --check passes
  • cargo clippy -D warnings passes

Refs

Relates to (not "closes" — the bug is upstream): homebridge/ciao#64

On Windows, OpenClaw's transitive dependency @homebridge/ciao (<=1.3.6)
calls child_process.exec('arp -a ...') every 15-30 seconds without
passing windowsHide:true, causing a cmd.exe popup to flash.

This is an upstream library bug:
- Issue: homebridge/ciao#64
- PR:    homebridge/ciao#65 (open, not merged)

ClawPanel deliberately chooses 'detect and inform' rather than silently
patching the user's node_modules. We respect the user's control over
their own machine.

Changes:
- src-tauri/src/commands/diagnose.rs: new check_ciao_windowshide_bug
  command; scans openclaw's @homebridge/ciao/lib/NetworkManager.js and
  reports whether the buggy exec pattern is present
- src-tauri/src/lib.rs: register the new command
- scripts/dev-api.js: Web-mode stub (returns affected:false since the
  bug does not manifest off-Windows)
- src/lib/tauri-api.js: add api.checkCiaoWindowsHideBug
- src/lib/ciao-bug-warning.js: new module with toast + modal flow,
  version-scoped dismiss (localStorage)
- src/locales/modules/ciaoBug.js: translations in 5 primary languages
- src/locales/index.js: register the ciaoBug module
- src/main.js: call checker 3s after splash hides

Non-Windows users see nothing; Windows users see a single warning toast
(version-dismissible) linking to three fix paths: wait for upstream,
apply patch-package, or edit NetworkManager.js manually.
CI failures on Linux + macOS:
- openclaw_module_root was dead code when target_os != windows
  since the only caller is the #[cfg(target_os = "windows")] block
  inside check_ciao_windowshide_bug
- Explicit `return CiaoCheckResult {...};` in the non-Windows branch
  triggered clippy::needless_return

Fix:
- Add #[cfg(target_os = "windows")] to openclaw_module_root so it
  is not compiled on other platforms
- Convert the non-Windows early exit to a tail expression
@1186258278 1186258278 merged commit 11cd621 into main Apr 24, 2026
3 checks passed
@1186258278 1186258278 deleted the feat/ciao-bug-detection branch April 24, 2026 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant