Skip to content

feat(wasm-viewer): restore Load Parquet upload affordance#920

Closed
thinkingfish wants to merge 1 commit into
iopsystems:mainfrom
thinkingfish:feat/wasm-load-parquet
Closed

feat(wasm-viewer): restore Load Parquet upload affordance#920
thinkingfish wants to merge 1 commit into
iopsystems:mainfrom
thinkingfish:feat/wasm-load-parquet

Conversation

@thinkingfish
Copy link
Copy Markdown
Member

Summary

The static-site WASM viewer's landing page exposed only Demos and Load URL — the dropzone wasn't wired (onFile handler missing) and the topnav Load Parquet button never appeared after a capture loaded (initDashboard was called without onUploadParquet). Both surfaces work in the server viewer; the WASM bootstrap was just missing the glue.

Add a single loadFile(file) helper in site/viewer/lib/script.js that reads the File's bytes and runs the existing loadParquet flow. Pass it as:

  • onFile on the FileUpload landing component → enables the drag-and-drop zone + the "Choose File" button on the landing page.
  • onUploadParquet into initDashboard → enables the topnav "Load Parquet" button after a capture is loaded.

Both surfaces share one handler. Drops ?demo / ?capture URL params on upload so a refresh doesn't fight the just-uploaded file.

Test plan

  • node --check site/viewer/lib/script.js clean
  • node --test tests/*.mjs — 82/82
  • Manual: load the static site, drag a parquet onto the dropzone → splash → dashboard. Then click topnav Load Parquet → file picker → another parquet replaces the loaded one.

🤖 Generated with Claude Code

The static-site WASM viewer's landing page exposed only Demos and Load
URL — the dropzone wasn't wired (no `onFile` handler) and the topnav
"Load Parquet" button never showed up after a capture loaded
(initDashboard was called without `onUploadParquet`). Both surfaces
work in the server viewer; the WASM bootstrap was just missing the
glue.

Add a single `loadFile(file)` helper in `site/viewer/lib/script.js`
that reads the File's bytes and runs the existing `loadParquet`
flow. Pass it as `onFile` on the FileUpload landing component AND as
`onUploadParquet` into `initDashboard`, so the same handler powers
the dropzone, the landing's Choose-File button, and the topnav button
once a capture is loaded. Drops `?demo` / `?capture` URL params on
upload so a refresh doesn't fight the just-uploaded file.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thinkingfish thinkingfish deleted the feat/wasm-load-parquet branch May 13, 2026 06:40
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