Skip to content

feat(project-files): add cross-owner copy and bulk transfers - #9018

Merged
mzxchandra merged 5 commits into
stagingfrom
codex/project-files-bulk
Oct 15, 2026
Merged

mzxchandra merged 5 commits into
stagingfrom
codex/project-files-bulk

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Validation

  • 29 focused PostgreSQL content and authorization checks passed.
  • 41 focused app unit tests and 32 CLI tests passed; scoped TypeScript check passed.
  • 23 local app/relay HTTP and browser acceptance checks passed across delivery, rendered archives and cross-owner copy.
  • Regenerated API/CLI metadata after synchronization. Hosted CI must validate the new head.

Stack

#9015–#9017 are merged. This PR targets staging; #9019 and #9034 remain downstream and need synchronization after this PR lands.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 15, 2026 1:36am UTC

Request Review

@mzxchandra
mzxchandra force-pushed the codex/project-files-bulk branch from 6e3b83b to 3d4f3b0 Compare October 15, 2026 01:07
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

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

All reported issues were addressed across 68 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/projects/files/api/download-presenter.ts
Comment thread apps/sim/lib/projects/files/application/extract.ts
Comment thread apps/sim/lib/projects/files/application/downloads.ts
Comment thread apps/sim/lib/workspace-files/application/copy-file-items.ts
Comment thread apps/sim/lib/workspace-files/download-selection.ts
Comment thread apps/sim/lib/api/contracts/v2/openapi/files-audit.ts Outdated
Comment thread apps/sim/lib/workspace-files/limits.ts
Comment thread apps/sim/lib/workspace-files/archive-extraction.ts
Comment thread apps/sim/lib/workspace-files/application/download-workspace-file-items.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The reviewed changes appear safe to merge.

Summary

Adds copies between workspace and Project owners, bounded ZIP extraction, recursive downloads, and Markdown snapshot export.

  • Copied files get new identities in the destination owner.
  • Project file selections download as ZIP archives.
  • Markdown exports use the visible snapshot and its Project assets.
  • Project ZIP files unpack into a new sibling folder.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Copy request] --> B[Check source read and destination write access]
  B --> C[Capture selected files and folders]
  C --> D[Stage copied bytes]
  D --> E[Recheck access and source selection]
  E --> F[Create destination tree and update storage usage]
  F --> G[Return new identities and notify destination]
  E -->|Rejected| H[Discard staged bytes]
Loading

Reviews (4) · Last reviewed commit: "fix(files): recheck archive admission an..." · Reviewed by Greptile

Comment thread apps/sim/lib/workspace-files/copy.ts Outdated
Comment thread apps/sim/app/api/projects/[id]/files/download/route.ts
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

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

All reported issues were addressed

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/application/download-workspace-file-items.ts Outdated
Comment thread apps/sim/lib/workspace-files/copy.ts Outdated
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@mzxchandra I have started the AI code review. It will take a few minutes to complete.

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

All reported issues were addressed across 69 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/workspace-files/copy.ts
@mzxchandra
mzxchandra marked this pull request as ready for review October 15, 2026 01:47
@mzxchandra
mzxchandra merged commit e111f4f into staging Oct 15, 2026
54 checks passed
@mzxchandra
mzxchandra deleted the codex/project-files-bulk branch October 15, 2026 01:47
@mzxchandra

Copy link
Copy Markdown
Contributor Author

Post-deploy staging verification (October 14, Pacific), with Projects disabled: verified traffic cutover and serving image for e111f4f before testing.

PASS: workspace bulk ZIP source bytes/filenames, nested paths, ZIP delivery headers, authorized bodyless HEAD, unauthenticated GET/HEAD denial, unknown/mixed folder-path rejection, and unchanged original source hashes/metadata. Temporary synthetic subtree cleaned up; original fixtures preserved.

Workspace-to-workspace copy also requires Projects and correctly returned the disabled-feature response. Successful copy/reference rewriting and Project archive/snapshot/extraction are NOT RUN. Restricted-role policy checks, internal-session folder-ID/browser flows, and production are not covered. No flags or roles changed.

This branch was previously deployed

1 inactive deployment
Preview — 63fee573 Deployed Oct 15, 2026 by vercel[bot]
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