Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Allows filesystem browsing with paths up to 4096 characters instead of 512. Existing read-only browsing behavior and validation safeguards remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
cdc237e to
a271d53
Compare
Dismissing prior approval to re-evaluate a271d53
# Conflicts: # packages/contracts/src/filesystem.test.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate 0cfddb6
EvidenceEnvironment: Linux, real web app in Chromium, 1280×800, light theme, fresh per-commit databases and synthetic data. On each commit, created the same synthetic directory tree with three 180-character components (a, b, c) and a child directory. Seeded a demo project and Replay thread on a fresh database; opened the thread, then Projects → Add project → Local folder. Filled the short root path and waited for a; filled the path through b and waited for c; filled the full path through c with trailing slash (593 characters), then checked for child and captured the picker. Base showed only '..' and 'Create & Add'; head showed '..', 'child', and 'Add'. Scenario: An existing deep directory lists its child in the local folder pickerProven: the scenario fails on base 33369749ea and passes on head 0cfddb6621.
Not shown:
|



Problem
FilesystemBrowseInputcaps bothpartialPathandcwdat 512 characters (FILESYSTEM_PATH_MAX_LENGTH = 512), so the folder picker cannot list an existing directory whose absolute path exceeds 512 characters even though each component and the full path fit filesystem limits and workspace file contracts already allow 4096 characters.Deterministic repro on
origin/main(1b5100705afe81f5729f405183dfe678fcbe38a9)Create an isolated temporary directory with three nested 180-character ASCII
xsegments and achilddirectory inside the deepest folder:Call
filesystem.browse(or paste"$DEEPEST/"into the web/mobile folder picker, which sendsWS_METHODS.filesystemBrowsewith{ partialPath: "$DEEPEST/" }, length ~570). The RPC payload schemaFilesystemBrowseInputinpackages/contracts/src/filesystem.tsruns beforeapps/server/src/ws.tsdispatches toWorkspaceEntries.browse.FilesystemBrowseInputrejects the request withSchemaError: Expected a value with a length of at most 512 at ["partialPath"]beforeWorkspaceEntries.browseruns (even though callingWorkspaceEntries.browsedirectly with the same input lists["child"]).WorkspaceEntries.browse, and returnsentries: [{ name: "child", ... }]withparentPath === deepest.Change
Introduce
FILESYSTEM_BROWSE_PATH_MAX_LENGTH = 4096inpackages/contracts/src/filesystem.tsand apply it topartialPathandcwdonFilesystemBrowseInput, matchingPROJECT_FILE_PATH_MAX_LENGTHinpackages/contracts/src/project.tswhile leavingFilesystemGetMetadataInputunchanged. Web (CommandPalette,ProjectRepositoriesSettings), mobile (AddProjectScreen),packages/client-runtime/src/state/filesystem.ts, andWorkspaceEntries.browsehave no separate 512-character cap, so updating the shared contract unblocks all folder pickers and direct WS RPC callers.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
1b5100705afe81f5729f405183dfe678fcbe38a9): The new regression test inpackages/contracts/src/filesystem.test.tsfailed withSchemaError: Expected a value with a length of at most 512 at ["partialPath"], and the on-disk runtime repro rejected the 570-characterpartialPathatFilesystemBrowseInputwhile directWorkspaceEntries.browselisted["child"].676b0f126b8e841bf444c91ef6059292052e36d6):vp test run packages/contracts/src/filesystem.test.tspassed (3/3 tests, covering a >512-char path, a 4096-char boundary path, and rejecting 4097-charpartialPath/cwd), the on-disk runtime repro decoded the 570-character input and listed["child"]withparentPath === deepest, andvp run check:changedexited0(format,lint,knip,typecheckacross 39 packages, and 2 affected test files / 5 passed).\\?\) behavior.Authored by Gemini 4 Neon (Antigravity); reviewed by GPT-6.2 Sol (Codex).
Not shown