Skip to content

Fix file drag-and-drop and file input in browser panel - #214

Merged
austinywang merged 9 commits into
mainfrom
manaflow/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq
Feb 21, 2026
Merged

austinywang merged 9 commits into
mainfrom
manaflow/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq

Conversation

@austinywang

Copy link
Copy Markdown
Contributor

Summary

  • File drag-and-drop from Finder: CmuxWebView previously suppressed ALL drag type registration (no-op) to prevent bonsplit tab drags from being intercepted by the WKWebView. Now it selectively filters out only the text-based types (public.text, public.utf8-plain-text, public.plain-text) and custom bonsplit tab transfer types, while allowing file URL types through so Finder drops reach the web content.
  • File <input> elements: Added webView(_:runOpenPanelWith:initiatedByFrame:completionHandler:) to BrowserUIDelegate (WKUIDelegate) so clicking a file input opens the native macOS file picker (NSOpenPanel), with support for multiple selection and directory picking.

Closes #194

Test plan

  • Drag a file from Finder into a browser panel that accepts file drops (e.g. a file upload page) — verify the drop is accepted
  • Click a <input type="file"> element in the browser panel — verify the native file picker opens
  • Test multi-file selection with <input type="file" multiple>
  • Verify bonsplit tab dragging still works correctly (tabs can be reordered and moved between panes without WKWebView intercepting the drag)

🤖 Generated with Claude Code

Two fixes for the browser panel:

1. File drag-and-drop from Finder: CmuxWebView previously suppressed ALL
   drag type registration as a no-op to prevent bonsplit tab drags from
   being intercepted. Now it selectively filters out only the text-based
   types that conflict with bonsplit (public.text, public.utf8-plain-text,
   public.plain-text) and the custom tab transfer types, while allowing
   file URL types through so Finder drops work.

2. File <input> elements: Added the WKUIDelegate runOpenPanelWith method
   to BrowserUIDelegate so clicking a file input opens the native macOS
   file picker (NSOpenPanel), with support for multiple selection and
   directory picking as specified by the HTML element.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 15da94a.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

@vercel

vercel Bot commented Feb 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cmux Ready Ready Preview, Comment Feb 21, 2026 2:26am

@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 6529cc0.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

…low/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq
@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 716554d.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

…low/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq
@cmux-agent

cmux-agent Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 97a4e77.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

…low/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq
@cmux-agent

cmux-agent Bot commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit e3124de.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

@cmux-agent

cmux-agent Bot commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 3a65fb9.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

…low/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq
@cmux-agent

cmux-agent Bot commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 52d99d6.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

@cmux-agent

cmux-agent Bot commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor
Older manaflow preview screenshots (latest comment is below)

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 1195a64.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

…low/take-a-look-at-https-github-com-manaflow-ai-cmux-i-nmcrq
@cmux-agent

cmux-agent Bot commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview Videos and Screenshots

Open Workspace (1 hr expiry) · Open Dev Browser (1 hr expiry) · Open Diff Heatmap

Failed to capture screenshots for commit 37d9f90.

Claude Code native binary not found at /root/.bun/bin/claude. Please ensure Claude Code is installed via native installer or specify a valid path with options.pathToClaudeCodeExecutable.


Generated by manaflow preview system

@austinywang
austinywang merged commit 0443175 into main Feb 21, 2026
3 of 5 checks passed
bn-l pushed a commit to bn-l/cmux that referenced this pull request Apr 3, 2026
* Fix file drag-and-drop and file input in browser panel (manaflow-ai#194)

Two fixes for the browser panel:

1. File drag-and-drop from Finder: CmuxWebView previously suppressed ALL
   drag type registration as a no-op to prevent bonsplit tab drags from
   being intercepted. Now it selectively filters out only the text-based
   types that conflict with bonsplit (public.text, public.utf8-plain-text,
   public.plain-text) and the custom tab transfer types, while allowing
   file URL types through so Finder drops work.

2. File <input> elements: Added the WKUIDelegate runOpenPanelWith method
   to BrowserUIDelegate so clicking a file input opens the native macOS
   file picker (NSOpenPanel), with support for multiple selection and
   directory picking as specified by the HTML element.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore(claude-opus-4-6): take a look at https://github.com/manaflow-ai/cmux/issues...

* ok

* wok

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 37d9f901 Deployed Feb 21, 2026 by vercel[bot]
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.

Dragging files into browser view doesn't work

1 participant