Skip to content

fix: file inputs in the app webview open a native picker (speaker upload) - #7

Open
Ryu1845 wants to merge 1 commit into
mainfrom
fix/app-native-file-input
Open

fix: file inputs in the app webview open a native picker (speaker upload)#7
Ryu1845 wants to merge 1 commit into
mainfrom
fix/app-native-file-input

Conversation

@Ryu1845

@Ryu1845 Ryu1845 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

…oads)

Ported from zonos1.cpp c4837ab — the same saucer gap exists here. saucer's
webviews implement no open-panel delegate on any platform (no
runOpenPanelWithParameters / run-file-chooser), so every HTML
<input type="file"> in the served web UI — the speaker audio and speaker
embedding uploads used for voice cloning — silently did nothing in zonos2-app:
clicking "choose file" showed no picker.

Inject a small script into every page load that intercepts clicks on file
inputs in the capture phase and routes them to a new exposed
pick_upload_files(multiple): native picker (saucer desktop, single or
multi-select), read the bytes, return [{name, b64}]. The shim decodes the
payload into File objects and sets them on the input via DataTransfer, then
dispatches a change event — the page's existing upload logic sees a normal
file selection. The web UI stays untouched (it must keep working in plain
browsers, where file inputs are fine).

Verified: ubuntu:24.04 container build green with the app download + segmented
smokes; the picker interaction itself needs a display, so verify by clicking
the speaker upload in the app.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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