You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
view: check the browser engine's file limit before downloading a project #2072
This content was written by an AI agent and must be verified by a human developer. After human verification, this alert may be removed.
Found in the review of #2057, which adds the experimental view. It does not block that PR; #2059 fixed the findings that did. Paths refer to #2059's head.
Problem
web/view/src/repoProject.ts plans which files to download from GitHub. The browser engine accepts at most 16 files (MAX_PLAYGROUND_FILES in crates/graphcal-wasm/src/project.rs), but the page does not check the count before downloading.
It downloads every .gcl file under the project root, imported or not.
Without a manifest, the opened file's directory is the root. tests/fixtures/valid/ in this repository holds 185 .gcl files, including subdirectories. Without a token, that exhausts GitHub's limit of 60 requests an hour.
With a token, everything is downloaded, then the engine rejects the project.
For the total path length, Rust counts the entry's path and the page does not.
Proposed fix
Check the file count, manifest included, before downloading.
Export the limits from the Wasm engine so they are defined once.
Download only the package's source directory and the entry file's directory.
Activity
View: GitHub host fixes (#2090 lane B) (#2107)