Skip to content

[Bug]: macOS embedded Control UI avatar image picker does not open native file picker #94468

Description

@DINGDANGMAOUP

Summary

In the OpenClaw macOS app, the embedded Control UI cannot choose an avatar image from Personal Settings. Clicking Choose image does nothing and does not open the native macOS file picker.

This appears to affect the embedded WKWebView file picker bridge for HTML <input type="file">, rather than the upload API itself.

Steps to reproduce

  1. Launch the OpenClaw macOS app.
  2. Open the embedded Control UI / Control console.
  3. Go to Personal Settings / identity settings.
  4. Click Choose image for the user or assistant avatar.
  5. Observe that no native macOS file picker opens.

Expected behavior

Clicking Choose image should open the native macOS file picker and allow the user to select an image file for the avatar.

Actual behavior

Clicking Choose image does nothing. No file picker appears, so the avatar image cannot be selected from the embedded Control UI.

Environment

  • App: OpenClaw macOS app
  • Version: 2026.6.8
  • Build: 844f405
  • Bundle ID: ai.openclaw.mac
  • OS: macOS 15 or later
  • UI: embedded Control UI inside the macOS app

Investigation notes

The Control UI uses standard file inputs for this feature, for example:

<input type="file" accept="image/*" hidden>

I checked the macOS app binary and found WKWebView / NSOpenPanel references. I also found WebKit navigation delegate methods such as:

webView:decidePolicyForNavigationAction:decisionHandler:
webView:didFinishNavigation:

However, I could not find evidence of the WKUIDelegate file-upload callback:

webView(_:runOpenPanelWith:initiatedByFrame:completionHandler:)

This suggests the embedded WKWebView that hosts the Control UI may be missing a WKUIDelegate implementation for HTML file inputs.

Possible fix

For the WebView controller that hosts the Control UI, set:

webView.uiDelegate = self

and implement:

func webView(
  _ webView: WKWebView,
  runOpenPanelWith parameters: WKOpenPanelParameters,
  initiatedByFrame frame: WKFrameInfo,
  completionHandler: @escaping ([URL]?) -> Void
) {
  let panel = NSOpenPanel()
  panel.canChooseFiles = true
  panel.canChooseDirectories = parameters.allowsDirectories
  panel.allowsMultipleSelection = parameters.allowsMultipleSelection

  panel.begin { result in
    completionHandler(result == .OK ? panel.urls : nil)
  }
}

Impact

Avatar image selection is blocked in the embedded macOS Control UI. Users must use another path, if available, to update avatar images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.bugSomething isn't workingclawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.regressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions