Skip to content

feat(project-files): add public sharing and protected delivery - #9019

Merged
mzxchandra merged 6 commits into
stagingfrom
codex/project-files-sharing
Oct 15, 2026
Merged

mzxchandra merged 6 commits into
stagingfrom
codex/project-files-sharing

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Type of Change

  • Feature / refactor

Testing

  • 20 focused security unit tests and 10 disposable PostgreSQL sharing checks passed.
  • Scoped TypeScript and changed-file formatting checks passed; cleanup review found no changes needed.
  • 34 local HTTP/source-adapter checks passed: public delivery and credentials (22), sharing policy (7), and inline isolation/cache behavior (5). Hosted CI and bot reviews pending.
  • Pre-deploy synthetic public/disabled share fixtures prepared; post-promotion verification pending. Projects remains disabled on shared staging.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Focused tests added/updated and passing
  • Full hosted CI passed
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@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 4:02am UTC

Request Review

@mzxchandra
mzxchandra force-pushed the codex/project-files-sharing branch from f7da653 to 8e82431 Compare October 15, 2026 02: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 52 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/public-shares/application/read.ts
Comment thread apps/sim/lib/public-shares/application/owner-adapters.ts Outdated
Comment thread apps/sim/app/api/files/public/[token]/inline/route.ts Outdated
Comment thread apps/sim/app/api/files/public/[token]/route.ts
Comment thread apps/sim/scripts/test-project-file-public-e2e.ts Outdated
Comment thread apps/sim/scripts/test-project-file-inline-source-e2e.ts
Comment thread apps/sim/lib/public-shares/application/credentials.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 changes since the last review appear safe to merge.

Summary

Adds Project file sharing and a shared authorization path for public file delivery.

  • Project files can be shared and unshared through the APIs and CLI.
  • Share links ask for the access proof their owner selected.
  • Shared files deliver current owner-scoped bytes and embedded images.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Public file request] --> B[Check current share credentials]
  B --> C[Create short-lived grant]
  C --> D[Check owner and file]
  D --> E[Read stored bytes or cached document]
  E --> F[Recheck share, file, and referenced assets]
  F --> G[Return bytes]
Loading

Reviews (3) · Last reviewed commit: "test(project-files): explicitly retire f..." · Reviewed by Greptile

Comment thread apps/sim/lib/projects/files/application/shares.ts
Comment thread apps/sim/lib/public-shares/application/read.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.

1 issue found across 52 files

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

Turn on auto-fix | Re-trigger cubic

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/lib/projects/files/__integration__/content-sharing.integration.ts">

<violation number="1" location="apps/sim/lib/projects/files/__integration__/content-sharing.integration.ts:930">
P2: Project-bound shares have no foreign key to the Project or file, so this teardown leaves their active rows behind. Delete the Project's `publicShare` rows here to keep the integration database clean.</violation>
</file>

Comment thread apps/sim/scripts/test-project-file-public-e2e.ts
@mzxchandra
mzxchandra marked this pull request as ready for review October 15, 2026 03:58

@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 52 files

Turn on auto-fix | Re-trigger cubic

@mzxchandra
mzxchandra merged commit 02cd2f6 into staging Oct 15, 2026
52 checks passed
@mzxchandra
mzxchandra deleted the codex/project-files-sharing branch October 15, 2026 04:12
@mzxchandra

Copy link
Copy Markdown
Contributor Author

Post-deploy staging verification passed for the five preserved workspace-share fixtures on October 14 (Pacific), with Projects disabled. Verified HTTPS traffic cutover and running-image correspondence to merge 02cd2f6206bb9af8d8b95e983de5dab9718e09c8. Share identity/protection and stored-content continuity passed; public revocation/re-enable, protected anonymous denials, valid password-cookie access, cross-share denial, and revoked-cookie denial passed. Fixture modes were restored and fixtures retained; the synthetic password was rotated and discarded.

Not covered: successful email/SSO login, old-cookie continuity, native browser interaction, Office/raster artifacts, rate-limit exhaustion, Project-enabled paths, or production. The exact predeployment serving SHA was not established.

This branch was previously deployed

1 inactive deployment
Preview — 4d685cfc 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