feat(project-files): add rendered delivery and indexed search by mzxchandra · Pull Request #9017 · simstudioai/sim · GitHub
Skip to content

feat(project-files): add rendered delivery and indexed search - #9017

Merged
mzxchandra merged 8 commits into
stagingfrom
codex/project-files-rendering
Oct 15, 2026
Merged

mzxchandra merged 8 commits into
stagingfrom
codex/project-files-rendering

Conversation

@mzxchandra

@mzxchandra mzxchandra commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add authorized Project file rendering, inline content, previews, and indexed search.
  • Recheck current owner access, source revisions, and embedded-file identities before delivering rendered bytes. Preserve provenance and invalidate compiled artifacts when their inputs change.
  • Apply opaque/excerpt admission before reading and after revalidation; withhold stale search previews. Failed reads preserve shared deterministic render caches.
  • Rebase the rendering/search slice onto staging after feat(project-files): add core storage and realtime operations #9016, retaining streaming source downloads and buffered previews. Keep Project API/CLI documentation unpublished until launch.

Type of Change

  • Feature / refactor

Testing

  • Latest repair: 85 focused database integration checks and 66 unit tests passed, covering observer refusal, private CLI provenance round trips, registry admission, and HEAD without compilation. Earlier focused delivery/search/cache checks also passed.
  • Prior real-app delivery/rendering run: 15 checks passed, including browser cache reuse, authenticated HEAD, DOCX/PPTX/PDF rendering, asset-revision cache invalidation, and foreign/archived dependency rejection.
  • Scoped type check introduced no errors beyond the existing test baseline. Scoped formatting and strict API validation passed.
  • Pre-deployment source fixtures prepared and verified; post-deployment staging validation remains pending. Full repository checks run in hosted CI.

Checklist

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

Review stack

#9015 and #9016 are merged. This PR contains only rendering/search and targets staging. #9018 adds bulk transfers; #9019 adds sharing. Rebase each following slice after its parent merges. #8610 is superseded by this stack.

@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

@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 14, 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/read-workspace-inline-file.ts Outdated
Comment thread apps/sim/lib/projects/files/application/search.ts Outdated
Comment thread apps/sim/lib/workspace-files/application/download-workspace-file.ts Outdated
Comment thread apps/sim/lib/projects/files/application/artifacts.ts Outdated
Comment thread apps/sim/lib/workspace-files/application/file-versions.ts
Comment thread apps/sim/lib/workspace-files/page-compile.ts
Comment thread apps/sim/lib/uploads/documents/compiled-store.ts Outdated
Comment thread apps/sim/lib/uploads/utils/file.server.ts Outdated
Comment thread apps/sim/app/api/files/serve/[...path]/route.ts Outdated
Comment thread apps/sim/scripts/test-file-delivery-e2e.ts Outdated
@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge based on the reviewed changes.

Summary

Adds authorized Project file rendering, inline delivery, CSV previews, and indexed search.

  • Project files can be delivered as rendered documents and image previews.
  • Project inline files and CSV previews use owner-checked routes.
  • Project file search returns matches with index coverage.
  • Embedded file links resolve under their Project or workspace owner.
  • Workspace file delivery rechecks access and revisions before sending bytes.
  • Workbench downloads keep file provenance without exposing opaque bytes to the model.
  • Build checks and sandbox support change without altering file behavior.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[File request] --> B[Check current access]
  B --> C[Read source and identify inputs]
  C --> D[Read authorized inputs]
  D --> E[Render or reuse cached bytes]
  E --> F[Recheck access and file revisions]
  F --> G[Check content admission]
  G --> H[Return bytes and provenance]
Loading

Reviews (5) · Last reviewed commit: "test(files): guard required document for..." · Reviewed by Greptile

Comment thread apps/sim/lib/projects/files/application/search.ts Outdated
Comment thread apps/sim/app/api/files/serve/[...path]/route.ts
Comment thread apps/sim/lib/projects/files/application/artifacts.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 14, 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 80 files

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

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/projects/files/application/previews.ts Outdated
Comment thread apps/sim/app/api/files/serve/[...path]/route.ts
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 14, 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.

Comment thread apps/sim/lib/uploads/documents/compile.ts Outdated
@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.

@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

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

You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Turn on auto-fix | Re-trigger cubic

Comment thread apps/sim/lib/uploads/documents/compile.ts Outdated
Comment thread apps/sim/lib/projects/files/__integration__/content-rendered.integration.ts Outdated
@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.

@mzxchandra
mzxchandra force-pushed the codex/project-files-rendering branch from 46eef76 to 8fc8b2e Compare October 15, 2026 00:31
@mzxchandra

Copy link
Copy Markdown
Contributor Author

@greptile

@mzxchandra
mzxchandra marked this pull request as ready for review October 15, 2026 00:45

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

Confidence score: 5/5

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

Turn on auto-fix | Re-trigger cubic

@mzxchandra
mzxchandra merged commit 219b292 into staging Oct 15, 2026
53 checks passed
@mzxchandra
mzxchandra deleted the codex/project-files-rendering branch October 15, 2026 00:59
@mzxchandra

mzxchandra commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

This branch was successfully deployed

1 active deployment
Preview — 8fc8b2e4 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