Skip to content

feat(file): pair the folder scope picker with a typed path field - #7457

Merged
icecrasher321 merged 1 commit into
stagingfrom
staging-v102
Sep 3, 2026
Merged

feat(file): pair the folder scope picker with a typed path field#7457
icecrasher321 merged 1 commit into
stagingfrom
staging-v102

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

  • File block: the folder scope on Read, Get Content, Search, Append, Apply Edit, and Compress is now a basic/advanced pair, so a scope can be picked or typed as comma-separated canonical paths, including a reference from an earlier block such as a per-user memory folder. Every folder field on the block now has the switch.
  • The file picker resolves the pair's active half through a new strict canonical-value hook that honors the per-field toggle, so it never narrows by a dormant half's stale value. The unused manualFieldId plumbing is gone.
  • readFolderPaths accepts a comma-separated list. Canonical paths percent-encode commas, so the separator is unambiguous.
  • Saved workflows are unaffected: picker values keep their key and resolve to basic mode when no override is set.

Type of Change

  • New feature

Testing

  • type-check (apps/sim), lint, check:audits, check-block-registry, docs-manifest:check, and check:api-validation all pass
  • Added tests for a typed comma-separated scope on read, search, and edit, the legacy JSON-array value, strict active-half resolution versus the dependency fallback, and comma splitting in the shared reader
  • Related suites (subblocks, folders, serializer, params, forking, editor hooks) pass: 72 files, 1445 tests

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Sep 3, 2026 9:30pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR pairs the File block’s folder picker with an advanced typed-path input while preserving canonical serialization of existing picker values.

  • Adds comma-separated canonical folder-path parsing and supports legacy JSON-array values.
  • Adds strict active-half resolution so file pickers use the same folder scope as execution.
  • Updates File block configuration, parameter transforms, documentation, and coverage for read, search, edit, append, and compress flows.

Confidence Score: 5/5

The 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.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "feat(file): pair the folder scope picker..." | Re-trigger Greptile

@icecrasher321
icecrasher321 merged commit 389eea4 into staging Sep 3, 2026
31 checks passed
@icecrasher321
icecrasher321 deleted the staging-v102 branch September 3, 2026 21:33
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