René's URL Explorer Experiment


Title: feat(rich-markdown-editor): live media embeds + shared embed detection util by waleedlatif1 · Pull Request #5290 · simstudioai/sim · GitHub

Open Graph Title: feat(rich-markdown-editor): live media embeds + shared embed detection util by waleedlatif1 · Pull Request #5290 · simstudioai/sim

X Title: feat(rich-markdown-editor): live media embeds + shared embed detection util by waleedlatif1 · Pull Request #5290 · simstudioai/sim

Description: Summary Shared embed detection — extract getEmbedInfo/EmbedInfo into a pure @sim/utils/media-embed module (string → {url, type, aspectRatio}); the workflow note block now imports it instead of carrying its own ~270-line copy Live media embeds in the rich markdown editor — a new LinkEmbed ProseMirror widget-decoration plugin renders players (YouTube, Vimeo, Spotify, Dropbox, …) beneath a standalone link, in both editing and read-only surfaces (Linear/Notion-style auto-embed via StarterKit autolink) The document stays a plain markdown link — embeds never enter the schema or the serialized markdown, so round-trips stay lossless. Widgets are keyed by source URL so iframes don't reload on keystrokes Embeds are gated behind an opt-in embeds flag — on for the file editor, off for the compact modal fields Knowledge chunk editor polished to the file editor's centered reading frame (max-w-[48rem]), kept plaintext to preserve exact text fidelity for embeddings (tokenizer overlay + token count intact) Type of Change New feature Refactor (shared util extraction) Testing New media-embed.test.ts (7) — platform detection + Dropbox host-validation security cases New link-embed.test.ts (5) — renders for standalone embeddable links, lossless markdown round-trip, no embed for inline/non-embeddable links, off when disabled Full rich-markdown-editor suite: 195/195 pass · apps/sim tsc 0 errors · both packages typecheck · monorepo boundary + realtime prune checks pass Note This carries forward the Dropbox host-validation hardening from #5288 into the shared util. Since this branch removes the inline getEmbedInfo from note-block-view.tsx (which #5288 patches), the two will conflict — recommend merging #5288 first, then this rebases to "inline removed, fix lives in the util." 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 Shared embed detection — extract getEmbedInfo/EmbedInfo into a pure @sim/utils/media-embed module (string → {url, type, aspectRatio}); the workflow note block now imports it instead of car...

X Description: Summary Shared embed detection — extract getEmbedInfo/EmbedInfo into a pure @sim/utils/media-embed module (string → {url, type, aspectRatio}); the workflow note block now imports it instead of car...

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

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:267c9c2d-4146-df92-75ad-e8aa37e38392
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA89E:3F4D3B:639121:89128D:6AFB3F64
html-safe-nonce00c0608aa9d75e26ed3c2365dda0d4109eba6ea47282285922e50632643457b6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODlFOjNGNEQzQjo2MzkxMjE6ODkxMjhEOjZBRkIzRjY0IiwidmlzaXRvcl9pZCI6IjUzODQ3OTA2MTc1MTc0MDgxMDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac42b8b0272b16458a01a392290bbc4c5eeeb39f37572f06e3f41e4c6f5ec96e4d
hovercard-subject-tagpull_request:3965284138
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/5290/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 Shared embed detection — extract getEmbedInfo/EmbedInfo into a pure @sim/utils/media-embed module (string → {url, type, aspectRatio}); the workflow note block now imports it instead of car...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2169b0dfbef67ed6b128074a5ed45bb7d5d1859783b10178b09a7765ad5f3693
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
release3b4fc8df5ef1c6757e733a23e6b81b6725021823
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5290/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5290%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%2F5290%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/5290/files
Reloadhttps://github.com/simstudioai/sim/pull/5290/files
Reloadhttps://github.com/simstudioai/sim/pull/5290/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests202 (202)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
worktree-rich-editor-embedshttps://github.com/simstudioai/sim/tree/worktree-rich-editor-embeds
Conversation 12 https://github.com/simstudioai/sim/pull/5290
Commits 4 https://github.com/simstudioai/sim/pull/5290/commits
Checks 15 https://github.com/simstudioai/sim/pull/5290/checks
Files changed https://github.com/simstudioai/sim/pull/5290/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/files
feat(rich-markdown-editor): live media embeds + shared embed detection util https://github.com/simstudioai/sim/pull/5290/files#top
Show all changes 4 commits https://github.com/simstudioai/sim/pull/5290/files
647c498 feat(rich-markdown-editor): live media embeds + shared embed detectio… waleedlatif1 Jun 30, 2026 https://github.com/simstudioai/sim/pull/5290/commits/647c4987471dc151cad3807a8cf191f00a6401c0
ef83130 fix(media-embed): gate provider detection on parsed hostname waleedlatif1 Jun 30, 2026 https://github.com/simstudioai/sim/pull/5290/commits/ef831301277f5a7ca8fcbb5cdec79244e2712e35
4aa6e9d fix(rich-markdown-editor): unique widget key per duplicate embed URL waleedlatif1 Jun 30, 2026 https://github.com/simstudioai/sim/pull/5290/commits/4aa6e9de081b9ddc2a100e0dd17eea5093d627fd
427f8d4 refactor(media-embed): tighten comments and drop a redundant guard waleedlatif1 Jun 30, 2026 https://github.com/simstudioai/sim/pull/5290/commits/427f8d496c97cace7021583a48d5bb4a4973448c
Clear filters https://github.com/simstudioai/sim/pull/5290/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/files
editor-extensions.ts https://github.com/simstudioai/sim/pull/5290/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
embed-dom.ts https://github.com/simstudioai/sim/pull/5290/files#diff-cee3bfd205ec3aef7fdbf11a4eacbc6b4a784f0dfe1f66c93796fbafb9d0cf31
link-embed.test.ts https://github.com/simstudioai/sim/pull/5290/files#diff-ed3fb1ecea59dbd284ff8d09647efa2300289f3ce0c039331d6e66179aec4722
link-embed.ts https://github.com/simstudioai/sim/pull/5290/files#diff-ef5508aacee1e1256ee5bf55c445cf201bbc078c5973b158a48da466aa786627
rich-markdown-editor.tsx https://github.com/simstudioai/sim/pull/5290/files#diff-6ddf250be25a5febc97c8c4a2e0f9e93b869e674efbb9bd43358137571ddc05a
chunk-editor.tsx https://github.com/simstudioai/sim/pull/5290/files#diff-ec3ec318b171d88a474028a9ded7e1c404d2b55e151e96f819665ec9917e081a
bun.lock https://github.com/simstudioai/sim/pull/5290/files#diff-bfd0ef82a01108fa1e836c2500b98b7de8a92bb1ae352a8efcbd9d6ffcaabd60
package.json https://github.com/simstudioai/sim/pull/5290/files#diff-21f8eb1d7a149d42ab0454ea905d44f624ff1d0aeb6d7a88d75b42962ca6b053
index.ts https://github.com/simstudioai/sim/pull/5290/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
media-embed.test.ts https://github.com/simstudioai/sim/pull/5290/files#diff-67061f70abc9658a8a89aac709f19e292482a792d9233fa90b17e6daf05301db
media-embed.ts https://github.com/simstudioai/sim/pull/5290/files#diff-9a376d94465258d33a21c808d9b6def606a75f3efbed1808baa51b5c0a9e23b3
package.json https://github.com/simstudioai/sim/pull/5290/files#diff-62abf7d60857bfb70779a1983d5178497ca4fc37092c5e9430c5716ab4d5c652
note-block-view.tsx https://github.com/simstudioai/sim/pull/5290/files#diff-0e66e46e6748387980e1f9d9fe3afcdef527a78534d1d0b9328c0dbfe89b3021
...pace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/editor-extensions.tshttps://github.com/simstudioai/sim/pull/5290/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/editor-extensions.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5290/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/5290/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/5290/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
...kspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/embed/embed-dom.tshttps://github.com/simstudioai/sim/pull/5290/files#diff-cee3bfd205ec3aef7fdbf11a4eacbc6b4a784f0dfe1f66c93796fbafb9d0cf31
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/embed/embed-dom.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
.../[workspaceId]/files/components/file-viewer/rich-markdown-editor/embed/link-embed.test.tshttps://github.com/simstudioai/sim/pull/5290/files#diff-ed3fb1ecea59dbd284ff8d09647efa2300289f3ce0c039331d6e66179aec4722
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/embed/link-embed.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
...space/[workspaceId]/files/components/file-viewer/rich-markdown-editor/embed/link-embed.tshttps://github.com/simstudioai/sim/pull/5290/files#diff-ef5508aacee1e1256ee5bf55c445cf201bbc078c5973b158a48da466aa786627
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/embed/link-embed.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/files
.../[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsxhttps://github.com/simstudioai/sim/pull/5290/files#diff-6ddf250be25a5febc97c8c4a2e0f9e93b869e674efbb9bd43358137571ddc05a
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5290/files#diff-6ddf250be25a5febc97c8c4a2e0f9e93b869e674efbb9bd43358137571ddc05a
https://github.com/simstudioai/sim/pull/5290/files#diff-6ddf250be25a5febc97c8c4a2e0f9e93b869e674efbb9bd43358137571ddc05a
...kspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsxhttps://github.com/simstudioai/sim/pull/5290/files#diff-ec3ec318b171d88a474028a9ded7e1c404d2b55e151e96f819665ec9917e081a
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/apps/sim/app/workspace/%5BworkspaceId%5D/knowledge/%5Bid%5D/%5BdocumentId%5D/components/chunk-editor/chunk-editor.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5290/files#diff-ec3ec318b171d88a474028a9ded7e1c404d2b55e151e96f819665ec9917e081a
https://github.com/simstudioai/sim/pull/5290/files#diff-ec3ec318b171d88a474028a9ded7e1c404d2b55e151e96f819665ec9917e081a
https://github.com/simstudioai/sim/pull/5290/files#diff-ec3ec318b171d88a474028a9ded7e1c404d2b55e151e96f819665ec9917e081a
https://github.com/simstudioai/sim/pull/5290/files#diff-ec3ec318b171d88a474028a9ded7e1c404d2b55e151e96f819665ec9917e081a
https://github.com/simstudioai/sim/blob/staging/.github/CODEOWNERS#L38
bun.lockhttps://github.com/simstudioai/sim/pull/5290/files#diff-bfd0ef82a01108fa1e836c2500b98b7de8a92bb1ae352a8efcbd9d6ffcaabd60
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/bun.lock
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/files
https://github.com/simstudioai/sim/blob/staging/.github/CODEOWNERS#L36
packages/utils/package.jsonhttps://github.com/simstudioai/sim/pull/5290/files#diff-21f8eb1d7a149d42ab0454ea905d44f624ff1d0aeb6d7a88d75b42962ca6b053
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/packages/utils/package.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5290/files#diff-21f8eb1d7a149d42ab0454ea905d44f624ff1d0aeb6d7a88d75b42962ca6b053
https://github.com/simstudioai/sim/pull/5290/files#diff-21f8eb1d7a149d42ab0454ea905d44f624ff1d0aeb6d7a88d75b42962ca6b053
packages/utils/src/index.tshttps://github.com/simstudioai/sim/pull/5290/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
View file https://github.com/simstudioai/sim/blob/427f8d496c97cace7021583a48d5bb4a4973448c/packages/utils/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5290/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5290/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
https://github.com/simstudioai/sim/pull/5290/files#diff-4de4f541bddba72ba0a8692d8e366b2b8498d0a1bae6d3cb225fd3346571d567
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5290/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.