René's URL Explorer Experiment


Title: fix(files): serve rendered documents instead of source code by j15z · Pull Request #6139 · simstudioai/sim · GitHub

Open Graph Title: fix(files): serve rendered documents instead of source code by j15z · Pull Request #6139 · simstudioai/sim

X Title: fix(files): serve rendered documents instead of source code by j15z · Pull Request #6139 · simstudioai/sim

Description: Summary Route readUserFileContent through the existing servable-file resolver so Agent and workflow file reads receive a generated document's compiled artifact instead of its editable source Derive artifact workspace IDs from both workspace and execution storage keys so workflow-scoped generated files resolve the same compiled artifact Treat internal generation-source MIME markers such as text/x-python-pdf as storage metadata and infer the provider-facing MIME from the filename Use the rendered artifact's byte count for inline-vs-provider-upload routing, and never send editable source through a remote-URL attachment path Preserve the retryable "still generating" error when an artifact is not ready and refuse the remaining XLSX raw-source fallback Keep the existing write-time compilation and artifact lifecycle unchanged; this PR does not add render-on-read or new caches Pairs with simstudioai/mothership#385, which propagates DocCompiler to the file subagent's provider request so load_skill can expose Python document skills. The two changes are independent to deploy. Type of Change Bug fix Testing 49 focused tests passing across generated-document resolution, storage-key derivation, materialization, base64 hydration, and provider attachments Full Sim TypeScript check passing Lint and the full audit suite passing (check:boundaries, check:api-validation:strict, check:utils, check:zustand-v5, check:react-query, check:client-boundary, check:bare-icons, check:icon-paths, check:realtime-prune, skills:check, agent-stream-docs:check) No migrations in this change 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)

Open Graph Description: Summary Route readUserFileContent through the existing servable-file resolver so Agent and workflow file reads receive a generated document's compiled artifact instead of its editable source D...

X Description: Summary Route readUserFileContent through the existing servable-file resolver so Agent and workflow file reads receive a generated document's compiled artifact instead of its editable sour...

Opengraph URL: https://github.com/simstudioai/sim/pull/6139

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:af84148a-e753-3c2e-0f62-80f1a734ca25
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDAE6:1EC912:5E6966:86213C:6AFB4401
html-safe-nonce15a4ba09c40a525eba80c7e150a57541fecfa44087087ab0016706c1fb109552
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUU2OjFFQzkxMjo1RTY5NjY6ODYyMTNDOjZBRkI0NDAxIiwidmlzaXRvcl9pZCI6IjMyNDQwMzUzMDIwNzQ1NjU2MzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac602ce280a4e707b59e87da721125acae5ff6afd5ff719fb01ccac6dbee2c3b02
hovercard-subject-tagpull_request:4181491996
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6139/files
twitter:imagehttps://avatars.githubusercontent.com/u/96924014?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/96924014?s=400&v=4
og:image:altSummary Route readUserFileContent through the existing servable-file resolver so Agent and workflow file reads receive a generated document's compiled artifact instead of its editable source D...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6139/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6139%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6139%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6139/files
Reloadhttps://github.com/simstudioai/sim/pull/6139/files
Reloadhttps://github.com/simstudioai/sim/pull/6139/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
j15zhttps://github.com/j15z
staginghttps://github.com/simstudioai/sim/tree/staging
agent-block-file-issuehttps://github.com/simstudioai/sim/tree/agent-block-file-issue
Conversation 69 https://github.com/simstudioai/sim/pull/6139
Commits 13 https://github.com/simstudioai/sim/pull/6139/commits
Checks 29 https://github.com/simstudioai/sim/pull/6139/checks
Files changed https://github.com/simstudioai/sim/pull/6139/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
fix(files): serve rendered documents instead of source code https://github.com/simstudioai/sim/pull/6139/files#top
Show all changes 13 commits https://github.com/simstudioai/sim/pull/6139/files
ee582e0 fix(files): serve rendered documents to attachments and workflow reads j15z Jul 31, 2026 https://github.com/simstudioai/sim/pull/6139/commits/ee582e008f1d5280ddac5569a54eb7b13d8e26db
c2214f0 fix(files): keep render failures retryable and never relabel unrender… j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/c2214f0a81e47a978a765f37bd3d88a50806a76f
6a72bba perf(files): coalesce concurrent renders of the same missing artifact j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/6a72bba8a2cc6e54519c6672aa4a7d19a9855606
abe134a fix(files): refuse unrendered bytes at the download boundary j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/abe134a002270ac1278eaa4e13e053e3ff7caff0
78c16ec fix(files): move the unrenderable error out of the 'use server' module j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/78c16ec53f8eb4674bab49cecde0ee4a5d44ae62
5d3107f fix(files): finish the render cancellation and failure-surfacing edges j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/5d3107fca7b97927bd38918311c251792d8f5b21
1270bcb revert(files): drop the concurrent-render coalescing j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/1270bcb4eb393cab1f50ab5a44917596b84f5d2c
a98f272 fix(review): simplify generated document attachments j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/a98f272412293d47c16e09b6ff873ad17b039cc0
b9060e1 fix(files): mock servable downloads in hydration tests j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/b9060e1609dafb87396e1ac958142374329515d7
e3d3ba5 fix(files): preserve rendered attachment semantics j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/e3d3ba55b3b8ef5cc58ae2eea2a9f18e14a7b290
acf9397 fix(files): preserve cached artifact size j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/acf93970e86019f918b831327fc0444d7d494fd7
f5ef0eb fix(files): refuse unresolved xlsx source j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/f5ef0eb422eccfdce6b3e6854b0e9567d201cc3e
cb21c93 fix(files): resolve execution artifact workspace j15z Aug 1, 2026 https://github.com/simstudioai/sim/pull/6139/commits/cb21c93da77408cc11106fe6cecc6862e6fdcd0f
Clear filters https://github.com/simstudioai/sim/pull/6139/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
doc-compile.ts https://github.com/simstudioai/sim/pull/6139/files#diff-b744bbfdd06f81c703753596e7e7e90c15997083a6cadc23f0fc2031f6d63a70
doc-servable.test.ts https://github.com/simstudioai/sim/pull/6139/files#diff-f053c1d08e53539171c87f319fcd9671b674a48fee10f7233293cb7ed0de1081
materialization.server.test.ts https://github.com/simstudioai/sim/pull/6139/files#diff-ee5d3b6aac3e3c5faccbd2f6a8fe7fa66c47a3b54fa650712a6ef99ba0bc5a1b
materialization.server.ts https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
file-utils.server.test.ts https://github.com/simstudioai/sim/pull/6139/files#diff-637971eb2be5d28173a2ee83de689fa941b24546954c7b60df4fbc86578f5e87
file-utils.server.ts https://github.com/simstudioai/sim/pull/6139/files#diff-56073f04957682936465d04d9660e33d45b8f6151b8ce0947b9cfd6ad3e3533e
user-file-base64.server.test.ts https://github.com/simstudioai/sim/pull/6139/files#diff-d2345ea611d08c6751278adfe1b70e9013a5698bbcafd6fff8f0f7d84ad66dcb
user-file-base64.server.ts https://github.com/simstudioai/sim/pull/6139/files#diff-df6aa2815c3351b752a7e2ae94c7769597ae4291706c82f4bd4138969a389f02
attachments.test.ts https://github.com/simstudioai/sim/pull/6139/files#diff-cda20ba4e1415b206775aee96b5331c62df2ee1c39f9a8025de0c083c48a0ca6
attachments.ts https://github.com/simstudioai/sim/pull/6139/files#diff-b4a00becad44846eb2725595c690d0c3c872244a6ee3fc773d5bc9724913ae02
apps/sim/lib/copilot/tools/server/files/doc-compile.tshttps://github.com/simstudioai/sim/pull/6139/files#diff-b744bbfdd06f81c703753596e7e7e90c15997083a6cadc23f0fc2031f6d63a70
View file https://github.com/simstudioai/sim/blob/cb21c93da77408cc11106fe6cecc6862e6fdcd0f/apps/sim/lib/copilot/tools/server/files/doc-compile.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6139/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6139/files#diff-b744bbfdd06f81c703753596e7e7e90c15997083a6cadc23f0fc2031f6d63a70
https://github.com/simstudioai/sim/pull/6139/files#diff-b744bbfdd06f81c703753596e7e7e90c15997083a6cadc23f0fc2031f6d63a70
apps/sim/lib/copilot/tools/server/files/doc-servable.test.tshttps://github.com/simstudioai/sim/pull/6139/files#diff-f053c1d08e53539171c87f319fcd9671b674a48fee10f7233293cb7ed0de1081
View file https://github.com/simstudioai/sim/blob/cb21c93da77408cc11106fe6cecc6862e6fdcd0f/apps/sim/lib/copilot/tools/server/files/doc-servable.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6139/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6139/files#diff-f053c1d08e53539171c87f319fcd9671b674a48fee10f7233293cb7ed0de1081
https://github.com/simstudioai/sim/pull/6139/files#diff-f053c1d08e53539171c87f319fcd9671b674a48fee10f7233293cb7ed0de1081
apps/sim/lib/execution/payloads/materialization.server.test.tshttps://github.com/simstudioai/sim/pull/6139/files#diff-ee5d3b6aac3e3c5faccbd2f6a8fe7fa66c47a3b54fa650712a6ef99ba0bc5a1b
View file https://github.com/simstudioai/sim/blob/cb21c93da77408cc11106fe6cecc6862e6fdcd0f/apps/sim/lib/execution/payloads/materialization.server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6139/{{ revealButtonHref }}
apps/sim/lib/execution/payloads/materialization.server.tshttps://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
View file https://github.com/simstudioai/sim/blob/cb21c93da77408cc11106fe6cecc6862e6fdcd0f/apps/sim/lib/execution/payloads/materialization.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6139/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
https://github.com/simstudioai/sim/pull/6139/files#diff-a1e3fcedf46279b15241e2869d350e5e52854d3ea6423a9da53110e2fee7523f
apps/sim/lib/uploads/utils/file-utils.server.test.tshttps://github.com/simstudioai/sim/pull/6139/files#diff-637971eb2be5d28173a2ee83de689fa941b24546954c7b60df4fbc86578f5e87
View file https://github.com/simstudioai/sim/blob/cb21c93da77408cc11106fe6cecc6862e6fdcd0f/apps/sim/lib/uploads/utils/file-utils.server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6139/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6139/files#diff-637971eb2be5d28173a2ee83de689fa941b24546954c7b60df4fbc86578f5e87
https://github.com/simstudioai/sim/pull/6139/files#diff-637971eb2be5d28173a2ee83de689fa941b24546954c7b60df4fbc86578f5e87
apps/sim/lib/uploads/utils/file-utils.server.tshttps://github.com/simstudioai/sim/pull/6139/files#diff-56073f04957682936465d04d9660e33d45b8f6151b8ce0947b9cfd6ad3e3533e
View file https://github.com/simstudioai/sim/blob/cb21c93da77408cc11106fe6cecc6862e6fdcd0f/apps/sim/lib/uploads/utils/file-utils.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6139/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6139/files#diff-56073f04957682936465d04d9660e33d45b8f6151b8ce0947b9cfd6ad3e3533e
https://github.com/simstudioai/sim/pull/6139/files#diff-56073f04957682936465d04d9660e33d45b8f6151b8ce0947b9cfd6ad3e3533e
https://github.com/simstudioai/sim/pull/6139/files#diff-56073f04957682936465d04d9660e33d45b8f6151b8ce0947b9cfd6ad3e3533e
https://github.com/simstudioai/sim/pull/6139/files#diff-56073f04957682936465d04d9660e33d45b8f6151b8ce0947b9cfd6ad3e3533e
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6139/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.