René's URL Explorer Experiment


Title: feat(files): find in an open markdown document with Cmd/Ctrl+F by waleedlatif1 · Pull Request #7196 · simstudioai/sim · GitHub

Open Graph Title: feat(files): find in an open markdown document with Cmd/Ctrl+F by waleedlatif1 · Pull Request #7196 · simstudioai/sim

X Title: feat(files): find in an open markdown document with Cmd/Ctrl+F by waleedlatif1 · Pull Request #7196 · simstudioai/sim

Description: Summary Cmd/Ctrl+F now opens find-in-document on an open markdown file, using the shared FindBar (Files page, mothership file view, public share page) A ProseMirror plugin owns the match set and paints inline decorations — the search adds no document steps, so it never touches the markdown, the undo history, or the collaborative Y.Doc, and it re-searches on every document change so a highlight can't point at a range an edit removed Matching delegates to the shared forEachSearchOccurrence instead of adding a fourth private definition of "an occurrence"; that also inherits the whitespace fold, so a typed space matches a non-breaking one Fixes a latent bug in that shared helper: it normalized case with a plain toLowerCase(), which can grow a string (a few code points lowercase to two characters) and slide every later index, breaking its documented guarantee that bounds index the caller's own string. Now folds case length-preservingly, which also fixes workflow search and the canvas Note card The Cmd/Ctrl+F open shortcut was a fourth byte-identical copy of the same effect — extracted to a shared useFindShortcut beside FindBar, which the Files list now uses too, with the one-owner-at-a-time invariant documented in one place Type of Change New feature Testing Tested via unit tests — 19 new tests covering match positions across mark boundaries, inline atoms, and length-changing lowercase, plus plugin behavior against a real TipTap editor (decoration painting, stepping/wrapping, re-search on edit, active-index clamping, and no document/selection/undo writes). Each new test verified to fail when its fix is reverted. Full suite green: 865 tests across the file viewer, collab-doc converter and share page; 39 utils tests; bun run lint (26/26), bun run check:audits (37/37), bun run type-check, and check-block-registry all pass. Not verified in a browser. 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 Cmd/Ctrl+F now opens find-in-document on an open markdown file, using the shared FindBar (Files page, mothership file view, public share page) A ProseMirror plugin owns the match set and p...

X Description: Summary Cmd/Ctrl+F now opens find-in-document on an open markdown file, using the shared FindBar (Files page, mothership file view, public share page) A ProseMirror plugin owns the match set and p...

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

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:c97aa239-1008-4638-07ae-798da1947a45
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDA58:11E6AB:5C6A72:8307F1:6AFB6303
html-safe-nonce51c5792123cae893a85feff90a3820f443020125653b76676409298da3dbc934
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTU4OjExRTZBQjo1QzZBNzI6ODMwN0YxOjZBRkI2MzAzIiwidmlzaXRvcl9pZCI6IjE1NDE5Njc0NDM3MzM5OTYyOTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac220c3aa0351b3414a756477d90ec230d475e69a71f7dbada3d704c0a8737f41b
hovercard-subject-tagpull_request:4381487395
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/7196/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 Cmd/Ctrl+F now opens find-in-document on an open markdown file, using the shared FindBar (Files page, mothership file view, public share page) A ProseMirror plugin owns the match set and p...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94
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
release59ef97164c52cf59bd10558ddec9c4f482763988
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7196/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7196%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%2F7196%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/7196/files
Reloadhttps://github.com/simstudioai/sim/pull/7196/files
Reloadhttps://github.com/simstudioai/sim/pull/7196/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
feat/files-cmd-f-findhttps://github.com/simstudioai/sim/tree/feat/files-cmd-f-find
Conversation 10 https://github.com/simstudioai/sim/pull/7196
Commits 2 https://github.com/simstudioai/sim/pull/7196/commits
Checks 32 https://github.com/simstudioai/sim/pull/7196/checks
Files changed https://github.com/simstudioai/sim/pull/7196/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7196/files
feat(files): find in an open markdown document with Cmd/Ctrl+F https://github.com/simstudioai/sim/pull/7196/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/7196/files
0722dee feat(files): find in an open markdown document with Cmd/Ctrl+F waleedlatif1 Aug 28, 2026 https://github.com/simstudioai/sim/pull/7196/commits/0722dee1d743fb55277d70d3768fe6fe350dae39
6f67b57 fix(files): close three find edge cases from review waleedlatif1 Aug 28, 2026 https://github.com/simstudioai/sim/pull/7196/commits/6f67b57152ae2fba4e55e6fff396fb38ebc2286c
Clear filters https://github.com/simstudioai/sim/pull/7196/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7196/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7196/files
public-file-view.tsx https://github.com/simstudioai/sim/pull/7196/files#diff-9b86d2cfc6decbc02812caa17f9ef3a740cc097ed8e10e7e39eae89a8104f9bf
use-find-shortcut.ts https://github.com/simstudioai/sim/pull/7196/files#diff-8587f45a304d19aa2c0e1cd938ced286be63dff5d80bc15ad79aab2c9f3dbf91
index.ts https://github.com/simstudioai/sim/pull/7196/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
file-viewer.tsx https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
editor-extensions.ts https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
find-extension.test.ts https://github.com/simstudioai/sim/pull/7196/files#diff-31257de83f7de6156920e03c89adab1298abf315f9444091a4f2b18427366ff3
find-extension.ts https://github.com/simstudioai/sim/pull/7196/files#diff-2bac513fa173ea4560e5e57eac19146e85f1b21340d24976c7c46945f9c81a17
find-matches.test.ts https://github.com/simstudioai/sim/pull/7196/files#diff-23145608dfc124610cbbee36e902ed26635ab700a7962df99400cfa4f27195cc
find-matches.ts https://github.com/simstudioai/sim/pull/7196/files#diff-f003c3b32da80cf03711f0526be6e7491591e7ca3f95d9203be849333e397342
index.ts https://github.com/simstudioai/sim/pull/7196/files#diff-d0357a40a40f66a4d71f5a08a86711210961c84464ec2bc2f8bcc8852a66c971
use-markdown-find.ts https://github.com/simstudioai/sim/pull/7196/files#diff-9cbae15f27d634da80165ce67645c32f5e02332f67565d4c466711d8d036982d
rich-markdown-editor.css https://github.com/simstudioai/sim/pull/7196/files#diff-72cd52075ca5767b1230f7ea9f4ec66103bff3ff90441919771b63bfad3a7984
rich-markdown-editor.tsx https://github.com/simstudioai/sim/pull/7196/files#diff-6ddf250be25a5febc97c8c4a2e0f9e93b869e674efbb9bd43358137571ddc05a
files.tsx https://github.com/simstudioai/sim/pull/7196/files#diff-0284e2e46ba0636bd37fb01a0bee2a53844af9bbaf0a5879e3b182c0f34e67a9
resource-content.tsx https://github.com/simstudioai/sim/pull/7196/files#diff-80c90fc9e418548394644fd871082cb97350068ea29717e5b8384ff4c3140617
string.test.ts https://github.com/simstudioai/sim/pull/7196/files#diff-c5e3b58e83d7dae8290c3b3d2958541506ce2125835abc0d1f6f7da28111144b
string.ts https://github.com/simstudioai/sim/pull/7196/files#diff-9b50bdcf9d922aa7d14b9be1a170a437df47378c6ee3576efaaedcdf7389f503
apps/sim/app/f/[token]/public-file-view.tsxhttps://github.com/simstudioai/sim/pull/7196/files#diff-9b86d2cfc6decbc02812caa17f9ef3a740cc097ed8e10e7e39eae89a8104f9bf
View file https://github.com/simstudioai/sim/blob/6f67b57152ae2fba4e55e6fff396fb38ebc2286c/apps/sim/app/f/%5Btoken%5D/public-file-view.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7196/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7196/files#diff-9b86d2cfc6decbc02812caa17f9ef3a740cc097ed8e10e7e39eae89a8104f9bf
https://github.com/simstudioai/sim/pull/7196/files#diff-9b86d2cfc6decbc02812caa17f9ef3a740cc097ed8e10e7e39eae89a8104f9bf
apps/sim/app/workspace/[workspaceId]/components/find-bar/use-find-shortcut.tshttps://github.com/simstudioai/sim/pull/7196/files#diff-8587f45a304d19aa2c0e1cd938ced286be63dff5d80bc15ad79aab2c9f3dbf91
View file https://github.com/simstudioai/sim/blob/6f67b57152ae2fba4e55e6fff396fb38ebc2286c/apps/sim/app/workspace/%5BworkspaceId%5D/components/find-bar/use-find-shortcut.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7196/{{ revealButtonHref }}
apps/sim/app/workspace/[workspaceId]/components/index.tshttps://github.com/simstudioai/sim/pull/7196/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
View file https://github.com/simstudioai/sim/blob/6f67b57152ae2fba4e55e6fff396fb38ebc2286c/apps/sim/app/workspace/%5BworkspaceId%5D/components/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7196/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7196/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
https://github.com/simstudioai/sim/pull/7196/files#diff-cf629c9c117e79c29a199a88c1f887a4cc2448be93dda99bb99b13bea3561210
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer.tsxhttps://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
View file https://github.com/simstudioai/sim/blob/6f67b57152ae2fba4e55e6fff396fb38ebc2286c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/file-viewer.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7196/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
https://github.com/simstudioai/sim/pull/7196/files#diff-41f31a97adfda85382418ff71f00df02005b2d85b01516c49967857a1ee0b948
...pace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/editor-extensions.tshttps://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
View file https://github.com/simstudioai/sim/blob/6f67b57152ae2fba4e55e6fff396fb38ebc2286c/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/7196/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
https://github.com/simstudioai/sim/pull/7196/files#diff-cb2c206d25ea13655dbf4c2c1723b67c66a469f397a8de625f9917c5ad59f926
...orkspaceId]/files/components/file-viewer/rich-markdown-editor/find/find-extension.test.tshttps://github.com/simstudioai/sim/pull/7196/files#diff-31257de83f7de6156920e03c89adab1298abf315f9444091a4f2b18427366ff3
View file https://github.com/simstudioai/sim/blob/6f67b57152ae2fba4e55e6fff396fb38ebc2286c/apps/sim/app/workspace/%5BworkspaceId%5D/files/components/file-viewer/rich-markdown-editor/find/find-extension.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7196/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/7196/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7196/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.