Problem
Today, src/webview-preload.js listens for file-drop and logs file paths but does not actually trigger NotebookLM's upload pipeline. Constructing a synthetic file-drop DataTransfer event across the webview security boundary is not straightforward — File objects with real bytes are needed by NotebookLM's dropzone.
NotebookLM's native dropzone DOES accept drops, but only when the user drops directly onto NotebookLM's dropzone region — not when they drop anywhere on the window.
Proposed approach
A few options worth exploring:
- Read file → construct File via fetch: From the webview, fetch a
file:// URL of the dropped path, build a File from the response Blob, dispatch a synthetic drop on NotebookLM's dropzone. Investigate whether webview security allows file:// reads.
- Auto-click NotebookLM's "+ Add source" + invoke
<input type=file>: Locate the file input via DOM selectors and set its .files via DataTransfer. Selector stability is the risk.
- Forward to system clipboard + paste: Last-resort fallback for image files.
Files to touch
src/webview-preload.js — file-drop handler
src/renderer.js — pass file paths (already done)
src/main.js — may need a file-read helper exposed via IPC
Acceptance criteria
- Dropping a PDF anywhere on the window produces the same outcome as dropping it on NotebookLM's dropzone.
- Gracefully falls back to a "drop on the central area" toast if the upload fails.
- Works for PDF, TXT, Markdown at minimum.
Problem
Today,
src/webview-preload.jslistens forfile-dropand logs file paths but does not actually trigger NotebookLM's upload pipeline. Constructing a synthetic file-drop DataTransfer event across the webview security boundary is not straightforward —Fileobjects with real bytes are needed by NotebookLM's dropzone.NotebookLM's native dropzone DOES accept drops, but only when the user drops directly onto NotebookLM's dropzone region — not when they drop anywhere on the window.
Proposed approach
A few options worth exploring:
file://URL of the dropped path, build aFilefrom the response Blob, dispatch a synthetic drop on NotebookLM's dropzone. Investigate whether webview security allowsfile://reads.<input type=file>: Locate the file input via DOM selectors and set its.filesviaDataTransfer. Selector stability is the risk.Files to touch
src/webview-preload.js— file-drop handlersrc/renderer.js— pass file paths (already done)src/main.js— may need a file-read helper exposed via IPCAcceptance criteria