fix(macos): open NSOpenPanel for embedded Control UI file inputs (#94468)#94612
Conversation
|
Codex review: passed. Reviewed June 19, 2026, 1:31 AM ET / 05:31 UTC. Summary PR surface: Other +61. Total +61 across 3 files. Reproducibility: yes. at source level: current main renders the affected file inputs while the macOS Dashboard and Canvas WKWebViews lack WKUIDelegate open-panel handling. I did not rerun a before-fix packaged macOS app in this read-only review, but the after-fix screenshots show the real app path. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one canonical WKUIDelegate open-panel fix for the macOS embedded WebViews, preferably with focused Dashboard regression coverage, then close the linked issue and sibling PRs after merge. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main renders the affected file inputs while the macOS Dashboard and Canvas WKWebViews lack WKUIDelegate open-panel handling. I did not rerun a before-fix packaged macOS app in this read-only review, but the after-fix screenshots show the real app path. Is this the best way to solve the issue? Yes: WKUIDelegate open-panel handling is the WebKit boundary for macOS HTML file inputs, and touching both Dashboard and Canvas covers the relevant embedded WebView owners. The only improvement would be preserving focused regression coverage from the sibling branch. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 712e69dd7479. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Other +61. Total +61 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
7feebff to
4f477c4
Compare
|
@vincentkoc Hey Vincent, when you have a moment could you take a look? Thanks! |
|
/clownfish automerge |
|
Clownfish is on the reef for this PR. 🐠 I tagged A maintainer can call |
|
/clownfish automerge |
|
Clownfish is on the reef for this PR. 🐠 I tagged A maintainer can call |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
…nclaw#94468) (openclaw#94612) Summary: - The PR wires the macOS Dashboard and Canvas WKWebViews to WKUIDelegate and presents NSOpenPanel for HTML file inputs. - PR surface: Other +61. Total +61 across 3 files. - Reproducibility: yes. at source level: current main renders the affected file inputs while the macOS Dashboa ... fore-fix packaged macOS app in this read-only review, but the after-fix screenshots show the real app path. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head 4f477c4. - Required merge gates passed before the squash merge. Prepared head SHA: 4f477c4 Review: openclaw#94612 (comment) Co-authored-by: bbblending <li.mingkang@xydigit.com>
…nclaw#94468) (openclaw#94612) Summary: - The PR wires the macOS Dashboard and Canvas WKWebViews to WKUIDelegate and presents NSOpenPanel for HTML file inputs. - PR surface: Other +61. Total +61 across 3 files. - Reproducibility: yes. at source level: current main renders the affected file inputs while the macOS Dashboa ... fore-fix packaged macOS app in this read-only review, but the after-fix screenshots show the real app path. Automerge notes: - No ClawSweeper repair was needed after automerge opt-in. Validation: - ClawSweeper review passed for head 4f477c4. - Required merge gates passed before the squash merge. Prepared head SHA: 4f477c4 Review: openclaw#94612 (comment) Co-authored-by: bbblending <li.mingkang@xydigit.com>
Summary
WKUIDelegateon the macOS embedded Control UIWKWebViewso<input type="file">clicks (Personal Settings Choose image) open a nativeNSOpenPanelinstead of doing nothing.CanvasWindowControllerso canvas HTML pages with file inputs behave consistently.Motivation
Closes #94468.
DashboardWindowControllerhosts Control UI in aWKWebViewthat only setnavigationDelegate, notuiDelegate. WebKit routes file-input clicks throughWKUIDelegate.webView(_:runOpenPanelWith:initiatedByFrame:completionHandler:); without a UI delegate, the request is dropped and Choose image never opens a panel — matching the investigation on the issue.Verification
swift test --disable-keychain --filter DashboardWindowSmokeTests— 4 passedSKIP_PNPM_INSTALL=1 ALLOW_ADHOC_SIGNING=1 bash scripts/package-mac-app.shpnpm format:swift— 0 files require formattingEnvironment: macOS 26.x, Xcode 26.x / Swift 6.x, launchd gateway on
127.0.0.1:18789, branchfix/macos-file-picker@4f477c4ed0.Real behavior proof
<input type="file">) did not open the native file picker because the hostingWKWebViewhad noWKUIDelegate.dist/OpenClaw.appbuilt fromfix/macos-file-pickerat commit27f06198e3, launchd-managed local Gateway on127.0.0.1:18789.SKIP_PNPM_INSTALL=1 ALLOW_ADHOC_SIGNING=1 bash scripts/package-mac-app.shpnpm openclaw gateway install && pnpm openclaw gateway startopen dist/OpenClaw.app→ open DashboardWKWebViewand triggering it, the native macOS Open panel (NSOpenPanel) appears as expected.Risk checklist
WKUIDelegate/NSOpenPanelsheet presentation on Dashboard and Canvas windows