Skip to content

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

Merged
thinkingfish merged 1 commit into
iopsystems:mainfrom
thinkingfish:feat/wasm-load-parquet
May 13, 2026
Merged

feat(wasm-viewer): restore Load Parquet upload affordance#923
thinkingfish merged 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 (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 → enables the drag-and-drop zone + "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.

Re-opens the work from the previously-closed PR #920 with the same diff, rebased onto current main.

Test plan

  • node --check site/viewer/lib/script.js clean
  • cargo build --bin rezolus clean
  • Manual: load static site, drag parquet onto dropzone → splash → dashboard; topnav Load Parquet replaces the loaded capture; Load Selection appears once a parquet is loaded.

🤖 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 marked this pull request as ready for review May 13, 2026 06:44
@thinkingfish thinkingfish merged commit 5e0cc7b into iopsystems:main May 13, 2026
10 of 11 checks passed
@thinkingfish thinkingfish deleted the feat/wasm-load-parquet branch May 13, 2026 06:53
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