René's URL Explorer Experiment


Title: feat(files): render diff fences and theme mermaid diagrams by TheodoreSpeaks · Pull Request #8543 · simstudioai/sim · GitHub

Open Graph Title: feat(files): render diff fences and theme mermaid diagrams by TheodoreSpeaks · Pull Request #8543 · simstudioai/sim

X Title: feat(files): render diff fences and theme mermaid diagrams by TheodoreSpeaks · Pull Request #8543 · simstudioai/sim

Description: Summary ```diff fences in markdown files render as line diffs: tinted add/remove rows, word-level highlights, line numbers when hunk headers carry them, and long unchanged runs collapsed behind an expander ---/+++ headers can name a workspace file (sim:file/) or knowledge base document (sim:knowledge//); the card header shows its icon, name, and a link when --- and +++ name two different documents, the diff renders as two side-by-side excerpt cards with each document's claim highlighted mermaid diagrams use app tokens on Mermaid's base theme; flowcharts look like workflow blocks and edges (rounded cards, 1.5px edges, no arrowheads) and labels are pinned to the font they are measured with so they no longer clip dashboard tables size to their content (up to 400px) instead of a fixed height the embed and the diff parser are lazy-loaded so rich-markdown surfaces only pay for them when a doc contains a diff Type of Change New feature Testing Tested manually in markdown files with file, knowledge base, two-document, and git diffs plus flowchart, sequence, and pie diagrams. bun run lint, bun run check:audits, block registry and tool-registry boundary checks, and diff parser unit tests 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 ```diff fences in markdown files render as line diffs: tinted add/remove rows, word-level highlights, line numbers when hunk headers carry them, and long unchanged runs collapsed behind an...

X Description: Summary ```diff fences in markdown files render as line diffs: tinted add/remove rows, word-level highlights, line numbers when hunk headers carry them, and long unchanged runs collapsed behind an...

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

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:58f3d80f-20aa-9b00-11ac-085920a9cb2b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD764:1BB96C:AE67EA:EEF83C:6AFB50B7
html-safe-nonce3e6d5ed80242d22ac5dad862270fd3b182b32ab9e24781bb2bc3a59453356a5d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzY0OjFCQjk2QzpBRTY3RUE6RUVGODNDOjZBRkI1MEI3IiwidmlzaXRvcl9pZCI6IjIyOTMxMjIyMTU1MjU5NjE5MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac570585e419501c0cf8caa3a8257d9d741feddcac5ffb7097f13af70cb624ec6b
hovercard-subject-tagpull_request:4709661656
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/8543/files
twitter:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/19564703?s=400&v=4
og:image:altSummary ```diff fences in markdown files render as line diffs: tinted add/remove rows, word-level highlights, line numbers when hunk headers carry them, and long unchanged runs collapsed behind an...
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/8543/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8543%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%2F8543%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/8543/files
Reloadhttps://github.com/simstudioai/sim/pull/8543/files
Reloadhttps://github.com/simstudioai/sim/pull/8543/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
TheodoreSpeakshttps://github.com/TheodoreSpeaks
staginghttps://github.com/simstudioai/sim/tree/staging
feat/diff-embedshttps://github.com/simstudioai/sim/tree/feat/diff-embeds
Conversation 31 https://github.com/simstudioai/sim/pull/8543
Commits 13 https://github.com/simstudioai/sim/pull/8543/commits
Checks 31 https://github.com/simstudioai/sim/pull/8543/checks
Files changed https://github.com/simstudioai/sim/pull/8543/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8543/files
feat(files): render diff fences and theme mermaid diagrams https://github.com/simstudioai/sim/pull/8543/files#top
Show all changes 13 commits https://github.com/simstudioai/sim/pull/8543/files
bbad44b improvement(files): theme mermaid diagrams with app tokens TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/bbad44bf391e37205bc20ff177f0068027abf314
d21378a feat(files): render diff fences with source-checked state TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/d21378a37bd9522c915df8b44ae847e5f8481059
e2458c1 improvement(files): frame diffs as cards with tinted change rows TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/e2458c1afd49e268974f748e5fbd867ce209a362
83a6378 improvement(files): render prose diffs as source excerpt cards and co… TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/83a6378731b33e2477c26fff7f7b16ec60f7caec
b540a7d improvement(files): put the open link beside the excerpt title TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/b540a7d49cea2ac1411bdb3054fc2750089a2062
4466242 improvement(files): render inline bold and code in prose diffs TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/446624237b82328ec3ce23f6b273b31003ee63f9
96de0bf improvement(files): render edits as line diffs with softer change colors TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/96de0bf29c5de264e198d62bdb98d7c9dc784392
4e2c8ee improvement(files): draw mermaid flowcharts like workflow blocks and … TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/4e2c8ee49c52c1376e91936bd18dc5b86e3cc2db
daa963c fix(files): keep mermaid labels inside their nodes and fork edges cle… TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/daa963ce94b01f50b8bad8a2a38371e3af9a1dbb
3431935 improvement(files): drop diff source checks and split view, size tabl… TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/343193561fe323ac3f17d321dbf389ebc1399e3c
9735ca8 improvement(files): keep the diff parser out of the editor bundle TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/9735ca8b59479320ea151884e528731a8858a224
2602094 fix(files): parse multi-file and copy git diffs, cap word diffs, read… TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/26020947a9e4248480657b1648b902192fd5aac8
321d23a fix(files): title renames by their new path and expand collapsed line… TheodoreSpeaks Oct 1, 2026 https://github.com/simstudioai/sim/pull/8543/commits/321d23a0749199d5a7efc72f10cd6da4dc9c655a
Clear filters https://github.com/simstudioai/sim/pull/8543/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8543/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8543/files
mermaid-diagram.tsx https://github.com/simstudioai/sim/pull/8543/files#diff-64b6fbabd36cf22d12e1b74760afcc0a17cf0b729f7da1c871afea6a59d566cd
mermaid-theme.ts https://github.com/simstudioai/sim/pull/8543/files#diff-8ce95a7b4c562e2c5b8ce663220f16bea817bb3542185732e664ea34325109c4
code-block.tsx https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
rich-markdown-editor.css https://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
dashboard-panel.tsx https://github.com/simstudioai/sim/pull/8543/files#diff-154aaab91d120b8635fbfa0263f727c0cb1fd9428ab97d26283beb88e3a974e2
diff-embed.tsx https://github.com/simstudioai/sim/pull/8543/files#diff-7060b329f615777adda883d42f1763dc0e956831c277453f48d5f7c4f777de83
diff-view.tsx https://github.com/simstudioai/sim/pull/8543/files#diff-dc5d757a90d8a791d7c6fac217d05f025af701f0dc5532f9b0b3be49e94abbca
embed-language.ts https://github.com/simstudioai/sim/pull/8543/files#diff-1a9e460139603af53cbe3ab96db9061b12e0f1fa68008d94fea9c22eef386ee0
unified.test.ts https://github.com/simstudioai/sim/pull/8543/files#diff-c060389dfa1a737428c0f99681a1bb82de908100fbd7904389cd88e5fd981752
unified.ts https://github.com/simstudioai/sim/pull/8543/files#diff-dcf6537dacb36ec98667d40961654a80056f769ed61081ea6e19572c90afa1df
check-tool-registry-boundary.baseline.json https://github.com/simstudioai/sim/pull/8543/files#diff-e7b820ce86615ed78dd6fbaf0b57b20a2ac350d700c3dc0fc6b71207a656e4b7
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/mermaid-diagram.tsxhttps://github.com/simstudioai/sim/pull/8543/files#diff-64b6fbabd36cf22d12e1b74760afcc0a17cf0b729f7da1c871afea6a59d566cd
View file https://github.com/simstudioai/sim/blob/321d23a0749199d5a7efc72f10cd6da4dc9c655a/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/mermaid-diagram.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8543/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8543/files#diff-64b6fbabd36cf22d12e1b74760afcc0a17cf0b729f7da1c871afea6a59d566cd
https://github.com/simstudioai/sim/pull/8543/files#diff-64b6fbabd36cf22d12e1b74760afcc0a17cf0b729f7da1c871afea6a59d566cd
https://github.com/simstudioai/sim/pull/8543/files#diff-64b6fbabd36cf22d12e1b74760afcc0a17cf0b729f7da1c871afea6a59d566cd
https://github.com/simstudioai/sim/pull/8543/files#diff-64b6fbabd36cf22d12e1b74760afcc0a17cf0b729f7da1c871afea6a59d566cd
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/mermaid-theme.tshttps://github.com/simstudioai/sim/pull/8543/files#diff-8ce95a7b4c562e2c5b8ce663220f16bea817bb3542185732e664ea34325109c4
View file https://github.com/simstudioai/sim/blob/321d23a0749199d5a7efc72f10cd6da4dc9c655a/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/mermaid-theme.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8543/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/8543/files
.../workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/code-block.tsxhttps://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
View file https://github.com/simstudioai/sim/blob/321d23a0749199d5a7efc72f10cd6da4dc9c655a/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/code-block.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8543/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
https://github.com/simstudioai/sim/pull/8543/files#diff-2e6b03fc7fa2efc4338be2d282772e5462af53142f4e061ef3678757b44b3971
.../[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.csshttps://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
View file https://github.com/simstudioai/sim/blob/321d23a0749199d5a7efc72f10cd6da4dc9c655a/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.css
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8543/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
https://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
https://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
https://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
https://github.com/simstudioai/sim/pull/8543/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
apps/sim/components/dashboards/dashboard-panel.tsxhttps://github.com/simstudioai/sim/pull/8543/files#diff-154aaab91d120b8635fbfa0263f727c0cb1fd9428ab97d26283beb88e3a974e2
View file https://github.com/simstudioai/sim/blob/321d23a0749199d5a7efc72f10cd6da4dc9c655a/apps/sim/components/dashboards/dashboard-panel.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8543/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8543/files#diff-154aaab91d120b8635fbfa0263f727c0cb1fd9428ab97d26283beb88e3a974e2
https://github.com/simstudioai/sim/pull/8543/files#diff-154aaab91d120b8635fbfa0263f727c0cb1fd9428ab97d26283beb88e3a974e2
https://github.com/simstudioai/sim/pull/8543/files#diff-154aaab91d120b8635fbfa0263f727c0cb1fd9428ab97d26283beb88e3a974e2
https://github.com/simstudioai/sim/pull/8543/files#diff-154aaab91d120b8635fbfa0263f727c0cb1fd9428ab97d26283beb88e3a974e2
Please reload this pagehttps://github.com/simstudioai/sim/pull/8543/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8543/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.