feat(file): pair the folder scope picker with a typed path field - #7457
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryThe PR pairs the File block’s folder picker with an advanced typed-path input while preserving canonical serialization of existing picker values.
Confidence Score: 5/5The PR appears safe to merge with no concrete correctness or security defects identified. Existing folder selections are canonicalized before File transforms run, both picker and execution resolve the active scope consistently, and the shared parser accepts the value shapes emitted by both input modes.
|
| Filename | Overview |
|---|---|
| apps/sim/blocks/blocks/file.ts | Introduces the canonical basic/advanced folder-scope pair and consistently consumes its canonical value in File operation transforms. |
| apps/sim/lib/folders/selection.ts | Extends folder-path parsing to comma-separated strings while preserving arrays, serialized arrays, deduplication, and encoded commas. |
| apps/sim/lib/workflows/subblocks/visibility.ts | Adds strict active-member canonical resolution for sibling controls that must not fall back to dormant values. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value.ts | Refactors canonical value subscription around a selectable resolver and exposes a strict active-value hook. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-upload/file-upload.tsx | Uses the strict canonical scope value so picker filtering matches the active folder input used at execution. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Folder scope field] --> B{Selected mode}
B -->|Basic| C[Multi-folder picker]
B -->|Advanced| D[Typed comma-separated paths]
C --> E[Canonical folderScopeRef]
D --> E
E --> F[readFolderPaths]
F --> G[File operation scope]
E --> H[Strict active scope resolver]
H --> I[Scoped file picker]
Reviews (1): Last reviewed commit: "feat(file): pair the folder scope picker..." | Re-trigger Greptile
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
manualFieldIdplumbing is gone.readFolderPathsaccepts a comma-separated list. Canonical paths percent-encode commas, so the separator is unambiguous.Type of Change
Testing
type-check(apps/sim),lint,check:audits,check-block-registry,docs-manifest:check, andcheck:api-validationall passChecklist
🤖 Generated with Claude Code