René's URL Explorer Experiment


Title: fix(search): answer a Note match on the canvas card by icecrasher321 · Pull Request #6901 · simstudioai/sim · GitHub

Open Graph Title: fix(search): answer a Note match on the canvas card by icecrasher321 · Pull Request #6901 · simstudioai/sim

X Title: fix(search): answer a Note match on the canvas card by icecrasher321 · Pull Request #6901 · simstudioai/sim

Description: The bug Searching a workflow counted matches inside Note blocks and then highlighted nowhere. In the reported case a 15,628-character note held 2 of 6 hits for SB_ACTION_ROUTER_SECRET; the panel read "1 of 6" and pressing Enter through the first two moved nothing on screen. The panel editor deliberately renders nothing for a Note (editor.tsx: if (isNoteBlock) return null) — the card is its own editing surface. But it refuses one by calling clearCurrentBlock(), which also cleared the shared activeSearchTarget, destroying the target the card was about to paint. Note matches were also editable: true, so Replace All would have silently rewritten prose with nothing on screen to show it. What changed The card's read view now answers the search. A rehype plugin marks every rendered occurrence. The current one is chosen by an ordinal counted with the same scan the indexer uses, and travels by React context so cycling matches restyles the marks without re-parsing the document. is keyed on the query. Its memo comparator checks children, mode, className, dir and friends but not rehypePlugins/remarkPlugins/components — so a plugin change alone cannot re-render it. Marks appeared only when something else happened to remount the card, and then survived the query being cleared. The canvas selects, centres and expands the Note. A compact card resets its scroll region to the top whenever it is unfocused, so it cannot hold a position deep in its own body. Scrolling to the mark is scrollTop arithmetic, never scrollIntoView — the card sits inside ReactFlow's transformed viewport, and scrollIntoView walks past the region to scroll the pane itself. Title matches mark the name too (OverflowSpan gained an optional decorated-children slot; the tooltip stays plain value). activeSearchTarget subscribers now take primitives. The search panel re-publishes an equal target on most of its own renders — its hydration hooks hand back fresh arrays. Holding the object in WorkflowContent, which is the panel's own ancestor, closed an unbounded update loop (Maximum update depth exceeded the instant Cmd-F ran). Documented on the store field. The markdown serializer stopped over-escaping underscores. It wrote SB\_ACTION\_ROUTER\_SECRET into the document. CommonMark's intraword rule means that backslash can never open or close emphasis, and workflow search matches the stored markdown — so anything with an underscore was unfindable in a note that plainly displayed it. Dropped outside code regions, where the serializer emits verbatim and a \_ is the author's own character. Notes for review Fixes what gets written from now on; notes already saved with escaped underscores stay that way until next edited. A search-side de-escape (match a normalised projection, keep ranges in raw coordinates so Replace still targets the right bytes) would cover existing content — deliberately not in this PR. A user-authored in a note now picks up the card's tint instead of browser-default yellow. Every other element in the note view is already restyled; mark was the last one falling through. @types/hast added to packages/workflow-renderer — types-only, already present transitively, made explicit rather than relied on as a phantom dep. The ordinal is counted in markdown source while marks land in rendered text. They agree wherever markdown prints the text; a hit inside something unprinted (a link URL, an image src) shifts the current mark to a neighbouring occurrence rather than nowhere. Recorded in the module's TSDoc. Testing packages/workflow-renderer: 97 pass (20 new). Includes rerender cases against an already-mounted card — the only shape that catches the Streamdown memo bug; verified by deleting the key and watching exactly those two fail. rich-markdown-editor: 571 pass (10 new), covering intraword unescape, emphasis still escaped, and \_ preserved inside fenced and inline code. The code-region guard was likewise verified by removing it and confirming the test fails. stores/panel + lib/workflows/search-replace: 699 pass across 44 files (3 new). Both workspaces type-check; check:api-validation, monorepo boundaries, and native-typecheck pass; biome clean. Rebased onto latest staging (which touched search-replace/indexer.ts and resources/*) and fully re-verified after. Not covered by tests: the scroll and camera behaviour — jsdom reports every offset as 0, so that path is exercised by hand only. 🤖 Generated with Claude Code

Open Graph Description: The bug Searching a workflow counted matches inside Note blocks and then highlighted nowhere. In the reported case a 15,628-character note held 2 of 6 hits for SB_ACTION_ROUTER_SECRET; the panel re...

X Description: The bug Searching a workflow counted matches inside Note blocks and then highlighted nowhere. In the reported case a 15,628-character note held 2 of 6 hits for SB_ACTION_ROUTER_SECRET; the panel re...

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

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:72f7fe28-6183-1b57-1f9c-482aceca1b0c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBA0A:C0BA8:101BEC5:1609CDC:6AFB62F5
html-safe-nonce838f3fd9defc5fddac566041c48001f1f3f27adabe9c63edb24461e8c4136f29
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTBBOkMwQkE4OjEwMUJFQzU6MTYwOUNEQzo2QUZCNjJGNSIsInZpc2l0b3JfaWQiOiI3MDc5MzgxMTY1NDI4OTI1MTczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacce77f4b7215fa940ba610e148b13f128b5f1bb890402ed571743509eab47ae38
hovercard-subject-tagpull_request:4326628200
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/6901/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altThe bug Searching a workflow counted matches inside Note blocks and then highlighted nowhere. In the reported case a 15,628-character note held 2 of 6 hits for SB_ACTION_ROUTER_SECRET; the panel re...
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/6901/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6901%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%2F6901%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/6901/files
Reloadhttps://github.com/simstudioai/sim/pull/6901/files
Reloadhttps://github.com/simstudioai/sim/pull/6901/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
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
fix/note-search-highlighthttps://github.com/simstudioai/sim/tree/fix/note-search-highlight
Conversation 23 https://github.com/simstudioai/sim/pull/6901
Commits 5 https://github.com/simstudioai/sim/pull/6901/commits
Checks 30 https://github.com/simstudioai/sim/pull/6901/checks
Files changed https://github.com/simstudioai/sim/pull/6901/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6901/files
fix(search): answer a Note match on the canvas card https://github.com/simstudioai/sim/pull/6901/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/6901/files
b3b8c04 fix(search): answer a Note match on the canvas card Aug 20, 2026 https://github.com/simstudioai/sim/pull/6901/commits/b3b8c04f610c358a8074f645cd8cc2833fe0205b
7d75e14 fix(search): honour fences and folded whitespace in Note highlighting Aug 20, 2026 https://github.com/simstudioai/sim/pull/6901/commits/7d75e145e5dcb0fb3e3b33c65f37d6070db2343c
93ceb84 fix(markdown): close a fence only on a bare delimiter run Aug 20, 2026 https://github.com/simstudioai/sim/pull/6901/commits/93ceb84a36b7b0a45ff80040ca992b4e0d8b0060
0ccad3f fix(markdown): skip quoted fences, and stop joining runs across inlin… Aug 20, 2026 https://github.com/simstudioai/sim/pull/6901/commits/0ccad3fe7ae60d4aabd6f5f8adb865776196008a
371a3de fix(search): match a Note body as it renders, instead of rewriting th… Aug 20, 2026 https://github.com/simstudioai/sim/pull/6901/commits/371a3de09cbe64b058fa9f54f43b11544b83a4c1
Clear filters https://github.com/simstudioai/sim/pull/6901/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6901/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6901/files
note-block.tsx https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
workflow.tsx https://github.com/simstudioai/sim/pull/6901/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
note.ts https://github.com/simstudioai/sim/pull/6901/files#diff-fd57ebc1ef53b4906221055276eefb59b280fd3bbef21954f0e2542d852570b6
types.ts https://github.com/simstudioai/sim/pull/6901/files#diff-0349aa7aa40aaaec61bbdc931881940b93c79a7d9414363d26992d85ead75242
indexer.test.ts https://github.com/simstudioai/sim/pull/6901/files#diff-5ffc04e0dbdd5ef8efa2d91372c71ecf297365c14b31b2c22b9253bc395b6615
indexer.ts https://github.com/simstudioai/sim/pull/6901/files#diff-8d4f1d87c5bf2fd16d5cfcd0fc5f42322e04a9e5fca83f9fbb9938bda006769e
references.ts https://github.com/simstudioai/sim/pull/6901/files#diff-891ef3d60026d98ffbaa0e1aacb6694c713e83823d6dcb4d7c3b5f8c5350542f
resolvers.ts https://github.com/simstudioai/sim/pull/6901/files#diff-c63d0b74c4e840536b84c16c137aa5499dfd9468b505dbb9fa0caa284d7e35f0
store.test.ts https://github.com/simstudioai/sim/pull/6901/files#diff-2cf90f1e461dd2fc9c8846328e450dd82f815c5ac09711217b03f7dc55b77d7c
store.ts https://github.com/simstudioai/sim/pull/6901/files#diff-340205e78c63610220347633159c8e7751101a56303f1cf1d7c2b337cebcfa82
bun.lock https://github.com/simstudioai/sim/pull/6901/files#diff-bfd0ef82a01108fa1e836c2500b98b7de8a92bb1ae352a8efcbd9d6ffcaabd60
string.test.ts https://github.com/simstudioai/sim/pull/6901/files#diff-c5e3b58e83d7dae8290c3b3d2958541506ce2125835abc0d1f6f7da28111144b
string.ts https://github.com/simstudioai/sim/pull/6901/files#diff-9b50bdcf9d922aa7d14b9be1a170a437df47378c6ee3576efaaedcdf7389f503
package.json https://github.com/simstudioai/sim/pull/6901/files#diff-62abf7d60857bfb70779a1983d5178497ca4fc37092c5e9430c5716ab4d5c652
index.ts https://github.com/simstudioai/sim/pull/6901/files#diff-d233bbee51d204be15030530fc4b05bd87f10cd6d53b4ff42aaacaa5c1b8a221
overflow-span.tsx https://github.com/simstudioai/sim/pull/6901/files#diff-481a26dd0b51e24a914ef49ca6488df75db99f32a0f67567e216b241a4e9b49e
note-block-view.tsx https://github.com/simstudioai/sim/pull/6901/files#diff-0e66e46e6748387980e1f9d9fe3afcdef527a78534d1d0b9328c0dbfe89b3021
note-search-highlight.test.tsx https://github.com/simstudioai/sim/pull/6901/files#diff-83a508ffac3f5f939d01417f40f11821c387030530383040480e5b8a758f4c88
note-search-highlight.ts https://github.com/simstudioai/sim/pull/6901/files#diff-7b3739ed355e58277041bae3440739ea6e388677bb853042a6cb8971ae62913c
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsxhttps://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
View file https://github.com/simstudioai/sim/blob/371a3de09cbe64b058fa9f54f43b11544b83a4c1/apps/sim/app/workspace/%5BworkspaceId%5D/w/%5BworkflowId%5D/components/note-block/note-block.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6901/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
Please reload this pagehttps://github.com/simstudioai/sim/pull/6901/files
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
https://github.com/simstudioai/sim/pull/6901/files#diff-2874b080c2f82536af5e8311b939d9b1760f3f12be6ac822a7404a37574606c9
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsxhttps://github.com/simstudioai/sim/pull/6901/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
View file https://github.com/simstudioai/sim/blob/371a3de09cbe64b058fa9f54f43b11544b83a4c1/apps/sim/app/workspace/%5BworkspaceId%5D/w/%5BworkflowId%5D/workflow.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6901/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6901/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
https://github.com/simstudioai/sim/pull/6901/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
https://github.com/simstudioai/sim/pull/6901/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
https://github.com/simstudioai/sim/pull/6901/files#diff-633646152e985737e5fd12931da50f7d1f2b76bc3fbb589f7ce3fcf26f69da01
apps/sim/blocks/blocks/note.tshttps://github.com/simstudioai/sim/pull/6901/files#diff-fd57ebc1ef53b4906221055276eefb59b280fd3bbef21954f0e2542d852570b6
View file https://github.com/simstudioai/sim/blob/371a3de09cbe64b058fa9f54f43b11544b83a4c1/apps/sim/blocks/blocks/note.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6901/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6901/files#diff-fd57ebc1ef53b4906221055276eefb59b280fd3bbef21954f0e2542d852570b6
https://github.com/simstudioai/sim/pull/6901/files#diff-fd57ebc1ef53b4906221055276eefb59b280fd3bbef21954f0e2542d852570b6
apps/sim/blocks/types.tshttps://github.com/simstudioai/sim/pull/6901/files#diff-0349aa7aa40aaaec61bbdc931881940b93c79a7d9414363d26992d85ead75242
View file https://github.com/simstudioai/sim/blob/371a3de09cbe64b058fa9f54f43b11544b83a4c1/apps/sim/blocks/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6901/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6901/files#diff-0349aa7aa40aaaec61bbdc931881940b93c79a7d9414363d26992d85ead75242
https://github.com/simstudioai/sim/pull/6901/files#diff-0349aa7aa40aaaec61bbdc931881940b93c79a7d9414363d26992d85ead75242
Please reload this pagehttps://github.com/simstudioai/sim/pull/6901/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6901/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.