feat: adapt trajectory visualizer to work with results.tar.gz from OpenHands Index#36
Draft
juanmichelini wants to merge 13 commits intomainfrom
Draft
feat: adapt trajectory visualizer to work with results.tar.gz from OpenHands Index#36juanmichelini wants to merge 13 commits intomainfrom
juanmichelini wants to merge 13 commits intomainfrom
Conversation
…enHands Index - Added archive-extractor utility for extracting tar.gz archives containing output.jsonl - Added support for full_archive file type in upload types - Integrated archive extraction into App.tsx with support for ?full_archive URL parameter - Added support for ?fileUrl pointing to archive URLs - Updated RunDetails component to handle full_archive JSONL viewer - Added comprehensive tests for archive extraction - Added tar-stream, pako dependencies for client-side archive extraction - Fixed TypeScript build error in archive-extractor (tar-stream types)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The tar-stream library brings in Node.js dependencies (events-universal) that cause issues in Vercel's edge runtime. Rewrote the tar parsing logic to use native browser APIs (TextDecoder, Uint8Array) without external dependencies. This reduces bundle size and fixes the blank page issue on Vercel preview deployments.
- Added /api/extract endpoint that fetches and extracts tar.gz on server - Updates frontend to use the API instead of client-side fetching - Bypasses CORS restrictions for external URLs
df8d81b to
cfc26f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adapts the trajectory visualizer to work with
results.tar.gzarchives from OpenHands Index. The archive extraction feature allows users to:?full_archive=<url>to load and extract tar.gz archives containingoutput.jsonlandoutput.report.jsonfiles?fileUrl=points to a.tar.gzor.tgzfile, the app automatically extracts and processes the contentsChanges
New Files
src/utils/archive-extractor.ts- Utility for extracting tar.gz archives using pako (gzip decompression) and tar-stream (tar parsing)src/utils/__tests__/archive-extractor.test.ts- Comprehensive tests for archive extraction functionalityModified Files
src/App.tsx- Addedfull_archiveparameter handling and archive URL detection, with loading/error statessrc/components/RunDetails.tsx- Added support forfull_archivefile type to render JSONL viewersrc/types/upload.ts- AddedFullArchiveUploadContentinterfacepackage.json/package-lock.json- Added dependencies:tar-stream,pako,@types/tar-stream,@types/pakoTechnical Details
The archive extraction is performed client-side using:
output.jsonlandoutput.report.jsonfiles within the archiveUsage Example
Or with a file URL that points to an archive:
@juanmichelini can click here to continue refining the PR