René's URL Explorer Experiment


Title: fix(files): stop saving fetched URLs to Files and look names up by the unique index by waleedlatif1 · Pull Request #8327 · simstudioai/sim · GitHub

Open Graph Title: fix(files): stop saving fetched URLs to Files and look names up by the unique index by waleedlatif1 · Pull Request #8327 · simstudioai/sim

X Title: fix(files): stop saving fetched URLs to Files and look names up by the unique index by waleedlatif1 · Pull Request #8327 · simstudioai/sim

Description: Summary The File block's URL fetch no longer saves every fetched URL into workspace Files. Nothing ever read the saved copy: the parser keeps its own execution file, and the reuse the save once served was removed earlier. Repeated fetches were piling up name (N).html copies in the Files root Renamed fetchExternalUrlToWorkspace to fetchExternalUrl and removed its save, permission, and upload branch Name existence checks (fileNameExistsInWorkspaceFolder, getWorkspaceFileByName) now spell the folder predicate as coalesce(folder_id, '') = $folder, matching the unique (workspace_id, coalesce(folder_id, ''), original_name) index, so each check is a point lookup. The old folder_id IS NULL form made root lookups scan the folder-id index allocateUniqueWorkspaceFileName probes the base name plus (1)…(20), then falls back to a short-id suffix instead of probing up to 1,000 candidates and then failing. The unique index and the existing conflict retry remain the authority Type of Change Bug fix Testing New file-names.integration.ts (real Postgres). All three tests fail on the pre-change code: parsing a URL creates no workspace_files row root/folder scoping, with an EXPLAIN assertion that both lookups use the unique index the 21st copy of a name gets a short-id suffix, and concurrent uploads of one name all succeed with distinct names Existing file-versions, provenance, revision, storage-cleanup, and workspace-import integration suites pass Type-check, lint, and check:audits pass 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 The File block's URL fetch no longer saves every fetched URL into workspace Files. Nothing ever read the saved copy: the parser keeps its own execution file, and the reuse the save onc...

X Description: Summary The File block's URL fetch no longer saves every fetched URL into workspace Files. Nothing ever read the saved copy: the parser keeps its own execution file, and the reuse the save...

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

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:2a6f643e-ab70-e63e-17c0-16f0a89c0ce3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id902E:160F17:2483D2:332864:6AFB51F2
html-safe-noncea422b6c6c815baefaf19babef3a196fc0899ff881ad707f8b8fb6760356a0f01
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDJFOjE2MEYxNzoyNDgzRDI6MzMyODY0OjZBRkI1MUYyIiwidmlzaXRvcl9pZCI6IjI4OTA5ODEyNjM2OTcyMDM2OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0020934fa5984f0f8cfbc4fbc193f4da523198e328ee80ea0cffb164d8514a6c
hovercard-subject-tagpull_request:4648526380
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/8327/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary The File block's URL fetch no longer saves every fetched URL into workspace Files. Nothing ever read the saved copy: the parser keeps its own execution file, and the reuse the save onc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
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
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8327/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8327%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%2F8327%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/8327/files
Reloadhttps://github.com/simstudioai/sim/pull/8327/files
Reloadhttps://github.com/simstudioai/sim/pull/8327/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/file-block-stop-saving-fetched-urlshttps://github.com/simstudioai/sim/tree/fix/file-block-stop-saving-fetched-urls
Conversation 8 https://github.com/simstudioai/sim/pull/8327
Commits 3 https://github.com/simstudioai/sim/pull/8327/commits
Checks 31 https://github.com/simstudioai/sim/pull/8327/checks
Files changed https://github.com/simstudioai/sim/pull/8327/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8327/files
fix(files): stop saving fetched URLs to Files and look names up by the unique index https://github.com/simstudioai/sim/pull/8327/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/8327/files
4b22934 fix(files): stop saving fetched URLs to Files and look names up by th… waleedlatif1 Sep 26, 2026 https://github.com/simstudioai/sim/pull/8327/commits/4b22934df2e7483fe13e1f5b757f22193c5b951d
b06840e fix(files): index-shape the move conflict probe and cover execution-c… waleedlatif1 Sep 26, 2026 https://github.com/simstudioai/sim/pull/8327/commits/b06840e27cad1247deb2221851227b53d484daa0
4d2c6b3 refactor(uploads): move the external URL fetch out of the workspace f… waleedlatif1 Sep 26, 2026 https://github.com/simstudioai/sim/pull/8327/commits/4d2c6b3844c781b244fedaef89c8b6dd775841de
Clear filters https://github.com/simstudioai/sim/pull/8327/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8327/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8327/files
SKILL.md https://github.com/simstudioai/sim/pull/8327/files#diff-e51fd23236203c2c72d4ceb5044b4e9d845c5a535eabc40aaef60790403ead65
copy-files.test.ts https://github.com/simstudioai/sim/pull/8327/files#diff-31d6b823ee537f678640acbf005d7c2e0cdbe039addabcf822609e39aff913a1
parser.test.ts https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
parser.ts https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
archive.test.ts https://github.com/simstudioai/sim/pull/8327/files#diff-0b64b14ad44f5688f400b8425bac8f59eafbeb416d71f8cf74d3bc11b1da1e5d
file-names.integration.ts https://github.com/simstudioai/sim/pull/8327/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
fetch-external-url.test.ts https://github.com/simstudioai/sim/pull/8327/files#diff-270277b8cd32e78a4be34c6cd10bb177697150165c604ee57c02f48b6da077c5
index.ts https://github.com/simstudioai/sim/pull/8327/files#diff-53adaf73a02c63e7c25631d9c064291be434a717f8d6b7a00aac382e85e7cd99
workspace-file-folder-manager.ts https://github.com/simstudioai/sim/pull/8327/files#diff-7ab6712e7e7b3b214000c022f68393bf7da60abb4ec2a557d5fa912f10c245cc
workspace-file-manager.ts https://github.com/simstudioai/sim/pull/8327/files#diff-fcf305d0b37403347596bca42fc6889e9038c9f8e2c69ba20676c0f0d8fead34
fetch-external-url.server.test.ts https://github.com/simstudioai/sim/pull/8327/files#diff-e107a97150eeb60a6eabf3f8e9b94abbbc2d773270f1bcb1dc795079f987b526
fetch-external-url.server.ts https://github.com/simstudioai/sim/pull/8327/files#diff-2f6ca3c1869f0f379736c08964f9fa5ad8ef951b65a77fee8a94aaa9d5346bca
index.ts https://github.com/simstudioai/sim/pull/8327/files#diff-38963b775b9a08da9c40dbdf25380b1bd038aa3f9f93e9c657ef549fb39f512c
workspace-file-folders.mock.ts https://github.com/simstudioai/sim/pull/8327/files#diff-c93cd014052b379bffb7e5cddfbb9ddc2a299eea87f766ad783b46d67f383582
workspace-uploads.mock.ts https://github.com/simstudioai/sim/pull/8327/files#diff-e4a2f4ca7d12e91266dbb86a3f046d88c04d610873cdfe5b4cdaf8f2fdf4a935
.agents/skills/memory-load-check/SKILL.mdhttps://github.com/simstudioai/sim/pull/8327/files#diff-e51fd23236203c2c72d4ceb5044b4e9d845c5a535eabc40aaef60790403ead65
View file https://github.com/simstudioai/sim/blob/4d2c6b3844c781b244fedaef89c8b6dd775841de/.agents/skills/memory-load-check/SKILL.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8327/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8327/files#diff-e51fd23236203c2c72d4ceb5044b4e9d845c5a535eabc40aaef60790403ead65
https://github.com/simstudioai/sim/pull/8327/files#diff-e51fd23236203c2c72d4ceb5044b4e9d845c5a535eabc40aaef60790403ead65
apps/sim/ee/workspace-forking/lib/copy/copy-files.test.tshttps://github.com/simstudioai/sim/pull/8327/files#diff-31d6b823ee537f678640acbf005d7c2e0cdbe039addabcf822609e39aff913a1
View file https://github.com/simstudioai/sim/blob/4d2c6b3844c781b244fedaef89c8b6dd775841de/apps/sim/ee/workspace-forking/lib/copy/copy-files.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8327/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8327/files#diff-31d6b823ee537f678640acbf005d7c2e0cdbe039addabcf822609e39aff913a1
https://github.com/simstudioai/sim/pull/8327/files#diff-31d6b823ee537f678640acbf005d7c2e0cdbe039addabcf822609e39aff913a1
https://github.com/simstudioai/sim/pull/8327/files#diff-31d6b823ee537f678640acbf005d7c2e0cdbe039addabcf822609e39aff913a1
https://github.com/simstudioai/sim/pull/8327/files#diff-31d6b823ee537f678640acbf005d7c2e0cdbe039addabcf822609e39aff913a1
apps/sim/lib/internal/file/parser.test.tshttps://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
View file https://github.com/simstudioai/sim/blob/4d2c6b3844c781b244fedaef89c8b6dd775841de/apps/sim/lib/internal/file/parser.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8327/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
https://github.com/simstudioai/sim/pull/8327/files#diff-e4d95bc00614f800748ff245f76bf9d787f7febada404df6fa5e3e92c7fff600
apps/sim/lib/internal/file/parser.tshttps://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
View file https://github.com/simstudioai/sim/blob/4d2c6b3844c781b244fedaef89c8b6dd775841de/apps/sim/lib/internal/file/parser.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8327/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
https://github.com/simstudioai/sim/pull/8327/files#diff-063d314ef795a40a2f0b622cdfdff5aac0ea4ec3864e3fdcccc2833dd5368d2f
apps/sim/lib/uploads/archive.test.tshttps://github.com/simstudioai/sim/pull/8327/files#diff-0b64b14ad44f5688f400b8425bac8f59eafbeb416d71f8cf74d3bc11b1da1e5d
View file https://github.com/simstudioai/sim/blob/4d2c6b3844c781b244fedaef89c8b6dd775841de/apps/sim/lib/uploads/archive.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8327/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8327/files#diff-0b64b14ad44f5688f400b8425bac8f59eafbeb416d71f8cf74d3bc11b1da1e5d
https://github.com/simstudioai/sim/pull/8327/files#diff-0b64b14ad44f5688f400b8425bac8f59eafbeb416d71f8cf74d3bc11b1da1e5d
apps/sim/lib/uploads/contexts/workspace/__integration__/file-names.integration.tshttps://github.com/simstudioai/sim/pull/8327/files#diff-c16eddc45d1cff843259132f8f8d783931fb6f8b9c010b962fec060040c05e8c
View file https://github.com/simstudioai/sim/blob/4d2c6b3844c781b244fedaef89c8b6dd775841de/apps/sim/lib/uploads/contexts/workspace/__integration__/file-names.integration.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8327/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/8327/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8327/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.